Layer.setClip

Function/Meaning
Sets the drawing clip rectangle
Type
Method of the Layer class
Syntax
setClip(left, top, width=void, height=void)
Arguments
left Specifies the left position of the drawing clip rectangle (in layer image coordinates) in pixels.
This value can also be retrieved or set via the Layer.clipLeft property.
top Specifies the top position of the drawing clip rectangle (in layer image coordinates) in pixels.
This value can also be retrieved or set via the Layer.clipTop property.
width Specifies the width of the drawing clip rectangle in pixels.
This value can also be retrieved or set via the Layer.clipWidth property.
height Specifies the height of the drawing clip rectangle in pixels.
This value can also be retrieved or set via the Layer.clipHeight property.
Return Value
None (void)
Description
Sets the layer's drawing clip rectangle.
Drawing on the layer is restricted to within this drawing clip rectangle (parts outside the rectangle are not drawn). However, some methods like Layer.flipLR and Layer.flipUD are not affected by the drawing clip rectangle.
By default, the clip rectangle is set to the entire layer image area (allowing drawing on the entire layer).
The drawing clip rectangle returns to its default value when an image is loaded, the image size is changed, or the layer's display type is changed.
Additionally, calling this method without arguments resets the drawing clip rectangle to its default value.