mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Fix FS#9782 - lcd_bitmap_transparent_part clipping but keep smaller clipping code. The bitmap coordinates were not being adjusted when clipping left and top. Also fix for Gigabeat S.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19752 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
53a76de82b
commit
77649a7a2c
2 changed files with 32 additions and 8 deletions
|
|
@ -421,15 +421,27 @@ void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y,
|
|||
|
||||
if (x + width > current_vp->width)
|
||||
width = current_vp->width - x; /* Clip right */
|
||||
if (x < 0)
|
||||
width += x, x = 0; /* Clip left */
|
||||
|
||||
if (x < 0) /* Clip left */
|
||||
{
|
||||
width += x;
|
||||
src_x -= x;
|
||||
x = 0;
|
||||
}
|
||||
|
||||
if (width <= 0)
|
||||
return; /* nothing left to do */
|
||||
|
||||
if (y + height > current_vp->height)
|
||||
height = current_vp->height - y; /* Clip bottom */
|
||||
if (y < 0)
|
||||
height += y, y = 0; /* Clip top */
|
||||
|
||||
if (y < 0) /* Clip top */
|
||||
{
|
||||
height += y;
|
||||
src_y -= y;
|
||||
y = 0;
|
||||
}
|
||||
|
||||
if (height <= 0)
|
||||
return; /* nothing left to do */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue