Skip to content

[mxcad_3d API Document](../README. md)/Mx3dAspectText

Class: Mx3dAspectText

Represents a class used to define text display properties. This type encapsulates methods for setting text color, font, height, angle, alignment, and orientation.

Hierarchy

Table of contents

Constructors

Methods

Constructors

constructor

new Mx3dAspectText()

Create a default text style object.

Overrides

Mx3dAspectObject.constructor

Methods

Angle

Angle(): number

Obtain the angle at which the text is displayed.

Returns

number

The perspective of the text.


Height

Height(): number

Get the height of the text display.

Returns

number

The height of the text.


HorizontalJustification

HorizontalJustification(): MxHorizontalTextAlignment

Get the horizontal alignment of the text.

Returns

MxHorizontalTextAlignment

Horizontal alignment method (MdGe. MxHorizontalTextAlignment).


Orientation

Orientation(): MxTextPath

Get the display orientation of the text.

Returns

MxTextPath

Text direction (MdGe. MxTextPath).


SetAngle

SetAngle(theAngle): void

Set the angle of text display.

Parameters

NameTypeDescription
The AnglenumberThe text angle to be set

Returns

void


SetColor

SetColor(theColor): void

Set the color for text display.

Parameters

NameTypeDescription
TheColor[Mx3dGeColor] (Mx3dGeColor. md)The color object to be set (Mx3dGeColor)

Returns

void


SetFont

SetFont(theFont): void

Set the font for displaying text.

Parameters

NameTypeDescription
The font name to be set is' theFont '' string '

Returns

void


SetHeight

SetHeight(theHeight): void

Set the height for displaying text.

Parameters

NameTypeDescription
TheHeightNumberThe text height to be set

Returns

void


SetHorizontalJustification

SetHorizontalJustification(theJustification): void

Set the horizontal alignment of the text.

Parameters

NameTypeDescription
The Justification[MxHorizontalTextAlignment] (../enums/MdGe. MxHorizontalTextAlignment. md)The horizontal alignment method to be set (MdGe. MxHorizontalTextAlignment)

Returns

void


SetOrientation

SetOrientation(theOrientation): void

Set the display direction of the text.

Parameters

NameTypeDescription
The Orientation[MxTextPath] (../enums/MdGe. MxTextPath. md)The text direction to be set (MdGe. MxTextPath)

Returns

void


SetVerticalJustification

SetVerticalJustification(theJustification): void

Set the vertical alignment of the text.

Parameters

NameTypeDescription
The Justification[MxVerticalTextAlignment] (../enums/MdGe. MxVerticalTextAlignment. md)The vertical alignment method to be set (MdGe. MxVerticalTextAlignment)

Returns

void


VerticalJustification

VerticalJustification(): MxVerticalTextAlignment

Get the vertical alignment of the text.

Returns

MxVerticalTextAlignment

Vertical alignment method (MdGe. MxVerticalTextAlignment).