projects
/
cascardo
/
movie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
715cd1b
)
renaming Gzv.ball_with_border to Gzv.point_with_border
author
Lincoln de Sousa
<lincoln@minaslivre.org>
Tue, 12 Aug 2008 22:58:20 +0000
(19:58 -0300)
committer
Lincoln de Sousa
<lincoln@minaslivre.org>
Tue, 12 Aug 2008 22:58:20 +0000
(19:58 -0300)
gzv.py
patch
|
blob
|
history
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
return False
- def
ball_wid
th_border(self, ball):
+ def
point_wi
th_border(self, ball):
iw, ih = self.draw.size_request()
w = self.draw.get_allocation().width
h = self.draw.get_allocation().height
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()
def draw_ball(self, ball):
ctx = self.draw.window.cairo_create()
- ctx.arc(self.
ball_wid
th_border(ball).x,
- self.
ball_wid
th_border(ball).y,
+ ctx.arc(self.
point_wi
th_border(ball).x,
+ self.
point_wi
th_border(ball).y,
ball.radius, 0, 64*math.pi)
ctx.set_source_rgba(0.0, 0.0, 0.5, 0.4)
ctx.fill()
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)
if ball.selected:
ctx.set_source_rgba(0.0, 0.5, 0.0, 0.4)
ctx.set_line_width(5)
- ctx.arc(self.
ball_wid
th_border(ball).x,
- self.
ball_wid
th_border(ball).y,
+ ctx.arc(self.
point_wi
th_border(ball).x,
+ self.
point_wi
th_border(ball).y,
ball.radius+1, 0, 64*math.pi)
ctx.stroke()
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)
if event.button == 1:
for i in self.balls:
p1 = Point(event.x, event.y)
- p2 = self.
ball_wid
th_border(i)
+ p2 = self.
point_wi
th_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
if Point.pythagorean(p1, p2) < i.radius:
self.last_x = event.x - i.p.x
self.last_y = event.y - i.p.y