Windows 3.1 Device Drivers (ddag31qh.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Output(OS_WINDPOLYGON)
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
WORD Output(lpDestDev, OS_WINDPOLYGON, wCount, lpPoints, lpPPen, lpPBrush,
lpDrawMode, lpClipRect)
LPPDEVICE lpDestDev;
WORD wCount;
LPPOINT lpPoints;
LPPPEN lpPPen;
LPPBRUSH lpPBrush;
LPDRAWMODE lpDrawMode;
LPRECT lpClipRect;
The OS_WINDPOLYGON style specifies that the Output function draws a polygon
and fills it using the winding-number-filling method. GDI calls Output with
this style when an application calls functions, such as the Polygon function
(GDI.36), and the current polygon-filling mode is WINDING.
The graphics driver must support the OS_WINDPOLYGON style if the
PC_WINDPOLYGON value is set in the dpPolygonals member of the GDIINFO
structure.
Parameter Description
────────────────────────────────────────────────────────────────────────────
lpDestDev Points to a PDEVICE or PBITMAP structure specifying the
destination device or bitmap.
wCount Specifies the number of POINT structures in the array pointed to
by the lpPoints parameter.
lpPoints Points to an array of POINT structures containing wCount
elements. Each point represents a vertex of the polygon.
lpPPen Points to a PPEN structure that specifies the physical pen to
draw the border of the polygon.
lpPBrush Points to a PBRUSH structure that specifies the physical brush
to fill the polygon.
lpDrawMode Points to a DRAWMODE structure containing the drawing
information to draw and fill the polygon.
lpClipRect Points to a RECT structure containing coordinates for the
clipping rectangle. If the lpClipRect parameter is NULL, the
clipping rectangle is the entire display surface.
Return Value
The return value is 1 if the function draws the figure. Otherwise, it is
zero if the function encounters an unrecoverable error. The return value is
-1 if the function cannot draw the specified figure and wants GDI to
simulate it.
Comments
The Output function should fill the interior of the polygon first, then draw
the border.
To fill the polygon, Output calculates the polygon outline and fill
according to the winding-number-filling method. Winding-number filling
depends on the direction (down or up) that each side of the polygon is
drawn. With winding-number filling, a given closed area within a polygon
should be filled if a horizontal ray, starting in the area and continuing
through the left edge of the polygon, crosses an unequal number of upwardly
and downwardly drawn sides.
To draw the border, Output draws a line segment from the first point in the
array to the second, from the second to the third, and so on. If the last
line segment does not end at the first point, Output draws this line segment
to ensure a closed figure.
Although the Output function can use device hardware to draw and fill
polygons, the function either must provide the same capability when drawing
to a main memory bitmap, or return -1 to direct GDI to simulate the output
using polylines and scan lines.
See Also
Output(OS_ALTPOLYGON)
♦