Revert "sw_engine shape/image: substituting logical 'and' with 'or'"

This reverts commit 74b27c74af.

This patch breaks Stroke example. 1 line drawings...

There is a possibility that less 1 (i.e: 0.5) width axis-aligned line drawings...

So logically "&&" is correct.
This commit is contained in:
Hermet Park 2021-03-09 20:13:44 +09:00
parent b5bc73849c
commit 5e01fd8b4b
2 changed files with 2 additions and 2 deletions

View file

@ -68,7 +68,7 @@ static bool _updateBBox(const SwOutline* outline, SwBBox& bbox, const SwSize& cl
bbox.max.x = min(bbox.max.x, clip.w);
bbox.max.y = min(bbox.max.y, clip.h);
if (xMax - xMin < 1 || yMax - yMin < 1) return false;
if (xMax - xMin < 1 && yMax - yMin < 1) return false;
return true;
}

View file

@ -193,7 +193,7 @@ static bool _updateBBox(const SwOutline* outline, SwBBox& bbox)
bbox.min.y = yMin >> 6;
bbox.max.y = (yMax + 63) >> 6;
if (xMax - xMin < 1 || yMax - yMin < 1) return false;
if (xMax - xMin < 1 && yMax - yMin < 1) return false;
return true;
}