fillPoly
import { fillPoly } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
example: samples/cpp/tutorial_code/ImgProc/basic_drawing/Drawing_1.cpp
An example using drawing functions
Check tutorial_random_generator_and_text "the corresponding tutorial" for more details
Fills the area bounded by one or more polygons.
The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill complex areas, for example, areas with holes, contours with self-intersections (some of their parts), and so forth.
fillPoly(img: Mat, pts: MatVector, color: Scalar, lineType: number, shift: number, offset: Point): void;4 available overloads
fillPoly(img: Mat, pts: MatVector, color: Scalar): void;fillPoly(img: Mat, pts: MatVector, color: Scalar, lineType: number): void;fillPoly(img: Mat, pts: MatVector, color: Scalar, lineType: number, shift: number): void;fillPoly(img: Mat, pts: MatVector, color: Scalar, lineType: number, shift: number, offset: Point): void;imgInput/output value, modified by the native operation. Image.
ptsArray of polygons where each polygon is represented as an array of points.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.
offsetOptional offset of all points of the contours.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.