Closed
Description
Hi, I have an issue when using SharpVectors for conversion of SVG file to XAML resource. Here you can see very simple SVG:
<svg id="test" data-name="test" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<defs>
<style>
.cls-1 { fill: rgba(186, 208, 231, .5); stroke: #416596; stroke-linecap: round; stroke-linejoin: round; }
</style>
</defs>
<rect class="cls-1" x="2.5" y="2.5" width="19" height="19"/>
</svg>
And here XAML result:
<ResourceDictionary xmlns="..." xmlns:x="..." xmlns:po="..." xmlns:mc="..." mc:Ignorable="po">
<DrawingBrush x:Key="test" Stretch="Uniform" po:Freeze="true">
<DrawingBrush.Drawing>
<DrawingGroup>
<DrawingGroup>
<DrawingGroup.ClipGeometry>
<RectangleGeometry Rect="0,0,24,24" />
</DrawingGroup.ClipGeometry>
<GeometryDrawing Brush="#00BAD0E7">
<GeometryDrawing.Pen>
<Pen Brush="#FF416596" Thickness="1" StartLineCap="Round" EndLineCap="Round" LineJoin="Round" />
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="2.5,2.5,19,19" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</ResourceDictionary>
If you compare those you see that: rgba(186, 208, 231, .5) does match Brush="#00BAD0E7" in R, G and B values but not A.