cr.restore()
- def draw_rect(self, x, y, width, height, fill=True, fill_color=[1, 1, 1, 0.8],
+ def draw_rect(self, x, y, width, height, theta=0, fill=True, fill_color=[1, 1, 1, 0.8],
stroke=False, stroke_color=[0, 0, 0, 0.5]):
cr = self.cr
cr.save()
cr.translate(x, y)
+ cr.rotate(theta)
if fill:
cr.rectangle(0, 0, width, height)
cr.rotate(theta)
if bb_fill or bb_stroke:
- self.draw_rect(bb[0], bb[1], bb[2], bb[3], bb_fill, bb_fill_color, bb_stroke, bb_stroke_color)
+ self.draw_rect(bb[0], bb[1], bb[2], bb[3], 0, bb_fill, bb_fill_color, bb_stroke, bb_stroke_color)
r, g, b, a = self.color_to_rgba(color)
cr.set_source_rgba(r, g, b, a)