Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
e4ca2c4e66
5 changed files with 3 additions and 6 deletions
|
@ -140,15 +140,12 @@ struct SpritePrivate
|
|||
if (!nullOrDisposed(bitmap))
|
||||
bmSize = Vec2i(bitmap->width(), bitmap->height());
|
||||
|
||||
if (mirrored)
|
||||
rect = rect.hFlipped();
|
||||
|
||||
/* Clamp the rectangle so it doesn't reach outside
|
||||
* the bitmap bounds */
|
||||
rect.w = clamp<int>(rect.w, 0, bmSize.x-rect.x);
|
||||
rect.h = clamp<int>(rect.h, 0, bmSize.y-rect.y);
|
||||
|
||||
quad.setTexRect(rect);
|
||||
quad.setTexRect(mirrored ? rect.hFlipped() : rect);
|
||||
|
||||
quad.setPosRect(FloatRect(0, 0, rect.w, rect.h));
|
||||
recomputeBushDepth();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue