| 1920 | /* ----------------------------------------------------------------------------------------- */ |
| 1921 | |
| 1922 | void 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 | |
| 1941 | void fillPoly( Mat& img, const Point** pts, const int* npts, int ncontours, |
no test coverage detected