WORD Output(
LPPDEVICE lpDestDev,
WORD wStyle,
WORD wCount,
LPPOINT lpPoints,
LPPPEN lpPPen,
LPPBRUSH lpPBrush,
LPDRAWMODE lpDrawMode,
LPRECT lpClipRect
);
Draws a polygon and fills it using the winding-number-filling method.
1 | Function was successful. |
0 | Unrecoverable error occurred. |
-1 | Function does not support the specified style. |
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.
The Output function should fill the interior of the polygon first and then draw the border.
To fill the polygon, Output calculates the polygon outline and filling 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 must either 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.
Output(OS_ALTPOLYGON), Output(OS_POLYPOLYGON), PDEVICE, PBITMAP, DRAWMODE, RECT, POINT