EMF on open line widths affected by "scale stroke width" button

Bug #1306138 reported by David Mathog
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
David Mathog

Bug Description

r13276, linux

(first noted in bug #1303443)

When the test file "10pxline.emf" (attached) is opened the resulting diagram scales line widths in two ways, depending on the value of the "scale stroke width". (Yes, I know the example line is not exactly 10px).

set: line width is 9.975px (CORRECT)
clear: line width is 9.975mm (WRONG)

All emf-inout.cpp does when reading an EMF file is construct an SVG file in d.outsvg, which it then sends on with:

// std::cout << "SVG Output: " << std::endl << *(d.outsvg) << std::endl;

    SPDocument *doc = SPDocument::createNewDocFromMem(d.outsvg->c_str(), strlen(d.outsvg->c_str()), TRUE);

Uncomment that debug line and one finds that d.outsvg is IDENTICAL in the two cases (one instance saved to 10pxonly.svg, which will be the next attachment). When that svg is read in the result does NOT depend on the value of the "scale stroke width" button. Note that the sole style in 10pxonly.svg specifies:

        style="fill:none;stroke:#000000;stroke-width:9.974926px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;"

which would seem to be unambiguous. There are also no transforms in that file.

In bug #1303443 Alvin Penner noted that:

    <group
       id="transform"
       stroke="0"
       rectcorners="1"
       pattern="1"
       gradient="1" />

however the SVG does not contain any <group>.

Revision history for this message
David Mathog (mathog) wrote :
Revision history for this message
David Mathog (mathog) wrote :
Revision history for this message
David Mathog (mathog) wrote :

Not surprisingly, wmf-inout.cpp does exactly the same thing. (Example not shown.)

Revision history for this message
David Mathog (mathog) wrote :

This scales the line width, or not, depending on the state of that button when inkscape last exited:

   src/inkscape -file /tmp/10pxline.emf

Found the problem and the attached patch now lets emf/wmf open without interference from the "/options/transform/*" preferences.

Revision history for this message
David Mathog (mathog) wrote :

Patch committed in revision 13319

Status New -> Fix Committed

Changed in inkscape:
status: New → Fix Committed
su_v (suv-lp)
Changed in inkscape:
assignee: nobody → David Mathog (mathog)
milestone: none → 0.91
Bryce Harrington (bryce)
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

Remote bug watches

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