renaming Gzv.ball_with_border to Gzv.point_with_border
authorLincoln de Sousa <lincoln@minaslivre.org>
Tue, 12 Aug 2008 22:58:20 +0000 (19:58 -0300)
committerLincoln de Sousa <lincoln@minaslivre.org>
Tue, 12 Aug 2008 22:58:20 +0000 (19:58 -0300)
gzv.py

diff --git a/gzv.py b/gzv.py
index 664b7f9..dd25983 100644 (file)
--- a/gzv.py
+++ b/gzv.py
@@ -355,7 +355,7 @@ class Gzv(GladeLoader):
 
         return False
 
-    def ball_width_border(self, ball):
+    def point_with_border(self, ball):
         iw, ih = self.draw.size_request()
         w = self.draw.get_allocation().width
         h = self.draw.get_allocation().height
@@ -375,8 +375,8 @@ class Gzv(GladeLoader):
 
     def draw_ball(self, ball):
         ctx = self.draw.window.cairo_create()
-        ctx.arc(self.ball_width_border(ball).x,
-                self.ball_width_border(ball).y,
+        ctx.arc(self.point_with_border(ball).x,
+                self.point_with_border(ball).y,
                 ball.radius, 0, 64*math.pi)
         ctx.set_source_rgba(0.0, 0.0, 0.5, 0.4)
         ctx.fill()
@@ -384,8 +384,8 @@ class Gzv(GladeLoader):
         if ball.selected:
             ctx.set_source_rgba(0.0, 0.5, 0.0, 0.4)
             ctx.set_line_width(5)
-            ctx.arc(self.ball_width_border(ball).x,
-                    self.ball_width_border(ball).y,
+            ctx.arc(self.point_with_border(ball).x,
+                    self.point_with_border(ball).y,
                     ball.radius+1, 0, 64*math.pi)
             ctx.stroke()
 
@@ -398,7 +398,7 @@ class Gzv(GladeLoader):
         if event.button == 1:
             for i in self.balls:
                 p1 = Point(event.x, event.y)
-                p2 = self.ball_width_border(i)
+                p2 = self.point_with_border(i)
                 if Point.pythagorean(p1, p2) < i.radius:
                     self.last_x = event.x - i.p.x
                     self.last_y = event.y - i.p.y