Layer.copyRect

Function/Meaning
Rectangle Copy
Type
Method of the Layer class
Syntax
copyRect(dleft, dtop, src, sleft, stop, swidth, sheight)
Arguments
dleft Specifies the left position of the destination rectangle (in pixels, relative to the destination layer's image position).
dtop Specifies the top position of the destination rectangle (in pixels, relative to the destination layer's image position).
src Specifies the source layer object.
A Bitmap class object can also be specified. (Since 1.1.0)
sleft Specifies the left position of the source rectangle (in pixels, relative to the source layer's image position).
stop Specifies the top position of the source rectangle (in pixels, relative to the source layer's image position).
swidth Specifies the width of the source rectangle (in pixels, relative to the source layer's image position).
sheight Specifies the height of the source rectangle (in pixels, relative to the source layer's image position).
Return Value
None (void)
Description
Copies the specified rectangular portion of the source layer to the specified position on the current layer.
The image being copied changes depending on the value of the Layer.face property of the destination layer (the layer executing the method).
dfAlpha (or dfBoth) : Both the main image and the mask image are copied
dfAddAlpha : Both the main image and the mask image are copied
dfOpaque (or dfMain) : If the Layer.holdAlpha property is true, only the main image is copied (the mask image is not copied). If false, both the main image and the mask image are copied.
dfMask : Only the mask image is copied (the main image is not copied)
dfProvince : Only the province image is copied (the mask and main images are not copied)
The Layer.face property of the source layer is ignored.
This method is not affected by Layer.holdAlpha (in the case of dfAlpha or dfAddAlpha, the mask image is copied regardless of holdAlpha).