cr.set_source_rgba(r, g, b, a)
cr.stroke()
- def draw_dot(self, cx, cy, size=10.0, fill_color=[0, 0, 0, 0.5]):
+ def draw_circle(self, cx, cy, size=10.0, fill_color=[0, 0, 0, 0.5],
+ stroke_color=None):
cr = self.cr
cr.save()
- r, g, b, a = self.color_to_rgba(fill_color)
- cr.set_source_rgba(r, g, b, a)
cr.arc(cx, cy, size, 0, 2 * pi)
- cr.fill()
+
+ if fill_color:
+ r, g, b, a = self.color_to_rgba(fill_color)
+ cr.set_source_rgba(r, g, b, a)
+ cr.fill()
+
+ if stroke_color:
+ r, g, b, a = self.color_to_rgba(stroke_color)
+ cr.set_source_rgba(r, g, b, a)
+ cr.stroke()
+
cr.restore()
def normalized_angle_01(self, theta):