XAML Export: Angle format in RotateTransform

Bug #1789401 reported by Thomas W.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

I exported SVG to XAML and one element was

<Canvas.RenderTransform>
    <RotateTransform Angle="-60 38.113176 265.70759"/>
</Canvas.RenderTransform>

However, that format of Angle was not supported by Visual Studio.
Instead, it should have been

<RotateTransform Angle="-60" CenterX="38.113176" CenterY="265.70759"/>

I'm using Visual Studio 2015 Update 3 on Windows 10. I'm developing a WPF app targeting .NET 4.5.2.

My default namespace is xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

I was using Inkscape 0.92.0 r15299.

Saving in Silverlight format uses the same angle format.

Tags: saving
Revision history for this message
Thomas W. (thomasw-mitutoyo-ctl) wrote :

It seems this happens for grouped objects only.

summary: - XAML Export: Angle format in RotateTrasform
+ XAML Export: Angle format in RotateTransform
Revision history for this message
Thomas W. (thomasw-mitutoyo-ctl) wrote :
tags: added: saving
Revision history for this message
Thomas W. (thomasw-mitutoyo-ctl) wrote :

The following change in svg2xaml.xsl seems to work for me:
It's somewhere around line 231.

    <!-- Rotate transform -->
    <xsl:when test="starts-with($input, 'rotate(')">
      <RotateTransform>
        <xsl:attribute name="Angle">
          <xsl:value-of select="substring-before(normalize-space(translate(substring-before(substring-after($input, 'rotate('), ')'), ',', ' ')), ' ')" />
        </xsl:attribute>
          <xsl:attribute name="CenterX">
            <xsl:value-of select="substring-before(substring-after(normalize-space(translate(substring-before(substring-after($input, 'rotate('), ')'), ',', ' ')), ' '), ' ')" />
          </xsl:attribute>
          <xsl:attribute name="CenterY">
            <xsl:value-of select="substring-after(substring-after(normalize-space(translate(substring-before(substring-after($input, 'rotate('), ')'), ',', ' ')), ' '), ' ')" />
          </xsl:attribute>
      </RotateTransform>
      <xsl:call-template name="parse_transform">
        <xsl:with-param name="input" select="substring-after($input, ') ')" />
      </xsl:call-template>
    </xsl:when>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.