xaml export doesn't convert units for rectangle rx/ry values
Steps to reproduce:
- Open inkscape-mm-test2.svg
- Open Save As dialog
- Export as xaml
This is a simple file created in Inkscape, but modified so rx, ry values of rectangle are in mm: <rect ry="2mm" rx="1.5mm" y="3" x="3" height="20" width="20" id="rect58" style="stroke:#00ff00;stroke-width:0.5mm"" />
What happened?
Exported file (inkscape-mm-test2.xaml) does not convert the mm values into unitless values for the RadiusX and RadiusY values of the rectangle (unlike the stroke). This may extend to more properties.
<Rectangle xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Canvas.Left="3" Canvas.Top="3" Width="20" Height="20" RadiusX="1.5mm" RadiusY="2mm" Name="rect58" Fill="#000000" StrokeThickness="1.8897635" Stroke="#FF00FF00"/>
Taken from inbox#2236 (comment 321526485), cause was simply that the unit conversion wasn't done for these values in the svg2xaml.xsl file
<xsl:if test="@rx">
<xsl:attribute name="RadiusX">
<xsl:value-of select="@rx" />
</xsl:attribute>
</xsl:if>
<xsl:if test="@x">
<xsl:variable name="X">
<xsl:call-template name="convert_unit">
<xsl:with-param name="convert_value" select="@x" />
</xsl:call-template>
</xsl:variable>
</xsl:if>
Inkscape Version and Operating System:
1.1-dev (530a203f00, 2020-04-07) debug build Linux Mint 19.1