Table of Contents

Class vdMText

Namespace
VectorDraw.Professional.vdFigures
Assembly
VectorDraw.Professional.dll

Implements all functionality for the vdMtext object.

public sealed class vdMText : vdFigure, IDisposable, IVDSerialise, IBaseObject
Inheritance
vdMText
Implements
Inherited Members

Remarks

The vdMText class represents multi-line formatted text. It parses mtext-style escape sequences (for example, "\H", "\f", "\S", color commands, and paragraph/line breaks) and creates internal vdText and vdLine primitives used for rendering. Support also import export RTF formatted text.

Example:

// Create a new document (doc) and add an MText
var m = new VectorDraw.Professional.vdFigures.vdMText(doc);
m.InsertionPoint = new VectorDraw.Geometry.gPoint(0, 0, 0);
m.Height = 3.0;
m.TextString = "Hello\\nWorld \\fArial;\\H2x;Big";
m.BoxWidth = 50.0;
doc.Model.Entities.AddItem(m);
doc.ZoomExtents();
doc.Redraw(false);

Constructors

vdMText()

The constructor of the vdMtext object where the default initialization is commited.

vdMText(vdDocument)

Initializes a new instance of the vdMtext object and registers it to the passed Document.

vdMText(vdDocument, string, gPoint, double)

Initializes a new instance of the vdMtext object and registers it to the passed Document.

Properties

AlignToView

A boolean value that defines if the plane of the object is relative to the current view.

AlignToViewSize

Get/Set the height of the object in output Device millimeters for positive or hundreds of millimeters for negative.

BackGroundMask

Get/Set a boolean value that represents if the backgroundmask color will be used.

BackGroundMaskBorderColor

Get/Set the vdColor that the border of the mtext will be drawn.

BackGroundMaskBorderPenWidth

Get/Set the object's backgroundMaskBorder pen width in drawing units.

BackGroundMaskColor

Get/Set the vdColor that will fill the box of the mtext.

BackGroundMaskOffset

Get/Set the object's backgroundMask offset.

BackgroundMaskBorder

Get/Set a boolean value that represents if the BackgroundMaskBorder color will be used.

BoundingBox

Gets the Bounding Box of the vdMtext object in WorldCoordinate System.

BoxWidth

The width of the Mtext object in drawing units.Lines are broken if they exceed this value.

BreakCharacters

Get/Set a value representing if the Mtext will "cut" new lines (when BoxWidth is not 0.0) for every character and not only spaces.

ECSMatrix

Gets the transformation Matrix that converts coordinates from the object's local coordinate system (object coordinate system, OCS) to the World Coordinate System (WCS).

ExtrusionVector

Get/Set the extrusion vector of the Mtext object.

Flag

Not supported for vdMText Object.Always return LEFTTORIGHT

Height

The height of the texts of the Mtext object.

HorJustify

Get/Set the Horizontal justification of the object.

InsertionPoint

Get/Set the insertion point of the vdMtext object in World Coordinate System(WCS).

LineSpaceStyle

Get/Set the line spacing style of the vdMtext object.

LineSpacingFactor

Get/Set a value adjusting the space between the lines of the Mtext.

Rotation

The rotation of the Mtext object. All texts consisting the object will be rotated using this value.

StringScale

A value indicating a scale factor used internally for drawing calculations.

Style

This is the default vdTextstyle that the texts will inherit.

TextBox

It is the bounding box of the text in Entity Coordinate System(ECS)

TextString

The string that describes the Mtext object.

Thickness

Get/Set the object's thickness in Drawing Units.

VerJustify

Get/Set the vertical justification of the object.

isLeaderMtext

Returns true if the Mtext is connected to a vdLeader.

Methods

DeSerialize(DeSerializer, string, object)

This Function is called foreach field name of the vdMtext object when opening in vdml format.

Draw(vdRender)

Called in order to draw the object in a specified vdRender object.

DrawGrip(int, Box, vdRender)

Overriden function in order to draw the insertion point of the vdMtext object differently.

Explode()

Explodes the vdMtext object into vdText objects.

GetActualStringArray()

Get an array of strings representing the actual text of the Mtext without the extra commands. Every line of the Mtext is represented as a different string.

GetBackgroundBorderPolyline()

Calculates and returns a vdPolyline used when BackgroundMaskBorder is true.

GetCompareHash()

Returns a unique 32 bit integer value according to the object type and its properties values

GetGripPoints()

A function returning the grip points of the object.

GetTableDependecies(vdTableDependeciesArgs)

Fills the passed vdTableDependeciesArgs args with all the table references of this object (vdLayer, vdBlock, vdDimstyle, vdLineType, vdTextstyle, vdImageDef, vdHatchPattern etc).

GetValidGripPointsItems()

Returns the number of valid grip points of the object. Must return the same number of points as the GetGripPoints() method.

InitializeProperties()

Resets the properties of the vdMtext object to the Default values.

InternalSetOwner(vdBaseObject)

Internally used only.

Set the object owner

Invalidate()

Invalidates the object's Bounding Box and causes the control to be redrawn in this region.

IsMtextSimple()

Returns true if the Mtext only has lines and no other special atribute like color,font etc...

MatchProperties(vdPrimary, vdDocument)

Matches all the common properties from an object and sets them to this object.

MoveGripPointsAt(Int32Array, double, double, double)

This function is intended to be called during a grip edit of the object.

Serialize(Serializer)

This Function is called when saving the vdMtext object to vdml format.

ToString()

Gets a System.String that represents the type of the vdMtext Object.

Transformby(Matrix)

Transforms all geometrical properties of this object by the specified Matrix.

Update()

Updates the object after change of properties.

contentsRTF()

Returns an RTF encoded string that is a translated version of the contents.

getOsnapPoints(Matrix, OsnapMode, gPoint, gPoint, int, OsnapPoints)

Overrrides the getOsnapPoints(Matrix, OsnapMode, gPoint, gPoint, int, OsnapPoints).

setContentsRTF(string)

Sets the character content of this MText entity from the RTF-encoded text string.