mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-02 07:25:45 -04:00
adjust blit w/h if patch x/y are negative
This commit is contained in:
parent
12d6d8ce02
commit
dd9340af96
1 changed files with 4 additions and 1 deletions
|
@ -61,7 +61,10 @@ class ImagesExample:
|
|||
dest_y = max(0, y)
|
||||
dest_height = min(pb.get_height(), image.get_pixbuf().get_height() - dest_y)
|
||||
dest_width = min(pb.get_width(), image.get_pixbuf().get_width() - dest_x)
|
||||
dest_x + dest_width
|
||||
if x < 0:
|
||||
dest_width += x
|
||||
if y < 0:
|
||||
dest_height += y
|
||||
offset_x = x
|
||||
offset_y = y
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue