wrong coordinates when exporting to XAML

Bug #1025642 reported by Jan Krystufek
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
jazzynico

Bug Description

There are few bad things in Inkscape to XAML export:
1) Some objects (e.g. rectangles) are on wrong coordinates.
2) After using "Resize page to drawing or selection" function, coordinates of objects are not in new global coordinate system, but in the old one with defined object transformation. (There is not reason for that, because only translation was performed.)
3) If text objects are inserted in drawing, some text object (TextBox) contents disapear during XAML exporting.

Tags: exporting xaml
su_v (suv-lp)
tags: added: exporting xaml
Revision history for this message
su_v (suv-lp) wrote :

Please provide information about your OS/platform and Inkscape version (see Inkscape menu 'Help > About Inkscape').

Revision history for this message
Jan Krystufek (jan-krystufek) wrote :

Windows 7 Professional 64-bit / Inkscape 0.48.1

Revision history for this message
Jan Krystufek (jan-krystufek) wrote :

ad 1) It appears when object was rotated using "Rotate selection 90° ...".

Revision history for this message
su_v (suv-lp) wrote :

> Windows 7 Professional 64-bit / Inkscape 0.48.1

Could you please test with the latest stable build?
<http://sourceforge.net/projects/inkscape/files/inkscape/0.48.3.1/>
or a recent development build?
<http://sdrv.ms/Q2Ls0i>

Several XAML-related reports have been fixed since the release of 0.48.1:
<http://tinyurl.com/czsqzm5>

A list of known issues can be found in the wiki:
<http://wiki.inkscape.org/wiki/index.php/SpecXAMLExport#Known_limitations>

Attaching sample SVG files here to the bug report for remaining issues would ease further investigation.

Revision history for this message
Jan Krystufek (jan-krystufek) wrote :

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="373.375"
   height="373.84375"
   id="svg9076"
   version="1.1"
   inkscape:version="0.48.3.1 r9886"
   sodipodi:docname="New document 6">
  <defs
     id="defs9078" />
  <sodipodi:namedview
     id="base"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:zoom="0.35"
     inkscape:cx="186.68695"
     inkscape:cy="186.91372"
     inkscape:document-units="px"
     inkscape:current-layer="layer1"
     showgrid="false"
     fit-margin-top="0"
     fit-margin-left="0"
     fit-margin-right="0"
     fit-margin-bottom="0"
     inkscape:window-width="451"
     inkscape:window-height="428"
     inkscape:window-x="175"
     inkscape:window-y="175"
     inkscape:window-maximized="0" />
  <metadata
     id="metadata9081">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title></dc:title>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1"
     transform="translate(-188.31305,-345.43215)">
    <g
       style="stroke:#000000;stroke-width:15;stroke-miterlimit:4;stroke-dasharray:none"
       transform="translate(-748.1772,-1225.0542)"
       id="g10921-66">
      <rect
         style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
         id="rect6591-2-2-5-7-5-2-6"
         width="30"
         height="65"
         x="1819.0724"
         y="-1155.6772"
         ry="0"
         transform="matrix(0,1,-1,0,0,0)" />
      <path
         inkscape:connector-curvature="0"
         id="path8118-5-0-8-8-7-7"
         d="m 1215.8082,1849.2293 -185.262,0"
         style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
      <rect
         style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
         id="rect10885-3-67"
         width="185.24207"
         height="153.37245"
         x="1030.5562"
         y="1665.6034"
         rx="0.85983133"
         ry="16.302757" />
    </g>
  </g>
</svg>

Revision history for this message
Jan Krystufek (jan-krystufek) wrote :

I just tried 0.48.3.1-2, but the result was same.

Revision history for this message
su_v (suv-lp) wrote :

Attaching the file (for convenience).

Issue 1) is likely related to (or a duplicate of) Bug #215534 "SVG to XAML adds offset":
The rectangles are inside two nested groups, each of the groups has an explicit 'transform' attribute.
Might have been fixed in r10010 (trunk only)
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/10010>

Revision history for this message
jazzynico (jazzynico) wrote :

> 1) Some objects (e.g. rectangles) are on wrong coordinates.

Confirmed. The export process doesn't seem to process nested transformations correctly.

> 2) coordinates of objects are not in new global coordinate system

That's how the SVG coordinates are calculated. I don't know if it's a bug or a wanted behavior, but it's not the extension's role to correct that.

> 3) some text object (TextBox) contents disapear during XAML exporting.

Confirmed. The whiteSpaceCollapse="preserve" attribute is blocking the text rendering. Manually removing it fixes the issue. To be investigated.

Changed in inkscape:
assignee: nobody → JazzyNico (jazzynico)
importance: Undecided → Medium
status: New → Confirmed
jazzynico (jazzynico)
Changed in inkscape:
status: Confirmed → Triaged
jazzynico (jazzynico)
Changed in inkscape:
milestone: none → 1.0
Revision history for this message
Dion Barrier (nethemas) wrote :

The follow SVG when exported to XAML will see the black slash displaced. Affects v0.92.1 x64 (Windows 10).

Revision history for this message
jazzynico (jazzynico) wrote :

The whiteSpaceCollapse="preserve" issue is managed in bug #1521688 (Xaml export. Tag "whiteSpaceCollapse" is not recognized).

summary: - wrong XAML export
+ wrong coordinates when exporting to XAML
Patrick Storz (ede123)
Changed in inkscape:
milestone: 1.0-old → 1.0
Revision history for this message
Nathan Lee (nathan.lee) wrote :

Closing as part of migration of reports to GitLab (alpha.inkscape.org/bug-migration/)

Based on the two example files I see attached (and the descriptions), this issue is the same as the (newly) reported issue here: https://gitlab.com/inkscape/inbox/-/issues/2087

Changed in inkscape:
status: Triaged → Invalid
Revision history for this message
Nathan Lee (nathan.lee) wrote :

Oh, I was wondering where the text issue was coming from! Re-reading the issue, want to add, based on https://bugs.launchpad.net/inkscape/+bug/1025642/comments/8, the text issue was/is being tracked in https://bugs.launchpad.net/inkscape/+bug/1521688

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.