개정판 f1f822e9
issue #00000 svg 기능 수정
Change-Id: Ic1575964db1f861ca637c7073dfa382fee4bbcd4
KCOM/Controls/Symbol.xaml.cs | ||
---|---|---|
5 | 5 |
using KCOMDataModel.DataModel; |
6 | 6 |
using MarkupToPDF.Common; |
7 | 7 |
using MarkupToPDF.Controls.Parsing; |
8 |
using Svg2Xaml; |
|
9 | 8 |
using System; |
10 | 9 |
using System.Collections.Generic; |
11 | 10 |
using System.ComponentModel; |
... | ... | |
301 | 300 |
byte[] Img_byte = fs.ToArray(); |
302 | 301 |
|
303 | 302 |
kr.co.devdoftech.cloud.FileUpload fileUploader = App.FileUploader; |
304 |
filename = fileUploader.Run(App.ViewInfo.ProjectNO, Common.ViewerDataModel.Instance.SystemMain.dzMainMenu._DocItem.DOCUMENT_NO, App.ViewInfo.UserID, Commons.shortGuid() + ".png", Img_byte); |
|
303 |
filename = fileUploader.RunSymbol(App.ViewInfo.ProjectNO, Common.ViewerDataModel.Instance.SystemMain.dzMainMenu._DocItem.DOCUMENT_NO, App.ViewInfo.UserID, Commons.shortGuid() + ".png", Img_byte);
|
|
305 | 304 |
Check_Uri.UriCheck(filename); |
306 | 305 |
if (RadTab.SelectedIndex == 0) |
307 | 306 |
{ |
... | ... | |
579 | 578 |
//img.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri(Data_)); |
580 | 579 |
if (Data_.Contains(".svg")) |
581 | 580 |
{ |
582 |
byte[] imageData = null; |
|
583 |
DrawingImage image = null; |
|
584 |
using (System.Net.WebClient web = new System.Net.WebClient()) |
|
585 |
{ |
|
586 |
imageData = web.DownloadData(new Uri(Data_)); |
|
587 |
System.IO.Stream stream = new System.IO.MemoryStream(imageData); |
|
588 |
image = SvgReader.Load(stream); |
|
589 |
} |
|
590 |
img.Source = image; |
|
581 |
SharpVectors.Converters.SvgImageExtension svgImage = new SharpVectors.Converters.SvgImageExtension(Data_); |
|
582 |
img.Source = (DrawingImage)svgImage.ProvideValue(null); |
|
591 | 583 |
} |
592 | 584 |
else |
593 | 585 |
{ |
내보내기 Unified diff