ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Drawing functions
  • Zoom on an image
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Example
Syntax
<Result> = <Image variable>.Copy(<Destination image> [, <Source image X-coordinate> [, <Source image Y-coordinate> [, <Source image width> [, <Source image height> [, <Destination image X-coordinate> [, <Destination image Y-coordinate> [, <Destination image width> [, <Destination image height>]]]]]]]])
<Result>: Boolean
  • True if the image was copied,
  • False otherwise. <Image variable>.Copy can return False:
    • if the screen driver does not support this function. In this case, a message is displayed in the copied image. We advise you to update the screen driver in order to get a standard operating mode.
    • if the destination image is not initialized (for example, the size of the image was not assigned by Height and Width).
<Image variable>: Image variable
<Destination image>: Name of the Image control or variable
  • Name of the destination Image control the image will be copied to.
  • Name of the Image variable the image will be copied to.
<Source image X-coordinate>: Optional integer
X-coordinate (in pixels) of the upper-left corner of the area to copy (upper-left corner of the source image by default).
<Source image Y-coordinate>: Optional integer
Y-coordinate (in pixels) of the upper-left corner of the area to copy (upper-left corner of the source image by default).
<Source image width>: Optional integer
Width (in pixels) of the area to copy (width of the source image by default).
<Source image height>: Optional integer
Height (in pixels) of the area to copy (height of the source image by default).
<Destination image X-coordinate>: Optional integer
X-coordinate (in pixels) of the upper-left corner of the copy destination area (upper-left corner of the destination image by default).
<Destination image Y-coordinate>: Optional integer
Y-coordinate (in pixels) of the upper-left corner of the copy destination area (upper-left corner of the destination image by default).
<Destination image width>: Optional integer
Width (in pixels) of the area the image will be copied to (width of the destination image by default). If this width is greater than the width of the source image, the image will be enlarged when copied.
<Destination image height>: Optional integer
Height (in pixels) of the area the image will be copied to (height of the destination image by default). If this height is greater than the height of the source image, the image will be enlarged when copied.
WINDEVWEBDEV - Server codeLinuxAndroidiPhone/iPadJava

Copying an image by defining the source area with a Rectangle variable Hide the details

<Result> = <Image variable>.Copy(<Destination image> [, <Rectangle> [, <Destination image X-coordinate> [, <Destination image Y-coordinate> [, <Destination image width> [, <Destination image height>]]]]])
<Result>: Boolean
  • True if the image was copied,
  • False otherwise. <Image variable>.Copy can return False:
    • if the screen driver does not support this function. In this case, a message is displayed in the copied image. We advise you to update the screen driver in order to get a standard operating mode.
    • if the destination image is not initialized (for example, the size of the image was not assigned by Height and Width).
<Image variable>: Image variable
<Destination image>: Name of the Image control or variable
  • Name of the destination Image control the image will be copied to.
  • Name of the Image variable the image will be copied to.
<Rectangle>: Rectangle variable
Name of the Rectangle variable that corresponds to the rectangular area of the source image to be copied.
<Destination image X-coordinate>: Optional integer
X-coordinate (in pixels) of the upper-left corner of the copy destination area (upper-left corner of the destination image by default).
<Destination image Y-coordinate>: Optional integer
Y-coordinate (in pixels) of the upper-left corner of the copy destination area (upper-left corner of the destination image by default).
<Destination image width>: Optional integer
Width (in pixels) of the area the image will be copied to (width of the destination image by default). If this width is greater than the width of the source image, the image will be enlarged when copied.
<Destination image height>: Optional integer
Height (in pixels) of the area the image will be copied to (height of the destination image by default). If this height is greater than the height of the source image, the image will be enlarged when copied.
WINDEVWEBDEV - Server codeLinuxAndroidiPhone/iPadJava

Copying an image by defining the source and destination areas with a Rectangle variable Hide the details

<Result> = <Image variable>.dCopy(<Destination image> [, <Source rectangle> [, <Destination rectangle>]])
<Result>: Boolean
  • True if the image was copied,
  • False otherwise. <Image variable>.Copy can return False:
    • if the screen driver does not support this function. In this case, a message is displayed in the copied image. We advise you to update the screen driver in order to get a standard operating mode.
    • if the destination image is not initialized (for example, the size of the image was not assigned by Height and Width).
<Image variable>: Image variable
<Destination image>: Name of the Image control or variable
  • Name of the destination Image control the image will be copied to.
  • Name of the Image variable the image will be copied to.
<Source rectangle>: Rectangle variable
Name of the Rectangle variable that corresponds to the rectangular area of the source image to be copied.
<Destination rectangle>: Rectangle variable
Name of the Rectangle variable that corresponds to the rectangular area of the destination image.
Remarks

Zoom on an image

During a copy, you can enlarge or reduce a section of the source image when copying it to the destination image. To do so:
  • Define the area to enlarge (or reduce) in the source image (with the <Source image X-coordinate>, <Source image Y-coordinate>, <Source image height> and <Source image width> parameters),
  • Define the display area of the result image. This area must be larger to enlarge the image and smaller to reduce the image. By default, the entire destination image is taken into account. Use <Destination image X-coordinate>, <Destination image Y-coordinate>, <Destination image height> and <Destination image width> if necessary.
The zoom percentage depends on the multiplying coefficient between the dimensions of the two areas.
For example:
1. The area to zoom is included in a rectangle whose width is set to 30 pixels and whose height is set to 40 pixels.2. To set the zoom to 200%, the destination area must be twice as large as the source area. This means that the rectangle's width and height should be set to 60 and 80 pixels, respectively.
Business / UI classification: Neutral code
Component: wd300pnt.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/24/2024

Send a report | Local help