Closed thobl closed 1 month ago
The attributes
in the constructor reflect the environment set in Ipe when creating objects. Text is by default not transformable, even if everything else is - to make it transformable, you also need to set transformabletext
. So the following should work:
local text = ipe.Text(
{horizontalalignment="hcenter",
verticalalignment="vcenter",
transformabletext=true,
transformations="affine"},
"some text", ipe.Vector(0, 0))
I've fixed the misspelled attribute names in the documentation - thanks!
The documentation of Attributes/Properties (https://ipe.otfried.org/ipelib/luaobj.html) does not seem to match the actual behavior.
Specifically, the following code works:
Judging from the documentation, the following should have the same effect, but it does not set the transformations to affine.
Also, the names for the alignment attributes in the documentation are
horizontalAlignment
/verticalAlignment
and nothorizontalalignment
/verticalalignment
(the latter works, the former does not).