mxcad_3d API 文档 / Mx3dSymbolText
Class: Mx3dSymbolText 
表示一个文字符号,继承自 Mx3dSymbolObject
Hierarchy 
- ↳ - Mx3dSymbolText
Table of contents 
Constructors 
Methods 
- FontAspect
- HasFlipping
- HasOrientation3D
- HasOwnAnchorPoint
- Orientation3D
- Position
- SetAngle
- SetColor
- SetColorSubTitle
- SetDisplayType
- SetFlipping
- SetFont
- SetFontAspect
- SetHJustification
- SetHeight
- SetOrientation3D
- SetOwnAnchorPoint
- SetPositon
- SetText
- SetVJustification
- SetZoomable
- UnsetOrientation3D
Constructors 
constructor 
• new Mx3dSymbolText()
创建一个默认的文字符号对象。
Overrides 
Mx3dSymbolObject.constructor
• new Mx3dSymbolText(text, height, position)
使用文本、高度和位置创建一个文字符号对象。
Parameters 
| Name | Type | Description | 
|---|---|---|
| text | string | 文本内容。 | 
| height | number | 文本高度。 | 
| position | Mx3dGePoint | 文本位置。 | 
Overrides 
Mx3dSymbolObject.constructor
Methods 
FontAspect 
▸ FontAspect(): MxFontAspect
获取字体样式。
Returns 
字体外观样式。
HasFlipping 
▸ HasFlipping(): boolean
检查是否翻转。
Returns 
boolean
是否翻转。
HasOrientation3D 
▸ HasOrientation3D(): boolean
检查是否有3D方向。
Returns 
boolean
是否有3D方向。
HasOwnAnchorPoint 
▸ HasOwnAnchorPoint(): boolean
检查是否有自定义锚点。
Returns 
boolean
是否有自定义锚点。
Orientation3D 
▸ Orientation3D(): Mx3dGeCSYSR
获取3D方向。
Returns 
3D方向。
Position 
▸ Position(): Mx3dGePoint
获取文本位置。
Returns 
文本位置。
SetAngle 
▸ SetAngle(theAngle): void
设置文本角度。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theAngle | number | 文本角度。 | 
Returns 
void
SetColor 
▸ SetColor(theColor): void
设置文本颜色。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theColor | Mx3dGeColor | 颜色对象。 | 
Returns 
void
▸ SetColor(theR, theG, theB): void
设置文本颜色。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theR | number | 红色分量。 | 
| theG | number | 绿色分量。 | 
| theB | number | 蓝色分量。 | 
Returns 
void
SetColorSubTitle 
▸ SetColorSubTitle(theR, theG, theB): void
设置副标题颜色。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theR | number | 红色分量。 | 
| theG | number | 绿色分量。 | 
| theB | number | 蓝色分量。 | 
Returns 
void
SetDisplayType 
▸ SetDisplayType(theDisplayType): void
设置显示类型。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theDisplayType | MxTypeOfDisplayText | 显示类型。 | 
Returns 
void
SetFlipping 
▸ SetFlipping(theIsFlipping): void
设置是否翻转。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theIsFlipping | boolean | 是否翻转。 | 
Returns 
void
SetFont 
▸ SetFont(theFont): void
设置字体。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theFont | string | 字体名称。 | 
Returns 
void
SetFontAspect 
▸ SetFontAspect(theFontAspect): void
设置字体样式。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theFontAspect | MxFontAspect | 字体样式。 | 
Returns 
void
SetHJustification 
▸ SetHJustification(theHJust): void
设置水平对齐方式。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theHJust | MxHorizontalTextAlignment | 水平对齐方式。 | 
Returns 
void
SetHeight 
▸ SetHeight(height): void
设置文本高度。
Parameters 
| Name | Type | Description | 
|---|---|---|
| height | number | 文本高度。 | 
Returns 
void
SetOrientation3D 
▸ SetOrientation3D(theOrientation): void
设置3D方向。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theOrientation | Mx3dGeCSYSR | 3D方向。 | 
Returns 
void
SetOwnAnchorPoint 
▸ SetOwnAnchorPoint(theOwnAnchorPoint): void
设置是否有自定义锚点。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theOwnAnchorPoint | boolean | 是否有自定义锚点。 | 
Returns 
void
SetPositon 
▸ SetPositon(position): void
设置文本位置。
Parameters 
| Name | Type | Description | 
|---|---|---|
| position | Mx3dGePoint | 文本位置。 | 
Returns 
void
SetText 
▸ SetText(text): void
设置文本内容。
Parameters 
| Name | Type | Description | 
|---|---|---|
| text | string | 文本内容。 | 
Returns 
void
SetVJustification 
▸ SetVJustification(theVJust): void
设置垂直对齐方式。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theVJust | MxVerticalTextAlignment | 垂直对齐方式。 | 
Returns 
void
SetZoomable 
▸ SetZoomable(theIsZoomable): void
设置是否可缩放。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theIsZoomable | boolean | 是否可缩放。 | 
Returns 
void
UnsetOrientation3D 
▸ UnsetOrientation3D(): void
取消3D方向设置。
Returns 
void