Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Pie function

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.

Syntax


BOOL Pie(
  _In_ HDC hdc,
  _In_ int nLeftRect,
  _In_ int nTopRect,
  _In_ int nRightRect,
  _In_ int nBottomRect,
  _In_ int nXRadial1,
  _In_ int nYRadial1,
  _In_ int nXRadial2,
  _In_ int nYRadial2
);

Parameters

hdc [in]

A handle to the device context.

nLeftRect [in]

The x-coordinate, in logical coordinates, of the upper-left corner of the bounding rectangle.

nTopRect [in]

The y-coordinate, in logical coordinates, of the upper-left corner of the bounding rectangle.

nRightRect [in]

The x-coordinate, in logical coordinates, of the lower-right corner of the bounding rectangle.

nBottomRect [in]

The y-coordinate, in logical coordinates, of the lower-right corner of the bounding rectangle.

nXRadial1 [in]

The x-coordinate, in logical coordinates, of the endpoint of the first radial.

nYRadial1 [in]

The y-coordinate, in logical coordinates, of the endpoint of the first radial.

nXRadial2 [in]

The x-coordinate, in logical coordinates, of the endpoint of the second radial.

nYRadial2 [in]

The y-coordinate, in logical coordinates, of the endpoint of the second radial.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Filled Shapes Overview
Filled Shape Functions
AngleArc
Arc
ArcTo
Chord

 

 

Show: