Output(OS_PIE)


WORD Output(LPPDEVICE lpDestDev, WORD wStyle, WORD wCount, 
    LPPOINT lpPoints, LPPPEN lpPPen, LPPBRUSH lpPBrush, 
    LPDRAWMODE lpDrawMode, LPRECT lpClipRect);

Draws an arc and two line segments that connect the endpoints of the arc to the center of the arc's bounding rectangle.

1

Function was successful.

0

Unrecoverable error occurred.

-1

Function does not support the specified style.


lpDestDev

Address of a PDEVICE or PBITMAP structure that specifies the destination device or bitmap.

wStyle

Must be OS_PIE.

wCount

Must be 5.

lpPoints

Address of an array that contains five POINT structures:

Index

Description

0

Upper-left corner of the bounding rectangle.

1

Lower-right corner of the bounding rectangle.

2

Starting point for the arc.

3

Ending point for the arc.

4

Start and stop angles. Reserved; do not use.


lpPPen

Address of a PPEN structure that specifies the physical pen that is used to draw the arc and line segments.

lpPBrush

Address of a PBRUSH structure that specifies the brush that is used to fill the figure.

lpDrawMode

Address of a DRAWMODE structure that contains drawing information that is used to draw the border and fill the figure.

lpClipRect

Address of a RECT structure that contains coordinates for the clipping rectangle. If the lpClipRect parameter is NULL, the clipping rectangle is the entire display surface.

Since the resulting figure is closed, Output fills the figure as well as draws the border. GDI calls this function when an application calls the Pie function (GDI.26).

A graphics driver must support the OS_PIE style if the CC_PIE value is set in the dpCurves member of the GDIINFO structure.

Output draws the pie-shaped figure by first filling the interior then drawing the border.

Output draws an arc by drawing a portion of the ellipse contained in the specified bounding rectangle. The function calculates the endpoints of the arc using the starting and ending points; each endpoint is the intersection of the ellipse and a ray drawn from the center of the bounding rectangle through the specified starting or ending point. Output draws the arc in a counterclockwise direction, from starting point up to, but not including, the ending point.

Output draws the two line segments from the endpoints of the arc to the point at the center of the bounding rectangle.

See also PDEVICE, PBITMAP, DRAWMODE, RECT, POINT