Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Changes
Page history
[~]drawing-functions.md: updated text()
authored
Apr 24, 2020
by
gibbonjoyeux
Show whitespace changes
Inline
Side-by-side
api/drawing-functions.md
View page @
33d0d535
...
...
@@ -267,6 +267,9 @@ Writes the passed `string` on the active layer at [`x`, `y`] coordinates. A
paragraph width can be passed for wrap modes. In this way, the text will wrap to
avoid paragraph width overflow.
When no wrap is set, you can easily print block formatted strings with carriage
returns and spaces. It can be useful to print drawn ascii art put into a strins.
### Parameters:
-
`string`
String: Text to be drawn
-
`x`
Number: x coordinate of the text
...
...
@@ -326,7 +329,7 @@ trimmed once it got out of the active layer.
-
`wrap_mode`
Mode: Wrapping mode of
`text()`
### Modes:
-
`TEXT_
TRIM
`
Default value, text is trimmed out of the active layer.
-
`TEXT_
BLOCK
`
Default value, text is trimmed out of the active layer.
-
`TEXT_WRAP_HARD`
Wrap text. Split words if necessary.
-
`TEXT_WRAP`
Wrap text without splitting words (exept if the word is bigger
than the text / paragraph width).
...
...
...
...