X-Git-Url: https://git.ao2.it/flexagon-toolkit.git/blobdiff_plain/b0d293a76ed3a595754b643f48b2f2d1b03395f6..2fde23a2e920ed2dab6dfd661077c251f28578db:/src/diagram/cairo_diagram.py diff --git a/src/diagram/cairo_diagram.py b/src/diagram/cairo_diagram.py index 9aab30e..fd632d7 100755 --- a/src/diagram/cairo_diagram.py +++ b/src/diagram/cairo_diagram.py @@ -143,20 +143,6 @@ class CairoDiagram(Diagram): cr.line_to(x2, y2) self._stroke(stroke_color) - def draw_rect_from_center(self, cx, cy, width, height, theta=0.0, - stroke_color=None, - fill_color=(1, 1, 1, 0.8)): - # the position of the center of a rectangle at (0,0) - mx = width / 2.0 - my = height / 2.0 - - # calculate the position of the bottom-left corner after rotating the - # rectangle around the center - rx = cx - (mx * cos(theta) - my * sin(theta)) - ry = cy - (mx * sin(theta) + my * cos(theta)) - - self.draw_rect(rx, ry, width, height, theta, stroke_color, fill_color) - def draw_rect(self, x, y, width, height, theta=0, stroke_color=None, fill_color=(1, 1, 1, 0.8)):