mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
sw_engine shape/image: substituting logical 'and' with 'or'
In the case when the height or width of the bounding box is 0 it is not necessary to calculate Rle.
This commit is contained in:
parent
6e59116137
commit
74b27c74af
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue