|
|
@@ -9,7 +9,7 @@ class TransformationTracker(GestureTracker):
|
|
|
Tracker for linear transformations. This implementation detects rotation,
|
|
|
scaling and translation using the centroid of all touch points.
|
|
|
"""
|
|
|
- __gesture_types__ = ['rotate', 'pinch', 'move']
|
|
|
+ gesture_types = ['rotate', 'pinch', 'move']
|
|
|
|
|
|
def __init__(self, window=None):
|
|
|
super(TransformationTracker, self).__init__(window)
|
|
|
@@ -77,7 +77,7 @@ class RotationGesture(Positionable, Gesture):
|
|
|
"""
|
|
|
A rotation gesture has a angle in radians and a rotational centroid.
|
|
|
"""
|
|
|
- __type__ = 'rotate'
|
|
|
+ _type = 'rotate'
|
|
|
|
|
|
def __init__(self, centroid, angle):
|
|
|
Positionable.__init__(self, *centroid.get_position())
|
|
|
@@ -96,7 +96,7 @@ class PinchGesture(Positionable, Gesture):
|
|
|
A pinch gesture has a scale (1.0 means no scaling) and a centroid from
|
|
|
which the scaling originates.
|
|
|
"""
|
|
|
- __type__ = 'pinch'
|
|
|
+ _type = 'pinch'
|
|
|
|
|
|
def __init__(self, centroid, scale):
|
|
|
Positionable.__init__(self, *centroid.get_position())
|
|
|
@@ -115,7 +115,7 @@ class MovementGesture(Positionable, Gesture):
|
|
|
A momevent gesture has an initial position, and a translation from that
|
|
|
position.
|
|
|
"""
|
|
|
- __type__ = 'move'
|
|
|
+ _type = 'move'
|
|
|
|
|
|
def __init__(self, initial_position, translation):
|
|
|
Positionable.__init__(self, *initial_position.get_position())
|