Size of circular paths is reduced in EMF export

Bug #407394 reported by Nis on 2009-07-31
46
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Inkscape
Undecided
Alvin Penner

Bug Description

The attached file shows a part of an electrical power system. In the SVG, everything looks fine. However, in an exported EMF, transformers are not any more connected to the lines below them. Similarly, the "connection nodes" are not centered around the junctions of horizontal bars and vertical lines any more. Instead, objects appear to be scaled down with direction to the upper left corner of their bounding box.

One of the "transformer" paths has been distorted slightly to see if it affects the problem, and it does.

A workaround is to convert contours of the problematic paths to paths.

Nis (nis-martensen) wrote :
Nis (nis-martensen) wrote :
  • cp.emf Edit (18.1 KiB, application/octet-stream)

exported EMF (Inkscape 0.47pre1, build July 3 2009, on Windows Vista)

Nis (nis-martensen) wrote :

The size of an object plays a role: the problem is more signifcant for smaller objects.
The direction of the path also makes a difference: Objects starting with a horizontal stroke are more affected than those starting with a vertical stroke.

Nis (nis-martensen) wrote :
  • s.emf Edit (1.6 KiB, application/octet-stream)
tags: added: emf exporting
Jakub Hodaň (jakub-hodan) wrote :
Jakub Hodaň (jakub-hodan) wrote :
Jakub Hodaň (jakub-hodan) wrote :
Jakub Hodaň (jakub-hodan) wrote :
Jakub Hodaň (jakub-hodan) wrote :

Everything is from:
Inkscape 0.47 r22583, built Nov 21 2009
locale: cs_CZ
OS: MS Win XP Pro SP3

Jakub Hodaň (jakub-hodan) wrote :

in 0.46 is everything correct with my example - I must downgrade all my inkscape installations to 0.46

Hello Inkscape Developers,

this bug is a show stopper for any ms office user. Therefore, i did a testcase in order to help you tracking down the problem. The downscaling not only appears with ellipses, but also with rectangles. Self drawn paths are not affected. Converting to a path does only help if the path is splitted up afterwards. Rotating by an arbitrary angle is also suppressing the unwanted scale-down. It is not a relative scale factor, but always by the same absolute amount.
Another emf issue is the stroke join style which is always set to bevel join (maybe worth a new bug report).
I would be glad to see a fix for the (otherwise) good emf export.

Thank you for your great work,
Thomas

Alvin Penner (apenner) wrote :

confirmed on Windows XP, Inkscape 0.48pre1

Changed in inkscape:
status: New → Confirmed
Alvin Penner (apenner) wrote :

attached is a brief description of the problem

The objects that are smaller than expected are the ones that have been drawn using the GDI32 commands Ellipse() and Rectangle(). Those objects that are rendered using the commands Polygon() and the various Path commands like PolyBezierTo() are not affected in this way. After reading the Microsoft documentation on the command Rectangle(), it appears that this behaviour is deliberate:

http://msdn.microsoft.com/en-us/library/dd162898(v=VS.85).aspx

They state that : The rectangle that is drawn excludes the bottom and right edges.

Under normal circumstances the difference in rendering would probably not be noticeable, but it appears that it is being exaggerated by the scaling that is being done in the emf export routine. I have confirmed that the problem essentially disappears, or at least is not visible, if one forces the call to SetWindowExtEx() to use exactly the same window size as the call to SetViewportExtEx(). However, this seems to me to be a rather complicated way of solving a simple problem.

Instead, the use of the functions Ellipse() and Rectangle() has been avoided in this routine since they are inherently not compatible with the other rendering routines, and since they are redundant.

Changed in inkscape:
status: Confirmed → Fix Committed
Jakub Hodaň (jakub-hodan) wrote :

Now it looks good under Inkscape 0.48.0 r9654 for me.

su_v (suv-lp) wrote :

Alvin Penner wrote on 2011-01-04:
> Confirmed → Fix Committed

Committed to trunk in revision 9995
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/9995>

I can still experience this bug with Inkscape 0.48.1 on Windows Vista. The bug appears for rectangles.

su_v (suv-lp) wrote :

> I can still experience this bug with Inkscape 0.48.1

The fix was committed to the development branch, and apparently was not backported to the 0.48.x branch.
You can test with a current development build from <http://inkscape.modevia.com/win32/?C=M;O=D>

Changed in inkscape:
milestone: none → 0.49
su_v (suv-lp) on 2011-10-08
tags: added: backport-proposed win32
Krzysztof Kosinski (tweenk) wrote :

Backported to stable in 9875

Changed in inkscape:
milestone: 0.49 → 0.48.3
tags: removed: backport-proposed
su_v (suv-lp) on 2012-02-11
Changed in inkscape:
assignee: nobody → Alvin Penner (apenner)
Ted Gould (ted) on 2012-02-15
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers