Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Add Interactive Gestures To Your Delphi/C++ Builder FireMonkey Mobile Applications

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.

Implementation

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.PositionTImage.Width and TImage.Height properties to zoom the picture.

Check out the full article in the DocWiki about the ImageZoom sample.

Check out the full source code for the ImageZoom project for Delphi and C++ Builder over on GitHub

Exit mobile version