mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-01 13:25:46 -04:00
fix/tidy up the clipping so far
This commit is contained in:
parent
5e070745a6
commit
58efd180c3
1 changed files with 4 additions and 4 deletions
|
@ -49,7 +49,7 @@ class ImagesExample:
|
|||
))
|
||||
pb = basepatch.get_pixbuf()
|
||||
|
||||
for x,y in [(0,0), (51,0), (104,16), (192,0)]:
|
||||
for x,y in [(0,0), (24,24), (104,16), (24,104)]:
|
||||
x *= scale
|
||||
y *= scale
|
||||
image = gtk.Image()
|
||||
|
@ -58,9 +58,9 @@ class ImagesExample:
|
|||
|
||||
dest_x = x
|
||||
dest_y = y
|
||||
dest_width = pb.get_width()
|
||||
dest_height = pb.get_height()
|
||||
dest_height -= 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
|
||||
offset_x = x
|
||||
offset_y = y
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue