The information in this article applies to:
SYMPTOMSIn a Windows 3.1 printing application, calling the SetPixel() command on a device context created for the Windows PostScript printer driver version 3.56 or earlier causes the pixel that is drawn to be larger than expected if a line with a thickness greater than 1 was drawn previously. CAUSEThe PostScript driver's implementation of SetPixel() draws a circle with the thickness set to the thickness of the last line drawn with the LineTo() command if the thickness of the pen used is greater than 1. RESOLUTION
Instead of using the SetPixel() command, use the PatBlt() command to draw the pixel. This is needed only if a pen of width greater than 1 was used to draw lines with the Moveto() and LineTo() commands.
instead of the above line of code, you could use PatBlt() in the following example:
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. MORE INFORMATION
Once a pen of thickness greater than 1 (one) is created and selected into the printer's device context and a LineTo() command is called, every call to SetPixel() results in a circle the width of the pen. If a pen of width 0 (zero) or 1 is created and used by the LineTo() command, the lines drawn will be the correct thickness, but the SetPixel() command will still draw with the thickness of the most recently used pen with a width greater than 1 (one).
Sample Code
Additional query words: buglist3.10 3.10
Keywords : kbWinOS310 kbDSupport kbSDKWin16 |
Last Reviewed: July 7, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |