From 350bd1d7d169f60f20ab95e1d7a117d48dea3b87 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Thu, 18 Jun 2015 12:04:25 +0200 Subject: [PATCH] Diagram.py: set color right before drawing the stroke in draw_line() --- Diagram.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, -- 2.1.4