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

◆ draw_pie() [2/4]

void xtd::drawing::graphics::draw_pie ( const xtd::drawing::pen pen,
const xtd::drawing::rectangle_f rect,
float  start_angle,
float  sweep_angle 
)

Draws a pie shape defined by an ellipse specified by a xtd::drawing::rectangle_f structure and two radial lines.

Parameters
penxtd::drawing::pen that determines the color, width, and style of the pie shape.
rectxtd::drawing::rectangle_f structure that represents 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. 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.