Pie
The Pie function draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials. The pie is outlined by using the current pen and filled by using the current brush.
BOOL Pie(
HDC hdc, // handle to DC
int nLeftRect, // x-coord of upper-left corner of rectangle
int nTopRect, // y-coord of upper-left corner of rectangle
int nRightRect, // x-coord of lower-right corner of rectangle
int nBottomRect, // y-coord of lower-right corner of rectangle
int nXRadial1, // x-coord of first radial's endpoint
int nYRadial1, // y-coord of first radial's endpoint
int nXRadial2, // x-coord of second radial's endpoint
int nYRadial2 // y-coord of second radial's endpoint
);
Parameters
hdc
[in] Handle to the device context.
nLeftRect
[in] Specifies the x-coordinate, in logical coordinates, of the upper-left corner of the bounding rectangle.
nTopRect
[in] Specifies the y-coordinate, in logical coordinates, of the upper-left corner of the bounding rectangle.
nRightRect
[in] Specifies the x-coordinate, in logical coordinates, of the lower-right corner of the bounding rectangle.
nBottomRect
[in] Specifies the y-coordinate, in logical coordinates, of the lower-right corner of the bounding rectangle.
nXRadial1
[in] Specifies the x-coordinate, in logical coordinates, of the endpoint of the first radial.
nYRadial1
[in] Specifies the y-coordinate, in logical coordinates, of the endpoint of the first radial.
nXRadial2
[in] Specifies the x-coordinate, in logical coordinates, of the endpoint of the second radial.
nYRadial2
[in] Specifies the y-coordinate, in logical coordinates, of the endpoint of the second radial.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Windows NT/2000/XP: To get extended error information, call GetLastError.
Remarks
The curve of the pie is defined by an ellipse that fits the specified bounding rectangle. The curve begins at the point where the ellipse intersects the first radial and extends counterclockwise to the point where the ellipse intersects the second radial.
The current position is neither used nor updated by the Pie function.
Windows 95/98/Me: The sum of the coordinates of the bounding rectangle cannot exceed 32,767. The sum of nLeftRect and nRightRect or nTopRect and nBottomRect parameters cannot exceed 32,767.
Requirements
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Wingdi.h; include Windows.h.
Library: Use Gdi32.lib.
See Also
Filled Shapes Overview, Filled Shape Functions, AngleArc, Arc, ArcTo, Chord