mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
Merge branch 4.x
This commit is contained in:
@@ -2035,9 +2035,12 @@ void fillPoly( InputOutputArray _img, const Point** pts, const int* npts, int nc
|
||||
edges.reserve( total + 1 );
|
||||
for (i = 0; i < ncontours; i++)
|
||||
{
|
||||
if (npts[i] > 0 && pts[i])
|
||||
const Point* currentContour = pts[i];
|
||||
const int currentContourLength = npts[i];
|
||||
if ( (currentContourLength > 0) && currentContour )
|
||||
{
|
||||
std::vector<Point2l> _pts(pts[i], pts[i] + npts[i]);
|
||||
AutoBuffer<Point2l> _pts(currentContourLength);
|
||||
std::copy(currentContour, currentContour+currentContourLength, _pts.data());
|
||||
CollectPolyEdges(img, _pts.data(), npts[i], edges, buf, line_type, shift, offset);
|
||||
}
|
||||
}
|
||||
@@ -2064,8 +2067,11 @@ void polylines( InputOutputArray _img, const Point* const* pts, const int* npts,
|
||||
|
||||
for( int i = 0; i < ncontours; i++ )
|
||||
{
|
||||
std::vector<Point2l> _pts(pts[i], pts[i]+npts[i]);
|
||||
PolyLine( img, _pts.data(), npts[i], isClosed, buf, thickness, line_type, shift );
|
||||
const Point* currentContour = pts[i];
|
||||
const int currentContourLength = npts[i];
|
||||
AutoBuffer<Point2l> _pts(currentContourLength);
|
||||
std::copy(currentContour, currentContour+currentContourLength, _pts.data());
|
||||
PolyLine( img, _pts.data(), currentContourLength, isClosed, buf, thickness, line_type, shift );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user