xtd 0.2.0
Loading...
Searching...
No Matches

◆ draw_pie() [4/4]

void xtd::drawing::graphics::draw_pie ( const xtd::drawing::pen pen,
float  x,
float  y,
float  width,
float  height,
float  start_angle,
float  sweep_angle 
)

Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.

Parameters
penxtd::drawing::pen that determines the color, width, and style of the pie shape.
xThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
yThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
widthWidth of the bounding rectangle that defines the ellipse from which the pie shape comes.
heughtHeight of the bounding rectangle that defines the ellipse from which the pie shape comes.
start_angleAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweep_angleAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.
Remarks
This method draws a pie shape defined by an arc of an ellipse and the two radial lines that intersect with the endpoints of the arc. The ellipse is defined by the bounding rectangle described by the x, y, width, and height parameters. The pie shape consists of the two radial lines defined by the start_angle and sweep_angle parameters, and the arc between the intersections of those radial lines with the ellipse.
If the sweep_angle parameter is greater than 360 degrees or less than -360 degrees, it is treated as if it were 360 degrees or -360 degrees, respectively.