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 [, 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.
|
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