WORD Output(
LPPDEVICE lpDestDev,
WORD wStyle,
WORD wCount,
LPPOINT lpPoints,
LPPEN lpPPen,
LPPBRUSH lpPBrush,
LPDRAWMODE lpDrawMode,
LPRECT lpClipRect
);
Draws a polygon and fills it using the alternate-filling method.
1 | Function was successful. |
0 | Unrecoverable error occurred. |
-1 | Function does not support specified style. |
Output fills the interior of the polygon first, then draws the border.
To fill the polygon, Output calculates the polygon outline and fills it according to the alternate-filling method. Alternate filling typically fills every other closed area within a polygon. In general, a given area should be filled if a horizontal ray, starting in the area and continuing through the left edge of the polygon, crosses an odd number of polygon 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 Output 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 a value of -1 to direct GDI to simulate the output using polylines and scan lines.
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 ALTERNATE.
The graphics driver can support the OS_ALTPOLYGON style if the PC_ALTPOLYGON bit is set in the dpPolygonals member of the GDIINFO structure.
Output(OS_POLYPOLYGON), Output(OS_WINDPOLYGON), PDEVICE, PBITMAP, DRAWMODE, RECT, POINT