Variant:
This topic builds -on the material in the following topics:
This topic covers -the following:
Call
When an application needs to receive advanced pointer
-events in a window, it must call
If advanced
-pointers are not enabled for a window, it receives only
-standard
However, the new
Call
Now we need -to test whether the pointer event contains advanced pointer data. -If it is not an advanced pointer, the code leaves.
If it is -an advanced pointer, we call functions to detect proximity, pressure, -"proximity and pressure" data and coordinates.
Proximity is always negative and pressure is always positive. Internally they are combined together as a Z coordinate.
-When Z > 0, the proximity is 0 and the Z value represents the pressure.
-When Z < 0, the pressure is 0 and the Z value represents the proximity.
-Some APIs use only a Z coordinate (such as the threshold getters and
-setters and
This example shows an easy way to pinch zoom an
-image when the screen receives pointer events from two pointers. There
-are two functions in this code that must be implemented by the programmer:
The high-level -steps to perform pinch zooming are:
Define the coordinates,
-equivalent to the given on-screen coordinates. In the code example,
-this is done using the function
Define the ID
-of the pointer by using
For each pointer -assign its coordinates to a local variable. We assume there are only -two pointers handled by the system here.
Use the
Variant:
This topic builds +on the material in the following topics:
This topic covers +the following:
Call
When an application needs to receive advanced pointer
+events in a window, it must call
If advanced
+pointers are not enabled for a window, it receives only standard
However, the new
Call
Now we need +to test whether the pointer event contains advanced pointer data. +If it is not an advanced pointer, the code leaves.
If it is +an advanced pointer, we call functions to detect proximity, pressure, +"proximity and pressure" data and coordinates.
Proximity is always negative and pressure is always positive. Internally they are combined together as a Z coordinate.
+When Z > 0, the proximity is 0 and the Z value represents the pressure.
+When Z < 0, the pressure is 0 and the Z value represents the proximity.
+Some APIs use only a Z coordinate (such as the threshold getters and
+setters and
This example shows an easy way to pinch zoom an
+image when the screen receives pointer events from two pointers. There
+are two functions in this code that must be implemented by the programmer:
The high-level +steps to perform pinch zooming are:
Define the coordinates,
+equivalent to the given on-screen coordinates. In the code example,
+this is done using the function
Define the ID
+of the pointer by using
For each pointer +assign its coordinates to a local variable. We assume there are only +two pointers handled by the system here.
Use the