Pie function (wingdi.h)

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(
  HDC hdc,
  int left,
  int top,
  int right,
  int bottom,
  int xr1,
  int yr1,
  int xr2,
  int yr2
);

Parameters

hdc

A handle to the device context.

left

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

top

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

right

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

bottom

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

xr1

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

yr1

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

xr2

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

yr2

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]
Target Platform Windows
Header wingdi.h (include Windows.h)
Library Gdi32.lib
DLL Gdi32.dll

See also

AngleArc

Arc

ArcTo

Chord

Filled Shape Functions

Filled Shapes Overview