1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-03-14 02:59:42 +01:00

change param order

This commit is contained in:
Justin Lin 2019-02-01 16:13:48 +08:00
parent 4f4ca16c21
commit affafec4a0
3 changed files with 23 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View 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"
);
![multi_line_text](images/lib-multi_line_text-1.JPG)

View File

@ -9,7 +9,7 @@
* @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;
inc = line_spacing;
offset_y = inc * to / 2;