mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-22 14:23:23 +02:00
change param order
This commit is contained in:
BIN
docs/images/lib-multi_line_text-1.JPG
Normal file
BIN
docs/images/lib-multi_line_text-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
22
docs/lib-multi_line_text.md
Normal file
22
docs/lib-multi_line_text.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# multi_line_text
|
||||||
|
|
||||||
|
Creates multi-line text from a list of strings. Parameters are the same as the built-in text module except the first two parameters.
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
|
||||||
|
- `lines` : A list of strings.
|
||||||
|
- `line_spacing` : Spacing between two lines.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
include <multi_line_text.scad>;
|
||||||
|
|
||||||
|
multi_line_text(
|
||||||
|
["Welcome", "to", "Taiwan"],
|
||||||
|
line_spacing = 15,
|
||||||
|
valign = "center",
|
||||||
|
halign = "center"
|
||||||
|
);
|
||||||
|
|
||||||
|

|
||||||
|
|
@@ -9,7 +9,7 @@
|
|||||||
* @see https://openhome.cc/eGossip/OpenSCAD/lib-multi_line_text.html
|
* @see https://openhome.cc/eGossip/OpenSCAD/lib-multi_line_text.html
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
module multi_line_text(lines, size = 10, font = "Arial", halign = "left", valign = "baseline", line_spacing = 15, direction = "ltr", language = "en", script = "latin"){
|
module multi_line_text(lines, line_spacing = 15, size = 10, font = "Arial", halign = "left", valign = "baseline", direction = "ltr", language = "en", script = "latin"){
|
||||||
to = len(lines) - 1;
|
to = len(lines) - 1;
|
||||||
inc = line_spacing;
|
inc = line_spacing;
|
||||||
offset_y = inc * to / 2;
|
offset_y = inc * to / 2;
|
||||||
|
Reference in New Issue
Block a user