diff --git a/modules/imgproc/src/drawing.cpp b/modules/imgproc/src/drawing.cpp index f1049ed394..b722016da6 100644 --- a/modules/imgproc/src/drawing.cpp +++ b/modules/imgproc/src/drawing.cpp @@ -1647,7 +1647,7 @@ ThickLine( Mat& img, Point2l p0, Point2l p1, const void* color, static const double INV_XY_ONE = 1./static_cast(XY_ONE); Rect_ boundingRect(Point2l(0, 0), (Size2l)img.size()); - if( (thickness > 1) && ( !boundingRect.contains(p0) || !boundingRect.contains(p1) ) ) + if( (thickness > 1) && (shift == 0) && ( !boundingRect.contains(p0) || !boundingRect.contains(p1) ) ) { const int margin = thickness; const Point2l offset(margin, margin);