From: Antonio Ospite Date: Thu, 18 Jun 2015 10:04:25 +0000 (+0200) Subject: Diagram.py: set color right before drawing the stroke in draw_line() X-Git-Url: https://git.ao2.it/experiments/RadialSymmetry.git/commitdiff_plain/350bd1d7d169f60f20ab95e1d7a117d48dea3b87?ds=inline Diagram.py: set color right before drawing the stroke in draw_line() --- diff --git a/Diagram.py b/Diagram.py index ee7dd36..74c3bb2 100755 --- 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,