Add horizontal alignment argument to LText module

This commit is contained in:
Joel Ebel 2018-05-05 22:06:54 -04:00
parent c65efe43dd
commit 3d17e5a9da

View File

@ -375,12 +375,13 @@ module SquareHole(OnOff, Sx, Sy, Sl, Sw, Filet) {
Font: Font to use for text
Size: Approximate Height of text in mm.
Content: The text
HAlign: Text alignment. Defaults to "center"
*/
module LText(OnOff,Tx,Ty,Font,Size,Content) {
module LText(OnOff,Tx,Ty,Font,Size,Content, HAlign="center") {
if (OnOff == 1) {
translate([Tx, Ty, Thick + .5]) {
linear_extrude(height=0.5) {
text(Content, size=Size, font=Font);
text(Content, size=Size, font=Font, halign=HAlign);
}
}
}