PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | French EN
This content has been translated automatically. Click here to view the French version.
  • Overview
  • Describing the Image control: Options specific to multi-touch
  • Optional events specific to multi-touch
  • Scroll with finger optional event
  • Horizontal and vertical swipe
  • "Zoom with fingers" optional process
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
One of the most common applications of the multi-touch feature is used to handle images. The display size on a phone being reduced, it is often necessary to zoom an image and/or to move inside an image.
This allows you to perform a zoom on an image via the contact of 2 fingers moving apart.
The multi-touch can be implemented:
  • on the applications run on a phone.
  • on the sites displayed on a phone.
The management of multi-touch in the Image controls can be implemented via:
Versions 19 and later
WEBDEV - Server codeWEBDEV - Browser code This feature is now available for WEBDEV sites.
WEBDEV - Server codeWEBDEV - Browser code Use conditions:
  • On the default Android browser, multi-touch is supported from Android version 3.0 and later.
  • On the default Android browser, the zoom of gestures may conflict with the default zoom of the browser for the versions earlier than Android 4.3.
New in version 19
WEBDEV - Server codeWEBDEV - Browser code This feature is now available for WEBDEV sites.
WEBDEV - Server codeWEBDEV - Browser code Use conditions:
  • On the default Android browser, multi-touch is supported from Android version 3.0 and later.
  • On the default Android browser, the zoom of gestures may conflict with the default zoom of the browser for the versions earlier than Android 4.3.
WEBDEV - Server codeWEBDEV - Browser code This feature is now available for WEBDEV sites.
WEBDEV - Server codeWEBDEV - Browser code Use conditions:
  • On the default Android browser, multi-touch is supported from Android version 3.0 and later.
  • On the default Android browser, the zoom of gestures may conflict with the default zoom of the browser for the versions earlier than Android 4.3.
Describing the Image control: Options specific to multi-touch
The "Details" tab in the window description of the Image control is used to manage the actions performed when using the fingers:
The following options are supported:
  • No scroll, no zoom: in this case, multi-touch is disabled.
  • Automatic scroll only: If the image is not displayed in its entirety the control, it can be moved by scrolling with the finger.
  • Automatic scroll and zoom: In addition to scrolling, zoom is also supported. In this case:
    • moving two fingers away from each other on the screen allows zooming in. The zoom will be centered on the point found in the middle of the line drawn by the two contact points.
    • moving two fingers towards each other on the screen allows zooming out.
The additional options are used to define:
  • Maximum zoom factor: Maximum zoom that can be performed with the fingers.
  • Allow the scaling by double tap: In this case, a double tap (or double click) performed in the control is used to apply the zoom on an image section. If the image is already zoomed, it is reinitialized to its initial display.
Optional events specific to multi-touch
There are three specific optional events to manage multi-touch on Image controls:
WEBDEV - Server codeWEBDEV - Browser code Remark: These are browser events.

Scroll with finger optional event

The "Scroll with finger" event is run when one or more fingers move vertically or horizontally while in contact with the screen
This event can accept parameters by declaring a procedure directly in the event "Scroll with finger" with the following syntax:
PROCEDURE <Procedure name>(<Distance X>, <Distance Y>)
where:
  • <Distance X>: Integer corresponding to the distance (in pixels) that was scrolled on the X axis in the control.
  • <Distance Y>: Integer corresponding to the distance (in pixels) that was scrolled on the Y axis in the control.
Remarks:
  • WEBDEV - Browser code The distance corresponds to the distance between the first contact point that was detected and the current position.
Versions 18 and later
WEBDEV - Browser code To find out the direction and the distance for the operation performed, you have the ability to use the Gesture variable instead of the procedure.
New in version 18
WEBDEV - Browser code To find out the direction and the distance for the operation performed, you have the ability to use the Gesture variable instead of the procedure.
WEBDEV - Browser code To find out the direction and the distance for the operation performed, you have the ability to use the Gesture variable instead of the procedure.

Horizontal and vertical swipe

The "Horizontal and vertical swipe" event is run during a quick small movement of one or more fingers on the screen.
This event can accept parameters by declaring a procedure directly in the event "Horizontal and vertical swipe" with the following syntax:
PROCEDURE <Procedure name>(<Speed X>, <Speed Y>)
where:
  • <Speed X>: Integer corresponding to the speed (in pixels per second) of the movement on the X axis.
  • <Speed Y>: Integer corresponding to the speed (in pixels per second) of the movement on the Y axis.
Versions 18 and later
WEBDEV - Browser code To find out the direction and the speed for the operation performed, you have the ability to use the Gesture variable instead of the procedure.
New in version 18
WEBDEV - Browser code To find out the direction and the speed for the operation performed, you have the ability to use the Gesture variable instead of the procedure.
WEBDEV - Browser code To find out the direction and the speed for the operation performed, you have the ability to use the Gesture variable instead of the procedure.

"Zoom with fingers" optional process

The "Zoom with fingers" event is run with a pinch or spread finger gesture on the screen.
This event can accept parameters by declaring a procedure directly in the event "Zoom with fingers" with the following syntax:
PROCEDURE <Procedure name>(<Spacing>)
where <Spacing>: Integer corresponding to the distance (in pixels) between the two contact points when the event was called.
Versions 18 and later
WEBDEV - Browser code To find out the spacing, you have the ability to use the Gesture variable instead of the procedure.
New in version 18
WEBDEV - Browser code To find out the spacing, you have the ability to use the Gesture variable instead of the procedure.
WEBDEV - Browser code To find out the spacing, you have the ability to use the Gesture variable instead of the procedure.
Caution: The zoom with finger is not available if dStartDrawing is used on the Image control. In this case, you must:
  • save the image with a dSaveImageXXX function.
  • use dEndDrawing.
  • redisplay the image in the Image control.
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment