* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *
This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Copy and resize a bitmap to the selected canvas target.
Copy a complete bitmap, or a portion of it, to the selected canvas target, while resizing it to a larger or smaller size
Syntax
n = Canvas_Stretch1(hBmp, ID, SX1, SY1, SX2, SY2, DX1, DY1, DX2, DY2 [, Mix, Stretch])
Returns
Number
Parameters
|
|
|
|
|
hBmp
|
Number
|
No
|
specifies the handle of the source bitmap, control, or window
|
ID
|
Number
|
No
|
identifier assigned with the CONTROL ADD CANVAS.
ID must be zero (0) for a Canvas Window or a Bitmap.
|
SX1
|
Number
|
No
|
Source X1
|
SY1
|
Number
|
No
|
Source Y1
|
SX2
|
Number
|
No
|
Source X2
|
SY2
|
Number
|
No
|
Source Y2
|
DX1
|
Number
|
No
|
Destination X1
|
DY1
|
Number
|
No
|
Destination Y1
|
DX2
|
Number
|
No
|
Destination X2
|
DY2
|
Number
|
No
|
Destination Y2
|
Mix
|
Number
|
Yes
|
One of the following equates:
| %Canvas_mix_Blackness | Pixel is always 0 (black). |
| %Canvas_mix_NotMergeSrc | Pixel is the inverse of the MergeSrc color. |
| %Canvas_mix_MaskNotSrc | Pixel is a combination of the colors common to both the pixel and the inverse of the source. |
| %Canvas_mix_NotCopySrc | Pixel is the inverse of the pen color. |
| %Canvas_mix_MaskSrcNot | Pixel is a combination of the colors common to both the source and the inverse of the pixel. |
| %Canvas_mix_Not | Pixel is the inverse of the pixel color. |
| %Canvas_mix_XorSrc | Pixel is a combination of the colors in the source and in the pixel, but not in both. |
| %Canvas_mix_NotMaskSrc | Pixel is the inverse of the MaskSrc color. |
| %Canvas_mix_MaskSrc | Pixel is a combination of the colors common to both the source and the pixel. |
| %Canvas_mix_NotXorSrc | Pixel is the inverse of the XorSrc color. |
| %Canvas_mix_Nop | Pixel remains unchanged. |
| %Canvas_mix_MergeNotSrc | Pixel is a combination of the source color and the inverse of the pixel color. |
| %Canvas_mix_CopySrc | Pixel is the source color (default). |
| %Canvas_mix_MergeSrcNot | Pixel is a combination of the source color and the inverse of the pixel color. |
| %Canvas_mix_MergeSrc | Pixel is a combination of the source color and the pixel color. |
| %Canvas_mix_Whiteness | Pixel is always 1 (white) |
|
Stretch
|
Number
|
Yes
|
If present, one of the following equates:
| %Canvas_BLACKONWHITE | This is the default Windows stretch mode, and is most appropriate for monochrome bitmaps, or those with blocks of color. Performs a boolean OR of eliminated and existing pixels. It preserves black pixels at the expense of white pixels. |
| %Canvas_WHITEONBLACK | Performs a boolean OR of eliminated and existing pixels. It preserves white pixels at the expense of black pixels. |
| %Canvas_COLORONCOLOR | Deletes eliminated lines of pixels without trying to preserve their information. |
| %Canvas_HALFTONE | This provides the highest quality for complex color bitmaps. The average color of the destination pixel block is kept approximately the same as the source pixel block. |
|
Remarks
The destination of the stretch operation is always the attached graphic target
Restrictions
See also
Examples