fix y offset bug

This commit is contained in:
Jon Dowland 2008-02-23 14:23:06 +00:00
parent 8290bace20
commit 7562e22498

View file

@ -49,16 +49,20 @@ class ImagesExample:
)) ))
pb = basepatch.get_pixbuf() pb = basepatch.get_pixbuf()
for (x,y) in [(0,0), (51,0), (104,16)]: for x,y in [(0,0), (51,0), (104,16)]:
x *= scale
y *= scale
image = gtk.Image() image = gtk.Image()
image.set_from_pixbuf(baseimage.get_pixbuf().copy()) image.set_from_pixbuf(baseimage.get_pixbuf().copy())
image.show() image.show()
dest_x = x * scale
dest_y = y * scale dest_x = x
dest_y = y
dest_width = pb.get_width() dest_width = pb.get_width()
dest_height = pb.get_height() dest_height = pb.get_height()
offset_x = x * scale dest_height -= y
offset_y = y * scale offset_x = x
offset_y = y
pb.composite( pb.composite(
image.get_pixbuf(), image.get_pixbuf(),