Layer.fillRect

Function/Meaning

Rectangle fill

Type
Layerclassmethod of
Syntax
fillRect(left, top, width, height, value)
Arguments
left

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

top

Specifies the top position of the rectangle to fill in pixels (at the image position).

width

Specifies the width of the rectangle to fill in pixels (at the image position).

height

Specifies the height of the rectangle to fill, in pixels (at the image position).

value

Specify the fill color and value.
This value depends on the value of the Layer.face property.

  • dfAlpha (Or dfBoth) : Specify the opacity and color in the 0xAARRGGBB format. Both the main and the mask are filled.
  • dfAddAlpha : Specify the opacity and color in the 0xAARRGGBB format. Both the main and the mask are filled.
  • dfOpaque (Or dfMain) : Specify the color in 0xRRGGBB format. When the Layer.holdAlpha property is true, only the main is filled and the mask remains. When false, it accepts opacity and color specifications in 0xAARRGGBB format, as with dfAlpha and dfAddAlpha, and fills both the main and mask.
  • dfMask : Specify a mask (opacity) value (0 to 255). Only the mask is filled and the main remains.
  • dfProvince : Specify a region value (0 to 255). Only the area is filled.
Return value
None (void)
Explanation

Fills the rectangle of the specified layer image in the specified way.