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

Method fillPoly

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

Source from the content-addressed store, hash-verified

2309
2310
2311void cv::fillPoly(InputOutputArray _img, InputArrayOfArrays pts,
2312 const Scalar& color, int lineType, int shift, Point offset)
2313{
2314 Mat img = _img.getMat();
2315 int i, ncontours = (int)pts.total();
2316 if( ncontours == 0 )
2317 return;
2318 AutoBuffer<Point*> _ptsptr(ncontours);
2319 AutoBuffer<int> _npts(ncontours);
2320 Point** ptsptr = _ptsptr;
2321 int* npts = _npts;
2322
2323 for( i = 0; i < ncontours; i++ )
2324 {
2325 Mat p = pts.getMat(i);
2326 CV_Assert(p.checkVector(2, CV_32S) >= 0);
2327 ptsptr[i] = (Point*)p.data;
2328 npts[i] = p.rows*p.cols*p.channels()/2;
2329 }
2330 fillPoly(img, (const Point**)ptsptr, npts, (int)ncontours, color, lineType, shift, offset);
2331}
2332
2333
2334void cv::polylines(InputOutputArray _img, InputArrayOfArrays pts,

Callers

nothing calls this directly

Calls 5

fillPolyFunction · 0.85
checkVectorMethod · 0.80
getMatMethod · 0.45
totalMethod · 0.45
channelsMethod · 0.45

Tested by

no test coverage detected