User Tools

Site Tools


gestures:touch:simple:spatial:scale:2-point-scale

2-Finger-Scale

(Touch → Spacial → Scale → Two Point Scale Gesture “2-Finger-Scale”)



This gesture can be activated when two touch points are recognized on a touch object. The relative separation of the touch points are tracked and grouped into a cluster. Changes in the separation of the cluster are mapped directly to the scale of the touch object.

<Gesture id="2-finger-scale" type="scale">
<match>
    <action>
        <initial>
            <cluster point_number="2"/>
        </initial>
    </action>
</match>
<analysis>
    <algorithm>
        <library module="scale"/>
        <returns>
            <property ref="scale_dsx" result="ds"/>
            <property ref="scale_dsy" result="ds"/>
        </returns>
    </algorithm>
</analysis>    
<mapping>
    <update>
        <gesture_event  type="scale">
            <property ref="scale_dsx" target="scaleX"/>
            <property ref="scale_dsy" target="scaleY"/>
        </gesture_event>
    </update>
</mapping>
</Gesture>
gestures/touch/simple/spatial/scale/2-point-scale.txt · Last modified: 2019/01/29 19:07 (external edit)