diff options
author | Andrés Ambrois <andresambrois@gmail.com> | 2008-09-15 20:31:26 (GMT) |
---|---|---|
committer | Andrés Ambrois <andresambrois@gmail.com> | 2008-09-15 20:31:26 (GMT) |
commit | 04f71ee212121996b7094d254e22c6cb4fe876af (patch) | |
tree | 3a2710ed89d1c89f542f196eb0f39615d719127b | |
parent | 629fe20da1281cd4fe82ca491ec96cf823b28db3 (diff) |
Correct usage of cairo.Context.arc
-rw-r--r-- | boardwidget.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/boardwidget.py b/boardwidget.py index 9382092..b78b842 100644 --- a/boardwidget.py +++ b/boardwidget.py @@ -19,6 +19,7 @@ import gobject import gtk +from math import pi as PI import logging @@ -115,7 +116,7 @@ class GoBoardWidget(gtk.Widget): elif self.size == 9 : seq = [ 3, 7 ] # set the middle singleton - ctx.arc( self.unit * 5, self.unit * 5, 3, 0, -1e-10) + ctx.arc( self.unit * 5, self.unit * 5, 3, 0, PI * 2) ctx.fill_preserve() ctx.stroke() else : @@ -125,7 +126,7 @@ class GoBoardWidget(gtk.Widget): #TODO: adjust size for teeny boards for x in seq : for y in seq : - ctx.arc( self.unit * x, self.unit * y, 3, 0, -1e-10) + ctx.arc( self.unit * x, self.unit * y, 3, 0, PI * 2) ctx.fill_preserve() ctx.stroke() @@ -203,7 +204,7 @@ class GoBoardWidget(gtk.Widget): else: ctx.set_source_rgba(0xff, 0xff, 0xff, .5 ) - ctx.arc( self.lastX, self.lastY, self.unit/2 -4, 0, -1e-10) + ctx.arc( self.lastX, self.lastY, self.unit/2 -4, 0, 2 * PI) ctx.fill_preserve() ctx.stroke() del ctx |