diff options
author | Aneesh Dogra <lionaneesh@gmail.com> | 2012-12-20 20:56:06 (GMT) |
---|---|---|
committer | Aneesh Dogra <lionaneesh@gmail.com> | 2012-12-20 20:56:06 (GMT) |
commit | ff3aed09182b839c7cc570fa316b780ceb02481a (patch) | |
tree | 0e0ee26eebb2b87a3c82e4ec94cff186360ed314 | |
parent | 19edf2339a8480dd735820d76502a18f74353e3e (diff) |
Fix constellation drawing.
-rwxr-xr-x | ConstellationsFlashCards.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ConstellationsFlashCards.py b/ConstellationsFlashCards.py index 70c02aa..9256efb 100755 --- a/ConstellationsFlashCards.py +++ b/ConstellationsFlashCards.py @@ -414,7 +414,7 @@ class ChartDisplay(Gtk.DrawingArea): (px, py) = self.radectoxy((ra, dec)) px = px + self.diameter / 2.0 py = py + self.diameter / 2.0 - starsize = 4 + 2 * int(7.0 - mag) + starsize = (4 + 2 * int(7.0 - mag))/5 px = px + self.margin - 2 + self.xoffset - starsize / 2 py = py + self.margin - 2 + self.yoffset - starsize / 2 if (mag <= 6.0): @@ -441,13 +441,15 @@ class ChartDisplay(Gtk.DrawingArea): py2 = py2 + self.diameter / 2.0 px2 = px2 + self.margin - 2 + self.xoffset py2 = py2 + self.margin - 2 + self.yoffset - self.ctx.move_to(px1, py1) - self.ctx.line_to(px2, py2) - self.ctx.stroke() + line_ctx = self.get_window().cairo_create() + line_ctx.move_to(px1, py1) + line_ctx.line_to(px2, py2) + line_ctx.stroke() def plot_star(self, px, py, starsize): + self.ctx = self.get_window().cairo_create() self.ctx.arc(px, py, starsize, 0, 360*64) - self.ctx.stroke() + self.ctx.fill() def pick_constellation(self): global seen |