The ImageZoom sample demonstrates how to zoom an image on an iOS or Android device. The sample provides a picture and the user can zoom the picture by pinching it.
You can find Delphi and C++ code samples in GitHub Repositories. Search by name into the sample repositories according to your RAD Studio version.
To add native gestures to your mobile applications, you should configure the TGestureManager component which enables you to manage all the registered gestures in an application.
- The sample uses TImage to display and define a 2D image component.
- The properties TImage.Position, TImage.Width and TImage.Height is used to specifying the position and size of the image.
- The sample uses the TGestureManager class to handle all the touch and gesturing functionalities of the application. The TGestureEventInfo describes a gesture event. It is a record that contains information about a gesture event. The TGestureEvent type passes a TGestureEventInfo record to the user code.
The sample shows a picture and the sample uses the field GestureID of the TGestureEventInfo to identify a zoom gesture. When TGestureEventInfo identifies a zoom gesture, the sample uses the TImage.Position, TImage.Width and TImage.Height properties to zoom the picture.
Check out the full article in the DocWiki about the ImageZoom sample.