projects
/
experiments
/
RadialSymmetry.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d97421f
)
Diagram.py: set color right before drawing the stroke in draw_line()
author
Antonio Ospite <ao2@ao2.it>
Thu, 18 Jun 2015 10:04:25 +0000
(12:04 +0200)
committer
Antonio Ospite <ao2@ao2.it>
Thu, 18 Jun 2015 10:04:25 +0000
(12:04 +0200)
Diagram.py
patch
|
blob
|
history
diff --git
a/Diagram.py
b/Diagram.py
index
ee7dd36
..
74c3bb2
100755
(executable)
--- a/
Diagram.py
+++ b/
Diagram.py
@@
-156,10
+156,10
@@
class Diagram(object):
def draw_line(self, x1, y1, x2, y2, stroke_color=[0, 0, 0, 1]):
cr = self.cr
- r, g, b, a = self.color_to_rgba(stroke_color)
- cr.set_source_rgba(r, g, b, a)
cr.move_to(x1, y1)
cr.line_to(x2, y2)
+ r, g, b, a = self.color_to_rgba(stroke_color)
+ cr.set_source_rgba(r, g, b, a)
cr.stroke()
def draw_rect_from_center(self, cx, cy, width, height, theta=0,