Comment 13 for bug 407394

Revision history for this message
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.