Layer.copyRect

Function/Meaning

Rectangle copy

Type
Layerclassmethod of
Syntax
copyRect(dleft, dtop, src, sleft, stop, swidth, sheight)
Arguments
dleft

Specifies the left edge position of the destination rectangle in pixels (at the image position of the destination layer).

dtop

Specifies the top position of the destination rectangle in pixels (at the image position of the destination layer).

src

Specifies the layer object to copy from.
You can also specify an object of the Bitmap class.

sleft

Specifies the left edge position of the rectangle to copy, in pixels (at the image position of the source layer).

stop

Specifies the top position of the rectangle to copy, in pixels (at the image position of the source layer).

swidth

Specifies the width of the rectangle to copy, in pixels (at the image position of the source layer).

sheight

Specifies the height of the rectangle to copy, in pixels (at the image position of the source layer).

Return value
None (void)
Explanation

Copies the rectangular part of the specified copy source layer to the specified position of your layer.
The image that is copied depends on the value of the Layer.face property of the destination layer (the layer that executes the method).

  • dfAlpha (Or dfBoth) : The main image and mask image are copied
  • dfAddAlpha : The main image and mask image are copied
  • dfOpaque (Or dfMain) : If the Layer.holdAlpha property is true, only the main image will be copied (the mask image will not be copied). If false, the main image and mask image will be copied
  • dfMask : Only the mask image is copied (the main image is not copied)
  • dfProvince : Only the area image is copied (mask image and main image 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 and dfAddAlpha, the mask image is also copied regardless of holdAlpha).