diff options
author | Samus_ <mail2samus@gmail.com> | 2010-03-21 11:28:32 (GMT) |
---|---|---|
committer | Samus_ <mail2samus@gmail.com> | 2010-03-21 11:28:32 (GMT) |
commit | 75076e764ab3c2f7748d695fbb8be27c1edc8b56 (patch) | |
tree | dabc87ae3fab8facfee2b80e21d8fb2b7ea2345d | |
parent | 29dc8e75206a0b81822a4cdf314aa79f4e8e3e49 (diff) |
oh my gawd! it warks 8)
-rwxr-xr-x | fracciones.activity/gtkcake.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fracciones.activity/gtkcake.py b/fracciones.activity/gtkcake.py index f0ebeb0..3477bbe 100755 --- a/fracciones.activity/gtkcake.py +++ b/fracciones.activity/gtkcake.py @@ -77,7 +77,10 @@ class Cake(gtk.DrawingArea): """Enmascara la imagen de la torta y dibuja solo los trozos que no fueron seleccionados """ - image_ctx = cairo.Context(image) + dummy_image = cairo.ImageSurface(cairo.FORMAT_ARGB32, WIDTH, HEIGHT) + image_ctx = cairo.Context(dummy_image) + image_ctx.set_source_surface(image) + image_ctx.paint() image_ctx.set_operator(cairo.OPERATOR_CLEAR) for index, selected in enumerate(self.selected_list): if selected: @@ -92,7 +95,7 @@ class Cake(gtk.DrawingArea): angle_end) image_ctx.close_path() image_ctx.fill() - context.set_source_surface(image) + context.set_source_surface(dummy_image) context.paint() |