From 3282e93ea1ff14cb8eb5e358fde68aeebe55e7e5 Mon Sep 17 00:00:00 2001 From: Kshitij Kumar Date: Sun, 13 Jan 2013 14:48:22 +0000 Subject: reverting previous changes --- diff --git a/moon.py b/moon.py index 0cb753e..3d1ddca 100755 --- a/moon.py +++ b/moon.py @@ -302,18 +302,10 @@ class MoonActivity(activity.Activity): #self.image_pixbuf.draw_rectangle(self.gc, True, 0, 0, IMAGE_SIZE, IMAGE_SIZE) # Create a 1bit shadow mask - - - cr = cairo.Context(cairo_surface) - cr.rectangle(0, 0, IMAGE_SIZE, IMAGE_SIZE) - cr.set_source_rgb(0.0, 0.0, 0.0) - cr.fill() - self.image_pixbuf_get_from_surface(cairo_surface, 0, 0, IMAGE_SIZE, IMAGE_SIZE) - self.image.set_from_pixbuf(self.image_pixbuf) - - #mask_pixbuf = cairo_surface(self.image_pixbuf, IMAGE_SIZE, IMAGE_SIZE, depth=1) - #kgc = mask_pixbuf.new_gc(foreground=self.black_alloc_color) - #wgc = mask_pixbuf.new_gc(foreground=self.white_alloc_color) - #mask_pixbuf.draw_rectangle(kgc, True, 0, 0, IMAGE_SIZE, IMAGE_SIZE) + mask_pixbuf = cairo_surface(self.image_pixbuf, IMAGE_SIZE, IMAGE_SIZE, depth=1) + kgc = mask_pixbuf.new_gc(foreground=self.black_alloc_color) + wgc = mask_pixbuf.new_gc(foreground=self.white_alloc_color) + mask_pixbuf.draw_rectangle(kgc, True, 0, 0, IMAGE_SIZE, IMAGE_SIZE) if self.data_model.phase_of_moon <= .25: -- cgit v0.9.1