Use CLIP template for clipping in the SAGA engine
svn-id: r29855
This commit is contained in:
parent
40661e5698
commit
1e483cc857
5 changed files with 11 additions and 44 deletions
|
@ -207,15 +207,8 @@ void Sprite::drawClip(Surface *ds, const Rect &clipRect, const Point &spritePoin
|
|||
bufRowPointer = (byte *)ds->pixels + ds->pitch * spritePointer.y;
|
||||
srcRowPointer = spriteBuffer;
|
||||
|
||||
clipWidth = width;
|
||||
if (width > (clipRect.right - spritePointer.x)) {
|
||||
clipWidth = (clipRect.right - spritePointer.x);
|
||||
}
|
||||
|
||||
clipHeight = height;
|
||||
if (height > (clipRect.bottom - spritePointer.y)) {
|
||||
clipHeight = (clipRect.bottom - spritePointer.y);
|
||||
}
|
||||
clipWidth = CLIP(width, 0, clipRect.right - spritePointer.x);
|
||||
clipHeight = CLIP(height, 0, clipRect.bottom - spritePointer.y);
|
||||
|
||||
jo = 0;
|
||||
io = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue