|
|
|
|
|
- Zoom on an image
- Miscellaneous
dCopy (Function) In french: dCopie StartZoomX is int = 0
StartZoomY is int = 0
ZoomHeight is int = 130
ZoomWidth is int = 90
dCopy(MAP_MyMap, IMG_Details, StartZoomX, StartZoomY, ZoomWidth, ZoomHeight)
Syntax
Copying an image by specifying the coordinates of the area to be copied Hide the details
<Result> = dCopy(<Source image> , <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. dCopy 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).
<Source image>: Character string - Name of the source Image control to be used.
- Name of the Image variable to be used.
The Image type is not available.
<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.
The Image type is not available.
<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. 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 et to 30 pixels and whose height is set to 40 pixels. | 2. To perform a 200% zoom, the destination area must be twice the size of the source area: rectangle whose width is set to 60 pixels and whose height is set to 80 pixels. | | |
In this case, the following line of code is used to perform the zoom operation during the copy: dCopy(IMG_SourceControl, IMG_DestinationControl, 10, 10, 40, 30, 10, 10, 80, 60)
Miscellaneous Caution: the <Height> and <Width> parameters are passed in a different order in dCopy and dCopyImage. Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|