Layer.fillRect

Function/Meaning
Fill rectangle
Type
Method of Layer class
Syntax
fillRect(left, top, width, height, value)
Arguments
left Specifies the left position of the rectangle to be filled in pixels (relative to the image position).
top Specifies the top position of the rectangle to be filled in pixels (relative to the image position).
width Specifies the width of the rectangle to be filled in pixels (relative to the image position).
height Specifies the height of the rectangle to be filled in pixels (relative to the image position).
value Specifies the color or value to fill with.
The meaning of this value changes depending on the value of the Layer.face property.
dfAlpha (or dfBoth) : Specify the opacity and color in 0xAARRGGBB format. Both the main image and the mask will be filled.
dfAddAlpha : Specify the opacity and color in 0xAARRGGBB format. Both the main image and the mask will be filled.
dfOpaque (or dfMain) : Specify the color in 0xRRGGBB format. When the Layer.holdAlpha property is true, only the main image is filled, and the mask remains unchanged. When false, it accepts opacity and color in 0xAARRGGBB format, similar to dfAlpha or dfAddAlpha, and both the main image and the mask are filled.
dfMask : Specify the mask (opacity) value (0 to 255). Only the mask is filled, and the main image remains unchanged.
dfProvince : Specify the province (region) value (0 to 255). Only the province is filled.
Return Value
None (void)
Description
Fills the specified rectangle of the layer image using the specified method.