mxcad_3d API 文档 / Mx3dAspectText
Class: Mx3dAspectText 
表示用于定义文本显示属性的类。 此类封装了设置文本颜色、字体、高度、角度、对齐方式和方向的方法。
Hierarchy 
- ↳ - Mx3dAspectText
Table of contents 
Constructors 
Methods 
- Angle
- Height
- HorizontalJustification
- Orientation
- SetAngle
- SetColor
- SetFont
- SetHeight
- SetHorizontalJustification
- SetOrientation
- SetVerticalJustification
- VerticalJustification
Constructors 
constructor 
• new Mx3dAspectText()
创建一个默认的文字样式对象。
Overrides 
Mx3dAspectObject.constructor
Methods 
Angle 
▸ Angle(): number
获取文本显示的角度。
Returns 
number
文本的角度。
Height 
▸ Height(): number
获取文本显示的高度。
Returns 
number
文本的高度。
HorizontalJustification 
▸ HorizontalJustification(): MxHorizontalTextAlignment
获取文本的水平对齐方式。
Returns 
水平对齐方式(MdGe.MxHorizontalTextAlignment)。
Orientation 
▸ Orientation(): MxTextPath
获取文本的显示方向。
Returns 
文本方向(MdGe.MxTextPath)。
SetAngle 
▸ SetAngle(theAngle): void
设置文本显示的角度。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theAngle | number | 要设置的文本角度。 | 
Returns 
void
SetColor 
▸ SetColor(theColor): void
设置文本显示的颜色。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theColor | Mx3dGeColor | 要设置的颜色对象(Mx3dGeColor)。 | 
Returns 
void
SetFont 
▸ SetFont(theFont): void
设置文本显示的字体。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theFont | string | 要设置的字体名称。 | 
Returns 
void
SetHeight 
▸ SetHeight(theHeight): void
设置文本显示的高度。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theHeight | number | 要设置的文本高度。 | 
Returns 
void
SetHorizontalJustification 
▸ SetHorizontalJustification(theJustification): void
设置文本的水平对齐方式。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theJustification | MxHorizontalTextAlignment | 要设置的水平对齐方式(MdGe.MxHorizontalTextAlignment)。 | 
Returns 
void
SetOrientation 
▸ SetOrientation(theOrientation): void
设置文本的显示方向。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theOrientation | MxTextPath | 要设置的文本方向(MdGe.MxTextPath)。 | 
Returns 
void
SetVerticalJustification 
▸ SetVerticalJustification(theJustification): void
设置文本的垂直对齐方式。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theJustification | MxVerticalTextAlignment | 要设置的垂直对齐方式(MdGe.MxVerticalTextAlignment)。 | 
Returns 
void
VerticalJustification 
▸ VerticalJustification(): MxVerticalTextAlignment
获取文本的垂直对齐方式。
Returns 
垂直对齐方式(MdGe.MxVerticalTextAlignment)。