MCPcopy Create free account
hub / github.com/creatale/node-dv / fillConvexPoly

Function fillConvexPoly

deps/opencv/modules/core/src/drawing.cpp:1922–1938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1920/* ----------------------------------------------------------------------------------------- */
1921
1922void fillConvexPoly( Mat& img, const Point* pts, int npts,
1923 const Scalar& color, int line_type, int shift )
1924{
1925 if( !pts || npts <= 0 )
1926 return;
1927
1928 if( line_type == CV_AA && img.depth() != CV_8U )
1929 line_type = 8;
1930
1931 double buf[4];
1932 CV_Assert( 0 <= shift && shift <= XY_SHIFT );
1933 scalarToRawData(color, buf, img.type(), 0);
1934 vector<Point2l> _pts;
1935 for( int n = 0; n < npts; n++ )
1936 _pts.push_back(Point2l(pts[n].x, pts[n].y));
1937 FillConvexPoly( img, _pts.data(), npts, buf, line_type, shift );
1938}
1939
1940
1941void fillPoly( Mat& img, const Point** pts, const int* npts, int ncontours,

Callers 2

fillConvexPolyMethod · 0.85
cvFillConvexPolyFunction · 0.85

Calls 6

scalarToRawDataFunction · 0.85
FillConvexPolyFunction · 0.85
dataMethod · 0.80
depthMethod · 0.45
typeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected