diff options
author | Kshitij Kumar <kshitijakumar@gmail.com> | 2013-01-13 14:35:38 (GMT) |
---|---|---|
committer | Kshitij Kumar <kshitijakumar@gmail.com> | 2013-01-13 14:35:38 (GMT) |
commit | 0cb5f5fc10a5d11b2589c7a3d0fc416d7eed36b1 (patch) | |
tree | ddba50d5a52b9f7a708ad4a181ca1f0abe3a1e8a | |
parent | 6b1362cb6e694ea9810a0464f9c24247badcddac (diff) |
testing some changes
-rwxr-xr-x | moon.py | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -302,10 +302,18 @@ class MoonActivity(activity.Activity): #self.image_pixbuf.draw_rectangle(self.gc, True, 0, 0, IMAGE_SIZE, IMAGE_SIZE) # Create a 1bit shadow mask - 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) + - + 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) if self.data_model.phase_of_moon <= .25: |