Pie

  BOOL Pie(hdc, X1, Y1, X2, Y2, X3, Y3, X4, Y4)    
  HDC hdc;    
  int X1;    
  int Y1;    
  int X2;    
  int Y2;    
  int X3;    
  int Y3;    
  int X4;    
  int Y4;    

The Pie function draws a pie-shaped wedge by drawing an elliptical curve whose center and two end-points are joined by lines.

The curve of the pie is defined by the ellipse formed by the given bounding rectangle. The bounding rectangle is specified by the points (X1, Y1) and (X2, Y2). The curve extends counterclockwise from the point where it intersects the radial line from the center of the bounding rectangle to (X3, Y3). The curve ends where it intersects the radial line from the center of the bounding rectangle to (X4, Y4). Two lines are drawn from the end-points of the curve to the center of the bounding rectangle to create the pie. If the end-points of the curve are the same point, the result is an ellipse with a single line from the center of the ellipse to that point.

The pie is drawn using the current pen and filled with the current brush.

Parameters

hdc

Identifies the device context.

X1

Specifies the logical x-coordinate of the upper-left corner of the bounding rectangle.

Y1

Specifies the logical y-coordinate of the upper-left corner of the bounding rectangle.

X2

Specifies the logical x-coordinate of the lower-right corner of the bounding rectangle.

Y2

Specifies the logical y-coordinate of the lower-right corner of the bounding rectangle.

X3

Specifies the logical x-coordinate of the end-point of the radial line defining the start-point of the pie.

Y3

Specifies the logical y-coordinate of the end-point of the radial line defining the start-point of the pie.

X4

Specifies the logical x-coordinate of the end-point of the radial line defining the end-point of the pie.

Y4

Specifies the logical y-coordinate of the end-point of the radial line defining the end-point of the pie.

Return Value

The return value specifies whether or not the pie shape is drawn. It is TRUE if the pie shape is drawn. Otherwise, it is FALSE.

Comments

The current position is neither used nor updated by this function.

See Also

AngleArc, Arc, ArcTo, Chord