From 235de5a456439afedaf1b66e8ff0f0b1ce139dd7 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Sat, 23 Feb 2008 18:47:48 +0000 Subject: [PATCH] add mask stuff. although it doesn't work yet. --- tools/cleanroom/images.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/cleanroom/images.py b/tools/cleanroom/images.py index 689b1ba3..bbf2f5af 100644 --- a/tools/cleanroom/images.py +++ b/tools/cleanroom/images.py @@ -38,6 +38,7 @@ class ImagesExample: gtk.gdk.INTERP_NEAREST )) baseimage.show() + baseimage.get_pixbuf().add_alpha(True,chr(0),chr(255),chr(255)) basepatch = gtk.Image() basepatch.set_from_file("../../patches/ps20a0.gif") @@ -48,6 +49,7 @@ class ImagesExample: gtk.gdk.INTERP_NEAREST )) pb = basepatch.get_pixbuf() + pb.add_alpha(True,chr(0),chr(255),chr(255)) for x,y in [(0,0), (24,24), (104,16), (24,104), (-16,0), (0,-16)]: x *= scale @@ -56,7 +58,6 @@ class ImagesExample: image.set_from_pixbuf(baseimage.get_pixbuf().copy()) image.show() - # dest_x >= 0 && dest_x + dest_width <= dest->width dest_x = max(0, x) dest_y = max(0, y) dest_height = min(pb.get_height(), image.get_pixbuf().get_height() - dest_y)