Layer.drawText

Function/Meaning
Draw text
Type
Method of Layer class
Syntax
drawText(x, y, text, color, opa=255, aa=true, shadowlevel=0, shadowcolor=0x000000, shadowwidth=0, shadowofsx=0, shadowofsy=0)
Arguments
x Specifies the x-coordinate (in image coordinates) of the origin where text drawing starts, in pixels.
y Specifies the y-coordinate (in image coordinates) of the origin where text drawing starts, in pixels.
text Specifies the text to be drawn.
color Specifies the color of the text to be drawn in 0xRRGGBB format.
opa Specifies the opacity of the text to be drawn (-255 to 0 to 255).
Specifying a negative number is only valid when Layer.face is dfAlpha; in this case, opacity is removed in the shape of the characters (the smaller the value, the greater the effect).
aa Specifies whether to perform anti-aliasing.
If true, anti-aliasing is performed. If false, it is not.
shadowlevel Specifies the opacity of the shadow. The appropriate value varies depending on the shadowwidth argument.
If 0 is specified, no shadow is drawn.
shadowcolor Specifies the color of the shadow in 0xRRGGBB format.
shadowwidth Specifies the width (blur) of the shadow. 0 is the sharpest (no blur), and increasing the value blurs the shadow.
shadowofsx Specifies the x-coordinate offset of the shadow position in pixels. If 0 is specified, the shadow is drawn directly below.
shadowofsy Specifies the y-coordinate offset of the shadow position in pixels. If 0 is specified, the shadow is drawn directly below.
Return Value
None (void)
Description
Draws text on the layer. Drawing is only possible when Layer.face is dfAlpha (or dfBoth), dfAddAlpha, or dfOpaque (or dfMain).
When dfOpaque (or dfMain) is specified, whether the destination mask is destroyed or protected depends on the Layer.holdAlpha property.
The font specified in Layer.font is used.