Canvacord

TextGenerationStep

Properties

align

The alignment of the text.

Type:'left'|'center'|'right'

baseline

The baseline of the text.

Type:'top'|'middle'|'bottom'

color

The color of the text.

Type:string

direction

The directionality of the text.

Type:'inherit'|'ltr'|'rtl'

font

The font of the text.

Type:string

lineHeight

The line height of the text.

Type:number

lineWidth

The line width of the text.

Type:number

maxWidth

The maximum width of the text.

Type:number

postprocess

The function to call after processing has finished.

Type:(canvas: Canvas, ctx: SKRSContext2D, text: TextGenerationStep) =>| void

preprocess

The function to call before processing this step.

Type:(canvas: Canvas, ctx: SKRSContext2D, text: TextGenerationStep) =>| void

process

The function to call when processing this step.

Type:(canvas: Canvas, ctx: SKRSContext2D, text: TextGenerationStep) =>| void

stroke

Whether to stroke the text.

Type:boolean

value

The text to render.

Type:string

x

The x position of the text.

Type:number

y

The y position of the text.

Type:number