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,