- cr.save()
- cr.translate(rx, ry)
- cr.rotate(theta)
-
- if fill:
- cr.rectangle(0, 0, width, height)
- cr.set_source_rgba(fill_color[0], fill_color[1], fill_color[2], 0.8)
- cr.fill()
-
- if stroke:
- cr.rectangle(0, 0, width, height)
- cr.set_source_rgba(stroke_color[0], stroke_color[1], stroke_color[2], 0.5)
- cr.stroke()
- self.draw_dot(0, 0, 3.0, list(stroke_color) + [0.5])
+ self.draw_rect(rx, ry, width, height, theta, fill, fill_color, stroke,
+ stroke_color)