X-Git-Url: https://git.ao2.it/experiments/RadialSymmetry.git/blobdiff_plain/3ad27a2c463cbaeb6989828ed1925869e55e193a..d61a76f33cbf0f18f63e0b365e9d7f0ba6732323:/Diagram.py?ds=inline diff --git a/Diagram.py b/Diagram.py index 8d958f9..ff5a500 100755 --- a/Diagram.py +++ b/Diagram.py @@ -186,12 +186,13 @@ class Diagram(object): 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) @@ -244,7 +245,7 @@ class Diagram(object): 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)