개정판 f1f822e9
issue #00000 svg 기능 수정
Change-Id: Ic1575964db1f861ca637c7073dfa382fee4bbcd4
MarkupToPDF/Controls/Etc/ImgControl.cs | ||
---|---|---|
16 | 16 |
using MarkupToPDF.Serialize.Core; |
17 | 17 |
using MarkupToPDF.Serialize.S_Control; |
18 | 18 |
using System.Windows.Media.Imaging; |
19 |
using Svg2Xaml; |
|
20 | 19 |
|
21 | 20 |
namespace MarkupToPDF.Controls.Etc |
22 | 21 |
{ |
... | ... | |
474 | 473 |
Image img = new Image(); |
475 | 474 |
if (s.ImagePath.Contains(".svg")) |
476 | 475 |
{ |
477 |
byte[] imageData = null; |
|
478 |
DrawingImage image = null; |
|
479 |
using (System.Net.WebClient web = new System.Net.WebClient()) |
|
480 |
{ |
|
481 |
imageData = web.DownloadData(uri.Uri); |
|
482 |
System.IO.Stream stream = new System.IO.MemoryStream(imageData); |
|
483 |
image = SvgReader.Load(stream); |
|
484 |
} |
|
485 |
img.Source = image; |
|
476 |
SharpVectors.Converters.SvgImageExtension svgImage = new SharpVectors.Converters.SvgImageExtension(uri.ToString()); |
|
477 |
var svg = svgImage.ProvideValue(null); |
|
478 |
|
|
479 |
img.Source = (DrawingImage)svg; |
|
486 | 480 |
} |
487 | 481 |
else |
488 | 482 |
{ |
내보내기 Unified diff