mirror of https://github.com/kivy/kivy.git
graphics/rotate: support 2 member for origin in Rotate constructor. closes #1671
This commit is contained in:
parent
0eb61594f8
commit
0625e42d72
|
@ -584,7 +584,13 @@ cdef class Rotate(Transform):
|
|||
if 'angle' in kwargs:
|
||||
self._angle = kwargs['angle']
|
||||
if 'origin' in kwargs:
|
||||
self._origin = kwargs['origin']
|
||||
origin = kwargs['origin']
|
||||
if len(origin) == 3:
|
||||
self._origin = tuple(origin)
|
||||
elif len(origin) == 2:
|
||||
self._origin = (origin[0], origin[1], 0.)
|
||||
else:
|
||||
raise Exception('invalid number of components in origin')
|
||||
|
||||
self.compute()
|
||||
|
||||
|
|
Loading…
Reference in New Issue