The information in this article applies to:
SUMMARYThe DrawPenData() function, documented in the "Microsoft Windows for Pen Computing: Programmer's Reference" manual, does not exactly reproduce the appearance of the original "ink" generated by the system. However, the RedisplayPenData function does reproduce the appearance of the ink. The RePaint.exe is a sample application that demonstrates how to use RedisplayPenData. MORE INFORMATIONThe following files are available for download from the Microsoft
Download Center. Click the file names below to download the files: http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. When the system displays ink on the screen, it uses an algorithm that is based on a square brush. The system considers the center of the square brush the "hot spot," around which it centers the ink. The DrawPenData() function then uses the Windows Polyline() API to draw the line on the screen. Polyline() assumes that its parameters specify the center points of what is to be drawn, and that the brush is round. The difference between the square and round brushes causes DrawPenData() to display diagonal lines narrower than the original ink. Note that a pen that is five pixels wide will be drawn approximately seven pixels wide by DrawPenData(). The new function, RedisplayPenData(), addresses this problem by redrawing the ink using a square brush such that the result is identical to original ink. Additional query words:
Keywords : kbfile kbsample kb16bitonly WpenInk |
Last Reviewed: December 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |