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.
| Field | Type and default | Meaning |
|---|---|---|
Attachment | int{1} | The attachment point, as group 71 of the MTEXT gives it. Group 70. |
Direction | Vector{.X = 1} | The direction of the text, in world coordinates. Groups 10, 20, 30. |
Position | Vector | The insertion point, in world coordinates. Groups 11, 21, 31. |
Width | double | The width of the text's frame. Group 40. |
Height | double | The height of the text's frame. Group 41. |
Extent | double | The width the text fills. Group 42. |
Depth | double | The height the text fills. Group 43. |
Kind | int | 0 no columns, 1 static, 2 dynamic. Group 71. |
Count | int{1} | The number of columns. Group 72. |
Breadth | double{1} | The width of a column. Group 44. |
Gutter | double | The gap between columns. Group 45. |
Automatic | bool | Whether the height of the columns follows the text. Group 73. |
Reversed | bool | Whether the text flows through the columns in reverse. Group 74. |
Heights | std::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.
| Field | Type and default | Meaning |
|---|---|---|
Position | Vector | The insertion point, in world coordinates. Groups 10, 20, 30. |
Height | double | The height of the letters, in drawing units. Group 40. |
Width | double | The width of the frame the text wraps in. Group 41. |
Defined | double | The height of the frame, when the text has columns. Group 46, from R2007. |
Attachment | int{1} | The attachment point: 1 top left, 2 top center, 3 top right, 4 to 6 middle, 7 to 9 bottom. Group 71. |
Flow | int{Styled} | The drawing direction: 1 left to right, 3 top to bottom, 5 as the text style has it. Group 72. |
Value | std::string | What the text says, with its formatting codes. Group 3 for each 250 characters but the last, then group 1. |
Style | Symbol{"Standard"} | The name of the text style. Group 7. |
Extrusion | Vector{Up} | The normal of the plane the entity is drawn in. Groups 210, 220, 230. |
Direction | std::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. |
Rotation | std::optional<double> | The rotation, when the file gives it rather than a direction. Group 50. |
Spacing | int{1} | The line spacing style: 1 at least, 2 exactly. Group 73. |
Factor | double{1} | The line spacing, as a factor of the default. Group 44. |
Fill | int | The background: 0 none, 1 a color, 2 the drawing window's color, and 16 a frame from R2018. Group 90, from R2004. |
Color | std::optional<int> | The AutoCAD Color Index of the background. Group 63, from R2004. |
Rgb | std::optional<int> | The true color of the background, as 0xRRGGBB. Group 421, from R2004. |
Book | std::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. |
Margin | std::optional<double> | How far the background reaches past the text, as a factor of the letter height. Group 45, from R2004. |
Transparency | std::optional<int> | The transparency of the background. Group 441, from R2004. |
Columns | std::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.
| Field | Type | Meaning |
|---|---|---|
Record | Entities::Record | The layer, linetype, color and the rest every entity carries. |
Paragraph | Boxed<Entities::Paragraph> | The text, its frame and its background, from the AcDbMText subclass. |
Constants
Styled | int = 5 | The drawing direction that takes the text style's own. |