Hi people. Can someone describe me how the DL_MTextData actually works?
DL_MTextData(double ipx, double ipy, double ipz,
double dirx, double diry, double dirz,
double height, double width,
int attachmentPoint,
int drawingDirection,
int lineSpacingStyle,
double lineSpacingFactor,
const std::string& text,
const std::string& style,
double angle) :
My guess is that it takes attachmentPoint (let's say TOP-LEFT) and
sets the TOP-LEFT point of the text to be (ipx, ipy, ipz). Then the text is scaled
to the (width, height) size and then rotated by angle. I might be thinking
wrong, because I don't understand how (dirx,diry,dirz) fit here.
So can someone explain me how this text is generated?
Understanding the MTextData
Moderator: andrew
-
- Junior Member
- Posts: 12
- Joined: Thu Dec 03, 2015 11:20 am
Re: Understanding the MTextData
http://images.autodesk.com/adsk/files/a ... ce_enu.pdf
ipx, ipy, ipz is the "insertion point" (see DXF specification above)
dirx, diry, dirz is the "X-axis direction vector" (see DXF specification above)
dxflib does not use a direction vector when saving MTEXT entities, it saves the angle (code 50) instead. Contrary to what the DXF specification states, this angle is stored in degrees, not radians. This is an error in the DXF specification.
ipx, ipy, ipz is the "insertion point" (see DXF specification above)
dirx, diry, dirz is the "X-axis direction vector" (see DXF specification above)
dxflib does not use a direction vector when saving MTEXT entities, it saves the angle (code 50) instead. Contrary to what the DXF specification states, this angle is stored in degrees, not radians. This is an error in the DXF specification.
-
- Junior Member
- Posts: 12
- Joined: Thu Dec 03, 2015 11:20 am
Re: Understanding the MTextData
Thanks Andrew, that was helpful.
Best regards,
Dejan Zivkovic
Best regards,
Dejan Zivkovic