SVG processed differently depending on program context
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Medium
|
David Mathog |
Bug Description
While working on bug #1340683 it became apparent that a test SVG processed through createNewDocFromMem (in emf-inout.cpp) was not producing the same final document that same SVG read in from a file.
The SVG in question uses clipping.
The problem is that when it is processed through the first path the coordinates of the <text> objects are scaled absolutely, yet these refer to the same clip-path, and its coordinates are not modified. So the text no longer matches its clipping object. Conversely, where <path> objects reference a clipping object they still work, because they retain their original coordinates, but have a "transform=" added. So for a path the clip goes correctly, using the original coordinates, but the final result is then scaled via the transform to land in the appropriate place.
When the SVG is processed from a file it is not scaled, so there are no mismatch issues.
tags: | added: clipping text transformations |
Changed in inkscape: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in inkscape: | |
assignee: | nobody → David Mathog (mathog) |
milestone: | none → 0.91 |
status: | Confirmed → In Progress |
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
This is the EMF test file which turned up this bug. As of revision 13468 when this EMF file is processed by emf-inout.cpp the result is the data that was stored in "mangle_clip.svg". When this data is passed to createNewDocFro mMem() in Emf::Open the result is "mangled_clip.svg". When the current bug is resolved reading this EMF test file should result in a final SVG file that looks like "mangle_clip.svg", although it might differ slightly in the internal details.