BUG: Polygons Drawn with Pens of Odd Width (> 5) MisalignLast reviewed: January 5, 1995Article ID: Q111600 |
The information in this article applies to:
SYMPTOMSWhen drawing frames with Polygon(), if the pen width results in an odd number of pixels (and therefore cannot be centered exactly on its coordinates), the extra pixel of width goes up and/or to the left for widths greater than 5 pixels, whereas it correctly goes down and to the right for widths less than or equal to 5 pixels.
STATUSMicrosoft has confirmed this to be a bug in Windows version 3.1. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
More InformationUsing the ShowGDI sample, the following steps reproduce the problem:
Enter the following ordered pairs for the points 0 through 4: (20,20) (40,20) (40,40) (20,40).Note that a 5-pixel frame correctly puts the extra pixel of pen width to the right and/or below the 20 and 40 coordinate lines (resulting in two pixels up and left, and three pixels down and right). This is correct (as are 1- and 3-pixel thick lines). However, odd widths of greater than or equal to 7 pixels start to round in the wrong direction:
Now the extra pixels goes up and to the left, resulting in 4 up/left and 3 down/right.
|
Additional reference words: buglist3.10 3.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |