mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
gl_engine: Fix the wrong bounds cause composition not correct
The bounds should allow negative origins, only zero width or height bounds needs discard.
This commit is contained in:
parent
18db3ab1fd
commit
08e88c8df1
1 changed files with 1 additions and 1 deletions
|
@ -220,7 +220,7 @@ RenderRegion GlGeometry::getBounds() const
|
|||
static_cast<int32_t>(ceil(right - floor(left))),
|
||||
static_cast<int32_t>(ceil(bottom - floor(top))),
|
||||
};
|
||||
if (bounds.x < 0 || bounds.y < 0 || bounds.w < 0 || bounds.h < 0) {
|
||||
if (bounds.w < 0 || bounds.h < 0) {
|
||||
return mBounds;
|
||||
} else {
|
||||
return bounds;
|
||||
|
|
Loading…
Add table
Reference in a new issue