$strokeText
Draws a stroked (outlined) text.
Usage
$strokeText[canvas;text;style;font?;x;y;lineWidth?;maxWidth?;align?;baseline?;multiline?;wrap?;lineOffset?]Parameters
| Field | Type | Description | Required |
|---|---|---|---|
| canvas | String | Name of the canvas to draw the text on. | True |
| text | String | The text to draw. | True |
| style | Color | Gradient | Pattern | The text style. | True |
| font | String | The text font. | False |
| x | Number | The X coordinate of the text. | True |
| y | Number | The Y coordinate of the text. | True |
| lineWidth | Number | The stroke (outline) width. | False |
| maxWidth | Number | The text max width. | False |
| align | ”end” | “left” | “center” | “right” | “start” | The text align. | False |
| baseline | ”top” | “hanging” | “middle” | “alphabetic” | “ideographic” | “bottom” | 0 | 1 | 2 | 3 | 4 | 5 | The text baseline. | False |
| multiline | Boolean | Indicates if the text should be drawn in multiple lines if it exceeds the maximum width. | False |
| wrap | Boolean | Wraps the text if true. | False |
| lineOffset | Number | The line offset. | False |
Example(s)
No examples for this function.

Raw Info
{ "name": "$strokeText", "description": "Draws a stroked (outlined) text.", "params": [ { "name": "canvas", "description": "Name of the canvas to draw the text on.", "type": "String", "required": true }, { "name": "text", "description": "The text to draw.", "type": "String", "required": true }, { "name": "style", "description": "The text style.", "type": "Color | Gradient | Pattern", "required": true }, { "name": "font", "description": "The text font.", "type": "String", "required": false }, { "name": "x", "description": "The X coordinate of the text.", "type": "Number", "required": true }, { "name": "y", "description": "The Y coordinate of the text.", "type": "Number", "required": true }, { "name": "lineWidth", "description": "The stroke (outline) width.", "type": "Number", "required": false }, { "name": "maxWidth", "description": "The text max width.", "type": "Number", "required": false }, { "name": "align", "description": "The text align.", "type": "\"end\" | \"left\" | \"center\" | \"right\" | \"start\"", "required": false, "enum": { "start": "end", "right": "left", "center": "center", "left": "right", "end": "start" } }, { "name": "baseline", "description": "The text baseline.", "type": "\"top\" | \"hanging\" | \"middle\" | \"alphabetic\" | \"ideographic\" | \"bottom\" | 0 | 1 | 2 | 3 | 4 | 5", "required": false, "enum": { "0": "top", "1": "hanging", "2": "middle", "3": "alphabetic", "4": "ideographic", "5": "bottom", "top": 0, "hanging": 1, "middle": 2, "alphabetic": 3, "ideographic": 4, "bottom": 5 } }, { "name": "multiline", "description": "Indicates if the text should be drawn in multiple lines if it exceeds the maximum width.", "type": "Boolean", "required": false }, { "name": "wrap", "description": "Wraps the text if true.", "type": "Boolean", "required": false }, { "name": "lineOffset", "description": "The line offset.", "type": "Number", "required": false } ], "usage": "$strokeText[canvas;text;style;font?;x;y;lineWidth?;maxWidth?;align?;baseline?;multiline?;wrap?;lineOffset?]", "category": "canvas", "src": "https://github.com/devlordduck/aoi.canvas/tree/v2/src/functions/canvas/strokeText.ts", "docs": "https://aoicanvas.vercel.app/functions/stroketext"}