Drawing clip rectangle settings
left | Specifies the left edge position (in image coordinates of the layer) of the drawing clip rectangle in pixels. |
top | Specifies the top position of the drawing clip rectangle (in the image coordinates of the layer) in pixels. |
width | Specifies the width of the drawing clip rectangle in pixels. |
height | Specifies the vertical width of the drawing clip rectangle in pixels. |
Sets the drawing clip rectangle for the layer. Drawing on the layer is restricted to the inside of this drawing clip rectangle (the part outside the rectangle is not drawn).
However, some methods, such as 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 (it can be drawn on the entire layer).
The drawing clip rectangle returns to its default value when the image is loaded, the image size is changed, or the display type of the layer is changed.
You can also call this method with no arguments to restore the drawing clip rectangle to its default value.