Loading openscad/libs/utilities.scad +13 −1 Original line number Diff line number Diff line Loading @@ -1228,7 +1228,19 @@ module flatten(shift=true){ } } module two_line_text(message1="", message2="", shift_up=10, size=14, halign="center", font=undef){ /* Make a 2-line text message Defaults to a single line if the second line is empty param message1: top line message string param message1: bottom line message string. Can be empty or undef param shift_up: optionally shift the message up when there are two lines, e.g. to keep vertical centre param size: type size - as defined in OpenSCAD text() param halign: horizontal text alignment - as defined in OpenSCAD text() param font: OpenSCAD font */ module two_line_text(message1="", message2="", shift_up=0, size=14, halign="center", font=undef){ up = ((message2=="") || (is_undef(message2)))? 0 : shift_up; font_def = if_undefined_set_default(font, "Liberation Sans"); spacing = size * 1.43; Loading Loading
openscad/libs/utilities.scad +13 −1 Original line number Diff line number Diff line Loading @@ -1228,7 +1228,19 @@ module flatten(shift=true){ } } module two_line_text(message1="", message2="", shift_up=10, size=14, halign="center", font=undef){ /* Make a 2-line text message Defaults to a single line if the second line is empty param message1: top line message string param message1: bottom line message string. Can be empty or undef param shift_up: optionally shift the message up when there are two lines, e.g. to keep vertical centre param size: type size - as defined in OpenSCAD text() param halign: horizontal text alignment - as defined in OpenSCAD text() param font: OpenSCAD font */ module two_line_text(message1="", message2="", shift_up=0, size=14, halign="center", font=undef){ up = ((message2=="") || (is_undef(message2)))? 0 : shift_up; font_def = if_undefined_set_default(font, "Liberation Sans"); spacing = size * 1.43; Loading