Class Gesture.Pinch

Pinch Gesture Recognizer Class.

gestures to recognize pinch motions

Inherits from:

Usage:

     local Gesture = require 'dmc_gestures'
     local view = display.newRect( 100, 100, 200, 200 )
     local g = Gesture.newPinchGesture( view )
     g:addEventListener( g.EVENT, gHandler )

Getters and Setters

.reset_scale () whether to reset internal scale after pinch gesture is finished (boolean).
.threshold () the minimum movement required to recognize a pinch gesture (number).

Class Constants

Gesture.Pinch.EVENT Event name constant.
Gesture.Pinch.GESTURE Event type constant, gesture recognized.


Getters and Setters

.reset_scale ()
whether to reset internal scale after pinch gesture is finished (boolean).

Usage:

  • print( gesture.reset_scale )
  • gesture.reset_scale = false
.threshold ()
the minimum movement required to recognize a pinch gesture (number).

Usage:

  • print( gesture.threshold )
  • gesture.threshold = 5

Class Constants

Gesture.Pinch.EVENT
Event name constant.
  • EVENT

Usage:

  • gesture:addEventListener( gesture.EVENT, handler )
  • gesture:removeEventListener( gesture.EVENT, handler )
Gesture.Pinch.GESTURE
Event type constant, gesture recognized. this type of event is sent out when a Gesture Recognizer has recognized the gesture
  • GESTURE

Usage:

     local function handler( event )
     	local gesture = event.target
     	if event.type == gesture.GESTURE then
     		-- we have our event !
     	end
     end
generated by LDoc 1.4.3 Last updated 2015-05-14 11:55:03