diff options
author | mascha@ma-scha.de <mascha@ma-scha.de@8f060a39-251c-0410-b1f3-431655927647> | 2008-02-14 15:54:10 (GMT) |
---|---|---|
committer | mascha@ma-scha.de <mascha@ma-scha.de@8f060a39-251c-0410-b1f3-431655927647> | 2008-02-14 15:54:10 (GMT) |
commit | 9187f0ea977bcc678618af3528222d5e134bc76c (patch) | |
tree | 9706aaf9221fa4886395b3b9abb9614aff539d34 /src/Links.py | |
parent | 63377b334e69e89e5521861adc1cdda34d08a3e7 (diff) |
o add foreground and background color selection/setting support
git-svn-id: http://labyrinth.googlecode.com/svn/trunk@181 8f060a39-251c-0410-b1f3-431655927647
Diffstat (limited to 'src/Links.py')
-rw-r--r-- | src/Links.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Links.py b/src/Links.py index 1a86501..0c00325 100644 --- a/src/Links.py +++ b/src/Links.py @@ -24,7 +24,6 @@ import gtk import BaseThought import utils -import xml.dom.minidom as dom import math def norm(x, y): @@ -118,9 +117,18 @@ class Link (gobject.GObject): cwidth = context.get_line_width () context.set_line_width (self.strength) context.move_to (self.start[0], self.start[1]) + + #dx = self.start[0] - self.end[0] + #dy = self.start[1] - self.end[1] + #x2 = self.end[0] + (dx * 2 / 3) + #y2 = self.end[1] + (dy / 3) + #x3 = self.end[0] + (dx / 3) + #y3 = self.end[1] + (dy * 2 / 3) + #context.curve_to(x2,y2, x3, y3, self.end[0], self.end[1]) context.line_to (self.end[0], self.end[1]) + context.stroke () - context.set_line_width (cwidth) + if self.selected: st_norm = norm(self.start, self.end) start_x1 = self.start[0] + st_norm[1]*(5+self.strength) |