-
Notifications
You must be signed in to change notification settings - Fork 0
Object Text
XOYZ69 edited this page Sep 6, 2023
·
3 revisions
The text object is used to draw text.
The text object looks as the following:
{
"type": "text",
"desc": "Text",
"x": 0,
"y": "0%",
"color": "#000000",
"text": "Some Text",
"align": "center",
"font": "secrcode",
"font_style": null,
"font_size": 50,
"anchor": null,
"spacing": 15,
"padding": 50,
"logic": null,
"max_width": null,
"stretch_line": false
}
Parameter | Description | Default Value |
type | Defines the type of the object you are using and is mandatory for the interpreter to work. | - |
desc | Sets a description for your object that can help your differentiate between different objects or can explain what this specific object does. This parameter has no further impact on your design. | "Some Text" |
x | Sets the starting x coordinate of your object in pixel. Depending on your anchor and align setting. | 0 |
y | Sets the starting y coordinate of your object in pixel. Depending on your anchor and align setting. | 0 |
color | Sets the text color. | #000000 |
text | Sets the text to be displayed | "Some Text" |
align | This setting defines how the text should be aligned. The available alignments are: left, center, right | "center" |
font | Sets the font which is used to display the text | "secrcode" |
font_style |
Currently usupported
Set the font style if there are multiple style of the fonts available. the font style "bold" or the font "secrcode" will look for the font file "secrcode-bold". |
null |
font_size | Set a font size | 50 |
anchor | Set the anchor of the text object: lt, rb, mm, ... | null |
spacing | Set the space that is used to space lines when there are multiple lines to be displayed | 15 |
padding | - | 50 |
max_width | Set the maximum width for the text. If the line would be too long the programm will do a line break. Set to null to disbale this feature. | null |
stretch_line | If enabled the text will be stretched out using spaces between the words to fill out the entire width. | false |
logic | Apply logic for to an object. For more information on how logic works look into the logic section. | null |
Anything missing or inacurate? Please write an issue or contact me.