Function fill_convex_poly

Source
pub fn fill_convex_poly(
    img: &mut impl ToInputOutputArray,
    points: &impl ToInputArray,
    color: Scalar,
    line_type: i32,
    shift: i32,
) -> Result<()>
Expand description

Fills a convex polygon.

The function cv::fillConvexPoly draws a filled convex polygon. This function is much faster than the function fill_poly . It can fill not only convex polygons but any monotonic polygon without self-intersections, that is, a polygon whose contour intersects every horizontal line (scan line) twice at the most (though, its top-most and/or the bottom edge could be horizontal).

§Parameters

  • img: Image.
  • points: Polygon vertices.
  • color: Polygon color.
  • lineType: Type of the polygon boundaries. See [line_types]
  • shift: Number of fractional bits in the vertex coordinates.

§C++ default parameters

  • line_type: LINE_8
  • shift: 0