Layer.drawGlyph

Function/Meaning

Character drawing

Type
Layerclassmethod of
Syntax
drawGlyph(x, y, glyph, color, opa=255, aa=true, shadowlevel=0, shadowcolor=0, shadowwidth=0, shadowofsx=0, shadowofsy=0)
Arguments
x

Specifies the x-coordinate (at the image position) of the origin where the character drawing starts, in pixels.

y

Specifies the y coordinate (at the image position) of the origin where the character drawing starts, in pixels.

glyph

Specifies the glyph to draw.

color

Specifies the color of the characters to draw in the 0xRRGGBB format.

opa

Specifies the opacity (-255 to 0 to 255) of the characters to draw.
Negative numbers are only valid if face is dfAlpha, in which case the opacity of the character shape will be removed (the smaller the value, the greater the effect).

aa

Specifies whether to perform antialiasing.
If true is specified, antialiasing will be performed.
If you specify false, it will not be done.

shadowlevel

Specifies the opacity of the shadow.
The appropriate value will vary depending on the value of the shadowwidth argument.
If you specify 0, no shadow is drawn.

shadowcolor

Specifies the shadow color in 0xRRGGBB format.

shadowwidth

Specifies the shadow width (blurring).
0 is the sharpest (no blur), and increasing the value will blur the shadow.

shadowofsx

Specifies the x-coordinate value of the shadow position, in pixels.
If you specify 0, the shadow is drawn directly below.

shadowofsy

Specifies the y-coordinate value of the shadow position, in pixels.
If you specify 0, the shadow is drawn directly below.

Return value
None (void)
Explanation

Draw a glyph on the layer.
A glyph specifies an array of the form glyph: Array [9] = [width, height, originx, originy, incx, incy, inc, bitmap (Octet), colors].
If the glyph colors are omitted, it is considered to be 256 gradations.