Partager via


Direct Manipulation Gestures with Multi-Touch (Compact 2013)

3/26/2014

When the hardware and driver provide true (not symmetric) multi-touch data, direct manipulation can provide location information for both the primary and secondary contact points. This information suffices to implement, for example, a rotate gesture.

The ptsLocation member of the GESTUREINFO structure provides the primary contact point. An application can calculate the secondary contact point from x and y delta information from the ullArguments member, as shown in the following example code.

long xDelta = GID_DIRECTMANIPULATION_DELTA_X(gi.ullArguments); 

long yDelta = GID_DIRECTMANIPULATION_DELTA_Y(gi.ullArguments);

The application can calculate the distance between the points with the Pythagorean theorem.

For more information about the GID_DIRECTMANIPULATION_DELTA_X and GID_DIRECTMANIPULATION_DELTA_Y macros, see Gesture Macros.

See Also

Concepts

Direct Manipulation Gestures