mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
do not apply clipLine if there are fractional bits
Currently, the clip proposal is wrong if there are fractional bits. The fractional part could be canceled to make the clip right, but we can assume in this case that the user is focused on precision and does not want that clip
This commit is contained in:
parent
70294e63af
commit
0d31c74dc5
@ -1647,7 +1647,7 @@ ThickLine( Mat& img, Point2l p0, Point2l p1, const void* color,
|
||||
static const double INV_XY_ONE = 1./static_cast<double>(XY_ONE);
|
||||
|
||||
Rect_<int64> 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);
|
||||
|
Loading…
Reference in New Issue
Block a user