CDC::Pie 

BOOL Pie( int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4 );

BOOL Pie( LPCRECT lpRect, POINT ptStart, POINT ptEnd );

Return Value

Nonzero if the function is successful; otherwise 0.

Parameters

x1

Specifies the x-coordinate of the upper-left corner of the bounding rectangle (in logical units).

y1

Specifies the y-coordinate of the upper-left corner of the bounding rectangle (in logical units).

x2

Specifies the x-coordinate of the lower-right corner of the bounding rectangle (in logical units).

y2

Specifies the y-coordinate of the lower-right corner of the bounding rectangle (in logical units).

x3

Specifies the x-coordinate of the arc’s starting point (in logical units). This point does not have to lie exactly on the arc.

y3

Specifies the y-coordinate of the arc’s starting point (in logical units). This point does not have to lie exactly on the arc.

x4

Specifies the x-coordinate of the arc’s endpoint (in logical units). This point does not have to lie exactly on the arc.

y4

Specifies the y-coordinate of the arc’s endpoint (in logical units). This point does not have to lie exactly on the arc.

lpRect

Specifies the bounding rectangle. You can pass either a CRect object or a pointer to a RECT structure for this parameter.

ptStart

Specifies the starting point of the arc. This point does not have to lie exactly on the arc. You can pass either a POINT structure or a CPoint object for this parameter.

ptEnd

Specifies the endpoint of the arc. This point does not have to lie exactly on the arc. You can pass either a POINT structure or a CPoint object for this parameter.

Remarks

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 x1, y1, x2, and y2 (or by lpRect). The starting and ending points of the arc are specified by x3, y3, x4, and y4 (or by ptStart and ptEnd).

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 current 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).

The figure drawn by this function extends up to but does not include the right and bottom coordinates. This means that the height of the figure is y2y1 and the width of the figure is x2x1. Both the width and the height of the bounding rectangle must be greater than 2 units and less than 32,767 units.

CDC OverviewClass MembersHierarchy Chart

See Also   CDC::Chord, ::Pie, RECT, POINT, CRect, CPoint