Canvas_BitmapCopy3

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > UI (User Interface) > CONTROLS > Control Types > Canvas Control > Canvas Control Commands >

Canvas_BitmapCopy3

 

Description

 

Copies a bitmap to the selected canvas target.

Copies a portion of the bitmap, specified by SX, SY1 as the upper left corner and SX2, SY2 as the lower right corner. It is positioned at  the point specified by the parameter DX, DY

 

Syntax

 

n = Canvas_BitmapCopy3(hBmp, ID, SX1, SY1, SX2, SY2, DX, DY [, Style])

 

Returns

 

Number

 

Parameters

 

Name

Type

Optional

Meaning

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

DX

Number

No

Destination X

DY

Number

No

Destination Y

Style

Number

Yes

One of the following equates:

%Canvas_mix_BlacknessPixel is always 0 (black).
%Canvas_mix_NotMergeSrcPixel is the inverse of the MergeSrc color.
%Canvas_mix_MaskNotSrcPixel is a combination of the colors common to both the pixel and the inverse of the source.
%Canvas_mix_NotCopySrcPixel is the inverse of the pen color.
%Canvas_mix_MaskSrcNotPixel is a combination of the colors common to both the source and the inverse of the pixel.
%Canvas_mix_NotPixel is the inverse of the pixel color.
%Canvas_mix_XorSrcPixel is a combination of the colors in the source and in the pixel, but not in both.
%Canvas_mix_NotMaskSrcPixel is the inverse of the MaskSrc color.
%Canvas_mix_MaskSrcPixel is a combination of the colors common to both the source and the pixel.
%Canvas_mix_NotXorSrcPixel is the inverse of the XorSrc color.
%Canvas_mix_NopPixel remains unchanged.
%Canvas_mix_MergeNotSrcPixel is a combination of the source color and the inverse of the pixel color.
%Canvas_mix_CopySrcPixel is the source color (default).
%Canvas_mix_MergeSrcNotPixel is a combination of the source color and the inverse of the pixel color.
%Canvas_mix_MergeSrcPixel is a combination of the source color and the pixel color.
%Canvas_mix_WhitenessPixel is always 1 (white)

 

Remarks

 

The destination of the stretch operation is always the attached graphic target

 

Restrictions

 

See also

 

Examples