Merge pull request #28088 from Ghazi-raad:fix/drawcontours-line-type-swap-26413

Fix LINE_4/LINE_8 swap in drawContours (issue #26413)
This commit is contained in:
Alexander Smorkalov
2025-12-03 09:34:01 +03:00
committed by GitHub

View File

@@ -1667,7 +1667,7 @@ ThickLine( Mat& img, Point2l p0, Point2l p1, const void* color,
{
if( line_type < cv::LINE_AA )
{
if( line_type == 1 || line_type == 4 || shift == 0 )
if( line_type == 1 || line_type == 8 || shift == 0 )
{
p0.x = (p0.x + (XY_ONE>>1)) >> XY_SHIFT;
p0.y = (p0.y + (XY_ONE>>1)) >> XY_SHIFT;