- cr.save()
- cr.translate(rx, ry)
- cr.rotate(theta)
-
- if fill:
- cr.rectangle(0, 0, width, height)
- r, g, b, a = self.color_to_rgba(fill_color)
- cr.set_source_rgba(r, g, b, a)
- cr.fill()
-
- if stroke:
- cr.rectangle(0, 0, width, height)
- r, g, b, a = self.color_to_rgba(stroke_color)
- cr.set_source_rgba(r, g, b, a)
- cr.stroke()
- self.draw_dot(0, 0, 3.0, stroke_color)
-
- cr.restore()
+ self.draw_rect(rx, ry, width, height, theta, fill, fill_color, stroke,
+ stroke_color)