mirror of
https://github.com/opencv/opencv.git
synced 2025-06-16 23:00:51 +08:00
keep 2L precision
This commit is contained in:
parent
97a78da6c6
commit
70294e63af
@ -1646,8 +1646,8 @@ ThickLine( Mat& img, Point2l p0, Point2l p1, const void* color,
|
|||||||
{
|
{
|
||||||
static const double INV_XY_ONE = 1./static_cast<double>(XY_ONE);
|
static const double INV_XY_ONE = 1./static_cast<double>(XY_ONE);
|
||||||
|
|
||||||
Rect boundingRect = Rect(Point(0, 0), img.size());
|
Rect_<int64> boundingRect(Point2l(0, 0), (Size2l)img.size());
|
||||||
if (!boundingRect.contains(p0) || !boundingRect.contains(p1))
|
if( (thickness > 1) && ( !boundingRect.contains(p0) || !boundingRect.contains(p1) ) )
|
||||||
{
|
{
|
||||||
const int margin = thickness;
|
const int margin = thickness;
|
||||||
const Point2l offset(margin, margin);
|
const Point2l offset(margin, margin);
|
||||||
|
Loading…
Reference in New Issue
Block a user