Entities

entities/mtext

#include "dxfio/entities/mtext.hpp"

In DxfIO::Entities

struct Columns

The columns of an MTEXT, which R2018 writes as an embedded object.

FieldType and defaultMeaning
Attachmentint{1}The attachment point, as group 71 of the MTEXT gives it. Group 70.
DirectionVector{.X = 1}The direction of the text, in world coordinates. Groups 10, 20, 30.
PositionVectorThe insertion point, in world coordinates. Groups 11, 21, 31.
WidthdoubleThe width of the text's frame. Group 40.
HeightdoubleThe height of the text's frame. Group 41.
ExtentdoubleThe width the text fills. Group 42.
DepthdoubleThe height the text fills. Group 43.
Kindint0 no columns, 1 static, 2 dynamic. Group 71.
Countint{1}The number of columns. Group 72.
Breadthdouble{1}The width of a column. Group 44.
GutterdoubleThe gap between columns. Group 45.
AutomaticboolWhether the height of the columns follows the text. Group 73.
ReversedboolWhether the text flows through the columns in reverse. Group 74.
Heightsstd::vector<double>The height of each column, when the columns differ. Group 46.

struct Paragraph

The AcDbMText subclass of an MTEXT: its text with its formatting codes, its frame and its background.

FieldType and defaultMeaning
PositionVectorThe insertion point, in world coordinates. Groups 10, 20, 30.
HeightdoubleThe height of the letters, in drawing units. Group 40.
WidthdoubleThe width of the frame the text wraps in. Group 41.
DefineddoubleThe height of the frame, when the text has columns. Group 46, from R2007.
Attachmentint{1}The attachment point: 1 top left, 2 top center, 3 top right, 4 to 6 middle, 7 to 9 bottom. Group 71.
Flowint{Styled}The drawing direction: 1 left to right, 3 top to bottom, 5 as the text style has it. Group 72.
Valuestd::stringWhat the text says, with its formatting codes. Group 3 for each 250 characters but the last, then group 1.
StyleSymbol{"Standard"}The name of the text style. Group 7.
ExtrusionVector{Up}The normal of the plane the entity is drawn in. Groups 210, 220, 230.
Directionstd::optional<Vector>The direction of the text's X axis, in world coordinates, when the file gives it rather than a rotation. Groups 11, 21, 31.
Rotationstd::optional<double>The rotation, when the file gives it rather than a direction. Group 50.
Spacingint{1}The line spacing style: 1 at least, 2 exactly. Group 73.
Factordouble{1}The line spacing, as a factor of the default. Group 44.
FillintThe background: 0 none, 1 a color, 2 the drawing window's color, and 16 a frame from R2018. Group 90, from R2004.
Colorstd::optional<int>The AutoCAD Color Index of the background. Group 63, from R2004.
Rgbstd::optional<int>The true color of the background, as 0xRRGGBB. Group 421, from R2004.
Bookstd::optional<std::string>The color book of the background and the color's name in it, joined by a $, when the color comes from one. Group 431, from R2004.
Marginstd::optional<double>How far the background reaches past the text, as a factor of the letter height. Group 45, from R2004.
Transparencystd::optional<int>The transparency of the background. Group 441, from R2004.
Columnsstd::optional<Entities::Columns>The columns, when the text has some. From R2018.

struct MTextMTEXT

An MTEXT: a paragraph of text that wraps in its frame, formatted by codes in the text.

FieldTypeMeaning
RecordEntities::RecordThe layer, linetype, color and the rest every entity carries.
ParagraphBoxed<Entities::Paragraph>The text, its frame and its background, from the AcDbMText subclass.

Constants

Styledint = 5The drawing direction that takes the text style's own.