sw_engie: fix wrong boundary check.

this bounding box max indicates absolute positions,
not width/height size.

because of this, shape couldn't rendered properly,
when it's clipped out.

Change-Id: I0afb0d6e63d1b511b83716c55f55e3fd5370fdb8
This commit is contained in:
Hermet Park 2020-06-23 14:14:47 +09:00
parent a9d712e06e
commit 4f48c856f6

View file

@ -225,9 +225,7 @@ static bool _checkValid(const SwOutline* outline, const SwBBox& bbox, const SwSi
if (outline->ptsCnt == 0 || outline->cntrsCnt <= 0) return false; if (outline->ptsCnt == 0 || outline->cntrsCnt <= 0) return false;
//Check boundary //Check boundary
if ((bbox.min.x > clip.w || bbox.min.y > clip.h) || if (bbox.min.x >= clip.w || bbox.min.y >= clip.h || bbox.max.x <= 0 || bbox.max.y <= 0) return false;
(bbox.min.x + bbox.max.x < 0) ||
(bbox.min.y + bbox.max.y < 0)) return false;
return true; return true;
} }