From 3575fec9afc0d8f1d627a6960561bdfddabecfd7 Mon Sep 17 00:00:00 2001 From: remi-pr Date: Fri, 28 Oct 2016 15:11:31 +0200 Subject: [PATCH] Fixed the rotated method of all objects The rotated method of all objects was not using the origin argument but always self.point(0.5) even though it is all correctly handled in the rotate function they are all calling --- svgpathtools/path.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/svgpathtools/path.py b/svgpathtools/path.py index 764182d..d026e3d 100644 --- a/svgpathtools/path.py +++ b/svgpathtools/path.py @@ -612,7 +612,7 @@ class Line(object): point `origin` (a complex number). By default `origin` is either `self.point(0.5)`, or in the case that self is an Arc object, `origin` defaults to `self.center`.""" - return rotate(self, degs, origin=self.point(0.5)) + return rotate(self, degs, origin=origin) def translated(self, z0): """Returns a copy of self shifted by the complex quantity `z0` such @@ -856,7 +856,7 @@ class QuadraticBezier(object): point `origin` (a complex number). By default `origin` is either `self.point(0.5)`, or in the case that self is an Arc object, `origin` defaults to `self.center`.""" - return rotate(self, degs, origin=self.point(0.5)) + return rotate(self, degs, origin=origin) def translated(self, z0): """Returns a copy of self shifted by the complex quantity `z0` such @@ -1096,7 +1096,7 @@ class CubicBezier(object): point `origin` (a complex number). By default `origin` is either `self.point(0.5)`, or in the case that self is an Arc object, `origin` defaults to `self.center`.""" - return rotate(self, degs, origin=self.point(0.5)) + return rotate(self, degs, origin=origin) def translated(self, z0): """Returns a copy of self shifted by the complex quantity `z0` such @@ -1649,7 +1649,7 @@ class Arc(object): point `origin` (a complex number). By default `origin` is either `self.point(0.5)`, or in the case that self is an Arc object, `origin` defaults to `self.center`.""" - return rotate(self, degs, origin=self.center) + return rotate(self, degs, origin=origin) def translated(self, z0): """Returns a copy of self shifted by the complex quantity `z0` such @@ -2200,7 +2200,7 @@ class Path(MutableSequence): point `origin` (a complex number). By default `origin` is either `self.point(0.5)`, or in the case that self is an Arc object, `origin` defaults to `self.center`.""" - return rotate(self, degs, origin=self.point(0.5)) + return rotate(self, degs, origin=origin) def translated(self, z0): """Returns a copy of self shifted by the complex quantity `z0` such