PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Zoom on an image
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
Warning
From version 18, this function is kept for backward compatibility for most of the platforms. We recommend that you use dCopy.
Copies an image:
  • from an Image control into another Image control.
  • Versions 17 and later
    Reports and QueriesWindows in an Image variable.
    New in version 17
    Reports and QueriesWindows in an Image variable.
    Reports and QueriesWindows in an Image variable.
    in an Image variable.
// Simple copy of content from the "IMG_ImageDrawing" control
// into the "IMG_ImageCopy" Image control
ResCopy = dCopyBlt(IMG_ImageDrawing, IMG_ImageCopy)
Reports and Queries
// Copy the image of the screen into an Image control
dCopyBlt(copyScreen, IMG_MyImage)
Syntax

Copying the images found in the Image controls Hide the details

<Result> = dCopyBlt(<Name of source Image control> , <Name of destination Image control> [, <Copy mode> [, <X source image> [, <Y source image> [, <Height source image> [, <Width source image> [, <X destination image> [, <Y destination image> [, <Height destination image> [, <Width destination image>]]]]]]]]])
<Result>: Boolean
  • True if the copy was performed,
  • False otherwise.
Note: dCopyBlt can return False if the screen driver does not support this function. In this case, a message is displayed in the copied image. We recommend that you update your screen driver in order to get the proper behavior.
<Name of source Image control>: Character string (with or without quotes)
Name of source Image control to use.
To perform a screen shot, use the copyScreen constant: the entire screen content is copied.
<Name of destination Image control>: Character string (with or without quotes)
Name of destination Image control where the copy will be performed.
<Copy mode>: Optional constant
Mode of copy to perform.
copyDstInvertReverses the colors of destination Image control.
copyImageCombines the source image and the destination image by using the transparency information of destination image
Can be used to include a logo in the destination image for example.
Note: The size and position in the source are ignored. No homothety and no zoom are allowed in this mode.
copyMergeCopyMerges the source Image control and the destination Image control.
copyMergePaintCombines, via the "Logical AND" method, the source Image control and the "pattern" of destination Image control.
copyPatCopyCopies the "pattern" of source Image control into the destination Image control.
copyPatInvertCombines, via the "Exclusive Or" method, the pattern of source Image control and the "pattern" of destination Image control. The current brush, defined by dBackground, is used.
copyPatPaintCombines, via the "Or" method, the inverted source Image control and the "pattern" of destination Image control.
copyNotSrcCopyReverses the colors of source Image control.
copyNotSrcEraseReverses, via the "Or" method, the combination between the source Image control and the destination Image control.
copySrcCopy
(Default value)
Copies the source Image control into the destination Image control (simple copy).
copySrcEraseReverses the destination Image control and combines the result with the copy of source Image control.
copySrcAndCombines, via the "and" method, the pixels of the Image image control and the pixels of destination Image control.
copySrcInvertCombines, via the "Exclusive Or" method, the pixels of the source Image control and the pixels of the destination Image control.
copySrcPaintCombines, via the "Or" method, the pixels of source Image control and the pixels of destination Image control.
copyWhitenessFills the destination Image control with white.
copyBlacknessFills the destination Image control with black.
<X source image>: Optional integer
X coordinate (in pixels) of top left corner of the area to copy (top left corner of source Image control by default).
<Y source image>: Optional integer
Y coordinate (in pixels) of top left corner of the area to copy (top left corner of source Image control by default).
<Height source image>: Optional integer
Height (in pixels) of the area to copy (height of source Image control by default).
<Width source image>: Optional integer
Width (in pixels) of the area to copy (width of source Image control by default).
<X destination image>: Optional integer
X coordinate (in pixels) of top left corner of the destination area for the copy (top left corner of destination Image control by default).
<Y destination image>: Optional integer
Y coordinate (in pixels) of top left corner of destination area for the copy (top left corner of destination Image control by default).
<Height destination image>: Optional integer
Height (in pixels) of the area where the image will be copied (height of destination Image control by default). If this height is greater than the height of source image, the image will be enlarged during the copy.
<Width destination image>: Optional integer
Width (in pixels) of the area where the image will be copied (width of destination Image control by default). If this width is greater than the width of source image, the image will be enlarged during the copy.
Versions 17 and later
Reports and Queries

Copying the images found in the Image variables Hide the details

<Result> = dCopyBlt(<Name of source image> , <Name of destination image> [, <X source image> [, <Y source image> [, <Height source image> [, <Width source image> [, <X destination image> [, <Y destination image> [, <Height destination image> [, <Width destination image>]]]]]]]])
<Result>: Boolean
  • True if the copy was performed,
  • False otherwise.
Note: dCopyBlt can return False if the screen driver does not support this function. In this case, a message is displayed in the copied image. We recommend that you update your screen driver in order to get the proper behavior.
<Name of source image>: Image variable
Name of the Image variable to use. This image is the source image.
<Name of destination image>: Image variable
Name of the Image variable into which the copy will be performed.
<X source image>: Optional integer
X coordinate (in pixels) of top left corner of the area to copy (top left corner of source image by default).
<Y source image>: Optional integer
Y coordinate (in pixels) of top left corner of the area to copy (top left corner of source image by default).
<Height source image>: Optional integer
Height (in pixels) of the area to copy (height of source image by default).
<Width source image>: Optional integer
Width (in pixels) of the area to copy (width of source image by default).
<X destination image>: Optional integer
X coordinate (in pixels) of top left corner of the destination area for the copy (top left corner of destination image by default).
<Y destination image>: Optional integer
Y coordinate (in pixels) of the top left corner of destination area for the copy (top left corner of destination image by default).
<Height destination image>: Optional integer
Height (in pixels) of the area into which the image will be copied (height of destination image by default). If this height is greater than the height of source image, the image will be enlarged during the copy.
<Width destination image>: Optional integer
Width (in pixels) of the area into which the image will be copied (width of destination image by default). If this width is greater than the width of source image, the image will be enlarged during the copy.
Reports and Queries

Copying the images found in the Image variables Hide the details

<Result> = dCopyBlt(<Name of source image> , <Name of destination image> [, <X source image> [, <Y source image> [, <Height source image> [, <Width source image> [, <X destination image> [, <Y destination image> [, <Height destination image> [, <Width destination image>]]]]]]]])
<Result>: Boolean
  • True if the copy was performed,
  • False otherwise.
Note: dCopyBlt can return False if the screen driver does not support this function. In this case, a message is displayed in the copied image. We recommend that you update your screen driver in order to get the proper behavior.
<Name of source image>: Image variable
Name of Image variable to use. This image is the source image.
<Name of destination image>: Image variable
Name of Image variable into which the copy will be performed.
<X source image>: Optional integer
X coordinate (in pixels) of top left corner of the area to copy (top left corner of source image by default).
<Y source image>: Optional integer
Y coordinate (in pixels) of top left corner of the area to copy (top left corner of source image by default).
<Height source image>: Optional integer
Height (in pixels) of the area to copy (height of source image by default).
<Width source image>: Optional integer
Width (in pixels) of the area to copy (width of source image by default).
<X destination image>: Optional integer
X coordinate (in pixels) of top left corner of the destination area for the copy (top left corner of destination image by default).
<Y destination image>: Optional integer
Y coordinate (in pixels) of the top left corner of destination area for the copy (top left corner of destination image by default).
<Height destination image>: Optional integer
Height (in pixels) of the area into which the image will be copied (height of destination image by default). If this height is greater than the height of source image, the image will be enlarged during the copy.
<Width destination image>: Optional integer
Width (in pixels) of the area into which the image will be copied (width of destination image by default). If this width is greater than the width of source image, the image will be enlarged during the copy.
New in version 17
Reports and Queries

Copying the images found in the Image variables Hide the details

<Result> = dCopyBlt(<Name of source image> , <Name of destination image> [, <X source image> [, <Y source image> [, <Height source image> [, <Width source image> [, <X destination image> [, <Y destination image> [, <Height destination image> [, <Width destination image>]]]]]]]])
<Result>: Boolean
  • True if the copy was performed,
  • False otherwise.
Note: dCopyBlt can return False if the screen driver does not support this function. In this case, a message is displayed in the copied image. We recommend that you update your screen driver in order to get the proper behavior.
<Name of source image>: Image variable
Name of the Image variable to use. This image is the source image.
<Name of destination image>: Image variable
Name of the Image variable into which the copy will be performed.
<X source image>: Optional integer
X coordinate (in pixels) of top left corner of the area to copy (top left corner of source image by default).
<Y source image>: Optional integer
Y coordinate (in pixels) of top left corner of the area to copy (top left corner of source image by default).
<Height source image>: Optional integer
Height (in pixels) of the area to copy (height of source image by default).
<Width source image>: Optional integer
Width (in pixels) of the area to copy (width of source image by default).
<X destination image>: Optional integer
X coordinate (in pixels) of top left corner of the destination area for the copy (top left corner of destination image by default).
<Y destination image>: Optional integer
Y coordinate (in pixels) of the top left corner of destination area for the copy (top left corner of destination image by default).
<Height destination image>: Optional integer
Height (in pixels) of the area into which the image will be copied (height of destination image by default). If this height is greater than the height of source image, the image will be enlarged during the copy.
<Width destination image>: Optional integer
Width (in pixels) of the area into which the image will be copied (width of destination image by default). If this width is greater than the width of source image, the image will be enlarged during the copy.
Reports and Queries

Copying the images found in the Image variables Hide the details

<Result> = dCopyBlt(<Name of source image> , <Name of destination image> [, <X source image> [, <Y source image> [, <Height source image> [, <Width source image> [, <X destination image> [, <Y destination image> [, <Height destination image> [, <Width destination image>]]]]]]]])
<Result>: Boolean
  • True if the copy was performed,
  • False otherwise.
Note: dCopyBlt can return False if the screen driver does not support this function. In this case, a message is displayed in the copied image. We recommend that you update your screen driver in order to get the proper behavior.
<Name of source image>: Image variable
Name of Image variable to use. This image is the source image.
<Name of destination image>: Image variable
Name of Image variable into which the copy will be performed.
<X source image>: Optional integer
X coordinate (in pixels) of top left corner of the area to copy (top left corner of source image by default).
<Y source image>: Optional integer
Y coordinate (in pixels) of top left corner of the area to copy (top left corner of source image by default).
<Height source image>: Optional integer
Height (in pixels) of the area to copy (height of source image by default).
<Width source image>: Optional integer
Width (in pixels) of the area to copy (width of source image by default).
<X destination image>: Optional integer
X coordinate (in pixels) of top left corner of the destination area for the copy (top left corner of destination image by default).
<Y destination image>: Optional integer
Y coordinate (in pixels) of the top left corner of destination area for the copy (top left corner of destination image by default).
<Height destination image>: Optional integer
Height (in pixels) of the area into which the image will be copied (height of destination image by default). If this height is greater than the height of source image, the image will be enlarged during the copy.
<Width destination image>: Optional integer
Width (in pixels) of the area into which the image will be copied (width of destination image by default). If this width is greater than the width of source image, the image will be enlarged during the copy.
Reports and Queries

Copying the images found in the Image variables Hide the details

<Result> = dCopyBlt(<Name of source image> , <Name of destination image> [, <X source image> [, <Y source image> [, <Height source image> [, <Width source image> [, <X destination image> [, <Y destination image> [, <Height destination image> [, <Width destination image>]]]]]]]])
<Result>: Boolean
  • True if the copy was performed,
  • False otherwise.
Note: dCopyBlt can return False if the screen driver does not support this function. In this case, a message is displayed in the copied image. We recommend that you update your screen driver in order to get the proper behavior.
<Name of source image>: Image variable
Name of the Image variable to use. This image is the source image.
<Name of destination image>: Image variable
Name of the Image variable into which the copy will be performed.
<X source image>: Optional integer
X coordinate (in pixels) of top left corner of the area to copy (top left corner of source image by default).
<Y source image>: Optional integer
Y coordinate (in pixels) of top left corner of the area to copy (top left corner of source image by default).
<Height source image>: Optional integer
Height (in pixels) of the area to copy (height of source image by default).
<Width source image>: Optional integer
Width (in pixels) of the area to copy (width of source image by default).
<X destination image>: Optional integer
X coordinate (in pixels) of top left corner of the destination area for the copy (top left corner of destination image by default).
<Y destination image>: Optional integer
Y coordinate (in pixels) of the top left corner of destination area for the copy (top left corner of destination image by default).
<Height destination image>: Optional integer
Height (in pixels) of the area into which the image will be copied (height of destination image by default). If this height is greater than the height of source image, the image will be enlarged during the copy.
<Width destination image>: Optional integer
Width (in pixels) of the area into which the image will be copied (width of destination image by default). If this width is greater than the width of source image, the image will be enlarged during the copy.
Reports and Queries

Copying the images found in the Image variables Hide the details

<Result> = dCopyBlt(<Name of source image> , <Name of destination image> [, <X source image> [, <Y source image> [, <Height source image> [, <Width source image> [, <X destination image> [, <Y destination image> [, <Height destination image> [, <Width destination image>]]]]]]]])
<Result>: Boolean
  • True if the copy was performed,
  • False otherwise.
Note: dCopyBlt can return False if the screen driver does not support this function. In this case, a message is displayed in the copied image. We recommend that you update your screen driver in order to get the proper behavior.
<Name of source image>: Image variable
Name of Image variable to use. This image is the source image.
<Name of destination image>: Image variable
Name of Image variable into which the copy will be performed.
<X source image>: Optional integer
X coordinate (in pixels) of top left corner of the area to copy (top left corner of source image by default).
<Y source image>: Optional integer
Y coordinate (in pixels) of top left corner of the area to copy (top left corner of source image by default).
<Height source image>: Optional integer
Height (in pixels) of the area to copy (height of source image by default).
<Width source image>: Optional integer
Width (in pixels) of the area to copy (width of source image by default).
<X destination image>: Optional integer
X coordinate (in pixels) of top left corner of the destination area for the copy (top left corner of destination image by default).
<Y destination image>: Optional integer
Y coordinate (in pixels) of the top left corner of destination area for the copy (top left corner of destination image by default).
<Height destination image>: Optional integer
Height (in pixels) of the area into which the image will be copied (height of destination image by default). If this height is greater than the height of source image, the image will be enlarged during the copy.
<Width destination image>: Optional integer
Width (in pixels) of the area into which the image will be copied (width of destination image by default). If this width is greater than the width of source image, the image will be enlarged during the copy.
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 <X source image>, <Y source image>, <Height source image> and <Width source image>),
  • 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 <X destination image>, <Y destination image>, <Height destination image> and <Width destination image> 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 code line is used to perform the zoom operation during the copy:
dCopyBlt(IMG_SourceControl, IMG_DestinationControl, copySrcCopy, 10, 10, 30, 40, 10, 10, 60, 80)
Component : wd170obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment