Export XAML with matrix

Bug #573512 reported by Klaus Leth Pedersen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
jazzynico

Bug Description

I've tested this on Windows Vista with Inkscape 0.47 r22583, built Nov 21 2009.
I draw a rectangle and then I rotate it. When I open the XML editor I see the following
matrix(0.58672135,0.61730828,-0.61730828,0.78672135,0,0).

When I export this rectangle and view it in IExplore the rectangle is not rotated.
If you look closer in the XAML with Notepad++ there is no transform or matix.
I did a manual fix in the XAML and added the following after the path.
 <Canvas.RenderTransform>
                <TransformGroup>
                    <MatrixTransform>
                    <MatrixTransform.Matrix>
                        <!--matrix(0.58672135,0.61730828,-0.61730828,0.78672135,0,0)-->
                            <Matrix M11="0.58672135" M12="0.61730828" M21="-0.61730828" M22="0.78672135" OffsetX="0" OffsetY="0"/>
                        </MatrixTransform.Matrix>
                        </MatrixTransform>
                </TransformGroup>
            </Canvas.RenderTransform>
  </Canvas>
But I don't want to do this with every rotated path :-)

Related branches

tags: added: transformations xaml
Alvin Penner (apenner)
Changed in inkscape:
status: New → Confirmed
su_v (suv-lp)
tags: added: exporting
jazzynico (jazzynico)
Changed in inkscape:
assignee: nobody → JazzyNico (jazzynico)
importance: Undecided → Medium
status: Confirmed → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

Fix committed in bzr revision 9396.
Also partially fixes Bug #266909 (XAML export invalid because of empty transforms).

Changed in inkscape:
milestone: none → 0.48
status: In Progress → Fix Committed
Revision history for this message
jazzynico (jazzynico) wrote :

The fix can be tested by replacing svg2xaml.xsl (in the share/extensions folder) by the attached file.

Revision history for this message
Klaus Leth Pedersen (klp1974) wrote :

Thank you
I have tested the fix and I can export rotated Rectangles.

I cannot find the matrix(..) in the XML editor any more is that part of the fix?

Revision history for this message
jazzynico (jazzynico) wrote :

> I cannot find the matrix(..) in the XML editor any more is that part of the fix?

No. I haven't touched the SVG code at all.
Did you convert you rectangle to path first? If so, the matrix transform has been integrated in the path. Thus I suggest that you test with a non-converted shape. AFAIK, a rotated rectangle should have a transform attribute.

Revision history for this message
Klaus Leth Pedersen (klp1974) wrote :

You are right again I tried to make a rectangle without converting it to a path and now I see the matrix transform. The exported XAML also has a transform
<Rectangle.RenderTransform>
     <MatrixTransform Matrix="0.93960074,0.34227247,-0.34227247,0.93960074,0,0"/>
</Rectangle.RenderTransform>

The fix is okay thank you again.

jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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