Pie

Syntax

BOOL Pie(hDC,X1,Y1,X2,Y2,X3,Y3,X4,Y4)

This function draws a pie-shaped wedge by drawing an elliptical arc whose center and two endpoints are joined by lines. The center of the arc is the center of the bounding rectangle specified by the X1, Y1, X2, and Y2 parameters. The starting and ending points of the arc are specified by the X3, Y3, X4, and Y4 parameters. The arc is drawn with the selected pen, moving in a counterclockwise direction. Two additional lines are drawn from each endpoint to the arc's center. The pie-shaped area is filled with the selected brush.

If X3 equals X4 and Y3 equals Y4, the result is an ellipse with a single line from the center of the ellipse to the point (X3, Y3), or (X4, Y4).

Parameter Type/Description  

hDC HDC Identifies the device context.  
X1 int Specifies the logical x-coordinate of the upper-left corner of the bounding rectangle.  
Y1 int Specifies the logical y-coordinate of the upper-left corner of the bounding rectangle.  
X2 int Specifies the logical x-coordinate of the lower-right corner of the bounding rectangle.  
Y2 int Specifies the logical y-coordinate of the lower-right corner of the bounding rectangle.  
X3 int Specifies the logical x-coordinate of the starting point of the arc. This point does not have to lie exactly on the arc.  
Y3 int Specifies the logical y-coordinate of the starting point of the arc. This point does not have to lie exactly on the arc.  
X4 int Specifies the logical x-coordinate of the endpoint of the arc. This point does not have to lie exactly on the arc.  
Y4 int Specifies the logical y-coordinate of the endpoint of the arc. This point does not have to lie exactly on the arc.  

Return Value

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

Comments

The width of the rectangle, specified by the absolute value of X2X1, must not exceed 32,767 units. This limit applies to the height of the rectangle as well.

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