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
pull/5/head
remi-pr 2016-10-28 15:11:31 +02:00 committed by GitHub
parent c159e5b0e7
commit 3575fec9af
1 changed files with 5 additions and 5 deletions

View File

@ -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