Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/moon.py
diff options
context:
space:
mode:
authorGary Martin <gary@garycmartin.com>2009-11-27 01:22:07 (GMT)
committer Gary Martin <gary@garycmartin.com>2009-11-27 01:22:07 (GMT)
commit9ee948d694a52b91c3a1a9c2c144b54d08c4cf21 (patch)
treed52f1c652b0cd1623ce58557b70b2105db263d11 /moon.py
parentd150d6e618f9de9154b2e324cfeb4ed21dfbdb86 (diff)
Tidy grid line overlaps.
Diffstat (limited to 'moon.py')
-rwxr-xr-xmoon.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/moon.py b/moon.py
index 3a6e88a..e730411 100755
--- a/moon.py
+++ b/moon.py
@@ -403,6 +403,7 @@ class MoonActivity(activity.Activity):
self.image_pixmap.draw_line(rgc, HALF_SIZE + i, 0, HALF_SIZE + i, IMAGE_SIZE)
self.image_pixmap.draw_arc(rgc, False, int(HALF_SIZE * 0.15) + i, 0, IMAGE_SIZE - int(IMAGE_SIZE * 0.15), IMAGE_SIZE, 0, 360*64)
self.image_pixmap.draw_arc(rgc, False, int(HALF_SIZE * 0.48) + i, 0, IMAGE_SIZE - int(IMAGE_SIZE * 0.48) , IMAGE_SIZE, 0, 360*64)
+ for i in (-1, 0, 1):
self.image_pixmap.draw_line(bgc, 0, HALF_SIZE + i, IMAGE_SIZE, HALF_SIZE + i)
self.image_pixmap.draw_line(bgc, int(HALF_SIZE * 0.15), int(HALF_SIZE * 0.5) + i, IMAGE_SIZE - int(HALF_SIZE * 0.15), int(HALF_SIZE * 0.5) + i)
self.image_pixmap.draw_line(bgc, int(HALF_SIZE * 0.15), int(HALF_SIZE * 1.5) + i, IMAGE_SIZE - int(HALF_SIZE * 0.15), int(HALF_SIZE * 1.5) + i)
@@ -417,8 +418,10 @@ class MoonActivity(activity.Activity):
# Compass
# TODO: fix string index to support multi-byte texts
- self.image_pixmap.draw_line(bgc, 45 + 15, 24 + 15, 45 + 15, 68 + 15)
- self.image_pixmap.draw_line(rgc, 22 + 15, 48 + 15, 68 + 15, 48 + 15)
+ for i in (-1, 0, 1):
+ self.image_pixmap.draw_line(rgc, 22 + 15, 48 + 15 + i, 68 + 15, 48 + 15 + i)
+ for i in (-1, 0, 1):
+ self.image_pixmap.draw_line(bgc, 45 + 15 + i, 24 + 15, 45 + 15 + i, 68 + 15)
pango_layout.set_text(compass_text[0])
self.image_pixmap.draw_layout(bgc, 38 + 15, 15, pango_layout)
pango_layout.set_text(compass_text[1])