PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

New WINDEV, WINDEV Mobile 25 feature!
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
..DisplayedSection is used to find out and modify the section of an image displayed in an Image control.
This property is mainly used to zoom in an image while displaying only a section of it. This property must be used in an Image control that allows zooming.
Example
// Save displayed section
rectSave is Rectangle
rectSave = IMG_Photo..DisplayedSection
// Restore displayed section
IMG_Photo..DisplayedSection = rectSave
 
// Zoom X2 on top right
rectX2 is Rectangle
rectX2..X = 1000
rectX2..Y = 0
rectX2..Width = 500
rectX2..Height = 500
IMG_Photo..DisplayedSection = rectX2
 
rectX2..DisplayedSection = O
Syntax

Finding out the image section displayed in an Image control Hide the details

<Result> = <Image control>..DisplayedSection
<Result>: Rectangle variable
Rectangle variable that corresponds to the image section displayed.
If the Image control does not contain an image (or contains a generated image (drawing functions)), the rectangle returned will correspond to the control.
<Image control>: Control name
Name of the Image control to use.

Changing the image section displayed in an Image control Hide the details

<Image control>..DisplayedSection = <New section displayed>
<Image control>: Control name
Name of the Image control to use.
<New section displayed>: Rectangle variable
  • Name of the Rectangle variable that corresponds to the image section to display.
  • 0 to display the entire image in the Image control.
Remarks
  • The rectangle is expressed in pixels of the image.
  • If the image has multiple DPIs, the rectangle corresponds to 1x zoom.
  • When changing the image section displayed (syntax 2):
    • Zoom is calculated according to the size of the specified rectangle.
    • If the rectangle does not have the same x/y ratio as the Image control, the largest ratio is used.
    • If the rectangle is empty, the action has no effect.
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment