[Drawkit] DKTextShape rotation
Allan
allandaly at gmail.com
Thu Feb 12 09:51:50 PST 2009
Hi Graham,
I'm still working on implementing the TEXT entity import from the DXF
format into DK. It has been a tougher nut to crack than I expected.
Here's my current issue that I wonder if you could comment on.
In AutoCAD (and the resulting DXF) when TEXT is rotated it is not
necessarily rotated around the center point. AutoCAD uses the concept
of an "insertion point" which is the origin or base point of the TEXT
object. If you rotate text, it gets rotated with respect to this
insertion point.
I think that in DK all DrawableObject rotations happen around the
object center/middle point. Is that correct? If so, for me to place a
rotated text object correctly would require me to do some math where I
would use the AutoCAD insertion point and the rotation angle with some
sines and cosines to figure out the correct DK origin and then apply
the rotation.
Is that right? All DK objects are rotated around the center/middle? Or
is there a clever DK method to modify the rotation point for an object
that I could use to more directly get the TEXT object located correctly?
Thanks for any help you can send.
-Allan
More information about the Drawkit
mailing list