Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2013-01-13 18:24:42 (GMT)
committer Walter Bender <walter.bender@gmail.com>2013-01-13 18:24:42 (GMT)
commit1db51734219d25e82c7d03f0084515c8dd70c13f (patch)
tree974214aa8737f299bff68733347d2e16d14bec72
parenteb715a84f42aa39c7571915fdd84eeb7d05a51e3 (diff)
test of moon_pixbuf
-rwxr-xr-xmoon.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/moon.py b/moon.py
index 9337d06..6a0e839 100755
--- a/moon.py
+++ b/moon.py
@@ -293,8 +293,8 @@ class MoonActivity(activity.Activity):
self.image_pixbuf = Gdk.pixbuf_get_from_surface(cairo_surface, 0, 0, IMAGE_SIZE, IMAGE_SIZE)
#Write pixbuf to Gtk.Image
self.image.set_from_pixbuf(self.image_pixbuf)
- return
+ '''
#self.image_pixbuf = cairo_surface(None, IMAGE_SIZE, IMAGE_SIZE)
#self.gc = self.image_pixbuf.new_gc(foreground=self.black_alloc_color)
#self.image.set_from_pixbuf(self.image_pixbuf, None)
@@ -334,11 +334,14 @@ class MoonActivity(activity.Activity):
mask_pixbuf.draw_rectangle(wgc, True, 0, 0, HALF_SIZE, IMAGE_SIZE)
mask_pixbuf.draw_arc(kgc, True, HALF_SIZE - int(arc_scale / 2), 0, arc_scale, IMAGE_SIZE, 5760, 11520)
maskgc = self.image_pixbuf.new_gc(clip_mask=mask_pixbuf)
+ '''
# Modified image based on public domain photo by John MacCooey
moon_pixbuf = self.moon_stamp.scale_simple(IMAGE_SIZE, IMAGE_SIZE,
GdkPixbuf.InterpType.BILINEAR)
+ self.image.set_from_pixbuf(moon_pixbuf)
+ '''
# Composite bright Moon image and semi-transparant Moon for shadow detail
dark_pixbuf = GdkPixbuf.Pixbuf(GdkPixbuf.Colorspace.RGB, True, 8, IMAGE_SIZE, IMAGE_SIZE)
dark_pixbuf.fill(0x00000000)
@@ -381,7 +384,7 @@ class MoonActivity(activity.Activity):
elif self.show_grid:
# Draw grid for north hemi
self.draw_grid(_("NSEW"))
-
+ '''
self.image.queue_draw()
# Update the Moon image in another 5min
@@ -699,4 +702,4 @@ class DataModel():
next = time.mktime(time.strptime(date_string[:-1], self.date_format))
if next >= now:
return next - now
- return -1 \ No newline at end of file
+ return -1