[−][src]Function opencv::imgproc::ellipse_new_rotated_rect
pub fn ellipse_new_rotated_rect(
img: &mut dyn ToInputOutputArray,
_box: &RotatedRect,
color: Scalar,
thickness: i32,
line_type: i32
) -> Result<()>
Draws a simple or thick elliptic arc or fills an ellipse sector.
The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic
arc, or a filled ellipse sector. The drawing code uses general parametric form.
A piecewise-linear curve is used to approximate the elliptic arc
boundary. If you need more control of the ellipse rendering, you can retrieve the curve using
#ellipse2Poly and then render it with #polylines or fill it with #fillPoly. If you use the first
variant of the function and want to draw the whole ellipse, not an arc, pass startAngle=0
and
endAngle=360
. If startAngle
is greater than endAngle
, they are swapped. The figure below explains
the meaning of the parameters to draw the blue arc.
Parameters
- img: Image.
- center: Center of the ellipse.
- axes: Half of the size of the ellipse main axes.
- angle: Ellipse rotation angle in degrees.
- startAngle: Starting angle of the elliptic arc in degrees.
- endAngle: Ending angle of the elliptic arc in degrees.
- color: Ellipse color.
- thickness: Thickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
- lineType: Type of the ellipse boundary. See #LineTypes
- shift: Number of fractional bits in the coordinates of the center and values of axes.
Overloaded parameters
- img: Image.
- box: Alternative ellipse representation via RotatedRect. This means that the function draws an ellipse inscribed in the rotated rectangle.
- color: Ellipse color.
- thickness: Thickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
- lineType: Type of the ellipse boundary. See #LineTypes
C++ default parameters
- thickness: 1
- line_type: LINE_8