User Tools

Site Tools


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

4-Finger-Scale

(Touch → Spacial → Scale → Four Point Scale Gesture “4-Finger-Scale”)



This gesture can be activated when four 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="4-finger-scale" type="scale">
    <match>
        <action>
            <initial>
                <cluster point_number="4"/>
            </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/4-point-scale.txt · Last modified: 2019/01/29 19:07 (external edit)