SAMPLE: Using DrawPenData() or RedisplayPenData() to Display InkLast reviewed: February 15, 1996Article ID: Q75846 |
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 sample application in the Microsoft Software Library demonstrates using RedisplayPenData. Download REPAINT.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:
MORE INFORMATIONWhen 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 reference words: 1.00 softlib REPAINT.EXE
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |