Text3d() error message

atype choices should be ycenter or baseline.
This commit is contained in:
Richard Milewski 2023-12-06 13:51:02 -08:00
parent defa54ae27
commit 80babcad69

View file

@ -2966,7 +2966,7 @@ module text3d(text, h, size=10, font="Helvetica", spacing=1.0, direction="ltr",
anchor, spin=0, orient=UP) { anchor, spin=0, orient=UP) {
no_children($children); no_children($children);
h = one_defined([h,height,thickness],"h,height,thickness",dflt=1); h = one_defined([h,height,thickness],"h,height,thickness",dflt=1);
assert(is_undef(atype) || in_list(atype,["ycenter","baseline"]), "atype must be \"center\" or \"baseline\""); assert(is_undef(atype) || in_list(atype,["ycenter","baseline"]), "atype must be \"ycenter\" or \"baseline\"");
assert(is_bool(center)); assert(is_bool(center));
atype = default(atype, center?"ycenter":"baseline"); atype = default(atype, center?"ycenter":"baseline");
anchor = default(anchor, center?CENTER:LEFT); anchor = default(anchor, center?CENTER:LEFT);