some debugging prints (need to fix the offsets, etc. for this copy bit)

This commit is contained in:
Jon Dowland 2008-02-01 20:43:14 +00:00
parent 361270d89a
commit 1fdc9d670f

View file

@ -73,9 +73,10 @@ class HellowWorldGTK:
# copy each patch into the texture pixbuf # copy each patch into the texture pixbuf
for patch in texture.patches: for patch in texture.patches:
print "about to copy patch %s\n"%patch.name print "about to copy patch %s (%d,%d)\n"% ( patch.name, patch.pixbuf.get_width(), patch.pixbuf.get_height())
width = min(patch.pixbuf.get_width(), int(texture.width)) width = max(patch.pixbuf.get_width(), int(texture.width) - patch.xoff)
height = min(patch.pixbuf.get_height(), int(texture.height)) height = max(patch.pixbuf.get_height(), int(texture.height) - patch.yoff)
print "debug: %d,%d,%d,%d\n" % (width,height,patch.xoff,patch.yoff)
patch.pixbuf.copy_area(0,0, patch.pixbuf.copy_area(0,0,
width, height, width, height,
texbuf, patch.xoff, patch.yoff) texbuf, patch.xoff, patch.yoff)