# Class: GraphicText

## GraphicText()

#### new GraphicText()

Source:
  - GraphicText.js, line 13

### Methods

#### (async, static) createObj() → {Promise.<GraphicText>}

构造一个新的 GraphicText 对象。

Source:
  - GraphicText.js, line 34

##### Returns:

Type
  Promise.<GraphicText>

#### (async, static) getAnchorPoint() → {Promise.<PointF>}

获取锚点

Source:
  - GraphicText.js, line 263

##### Returns:

文本锚点的位置：左下角为(0,0),右上角为(1,1)

Type
  Promise.<PointF>

#### (async, static) getFontSize() → {Promise.<Number>}

获取字体大小

Source:
  - GraphicText.js, line 162

##### Returns:

Type
  Promise.<Number>

#### (async, static) getPoint() → {Promise.<Dot>}

获取文本的位置

Source:
  - GraphicText.js, line 122

##### Returns:

Type
  Promise.<Dot>

#### (async, static) getText() → {Promise.<String>}

获取文本

Source:
  - GraphicText.js, line 142

##### Returns:

Type
  Promise.<String>

#### (async, static) getTextHeight() → {Promise.<Number>}

获取文本高度

Source:
  - GraphicText.js, line 222

##### Returns:

Type
  Promise.<Number>

#### (async, static) getTextWidth() → {Promise.<Number>}

获取文本宽度

Source:
  - GraphicText.js, line 202

##### Returns:

Type
  Promise.<Number>

#### (async, static) isSlope() → {Promise.<Boolean>}

获取是否随地图倾斜

Source:
  - GraphicText.js, line 182

##### Returns:

Type
  Promise.<Boolean>

#### (async, static) setAnchorPointByPoint(anchorPoint) → {Promise.<void>}

设置锚点

##### Parameters:

Name | Type | Description
--- | --- | ---
`anchorPoint` | PointF | 文本锚点的位置：左下角为(0,0),右上角为(1,1)

Source:
  - GraphicText.js, line 243

##### Returns:

Type
  Promise.<void>

#### (async, static) setFontSize(fontSize) → {Promise.<void>}

设置字体大小

##### Parameters:

Name | Type | Description
--- | --- | ---
`fontSize` | Number | 字体大小

Source:
  - GraphicText.js, line 87

##### Returns:

Type
  Promise.<void>

#### (async, static) setPoint(point) → {Promise.<void>}

设置位置

##### Parameters:

Name | Type | Description
--- | --- | ---
`point` | Dot | 定位点相对于文字的位置

Source:
  - GraphicText.js, line 51

##### Returns:

Type
  Promise.<void>

#### (async, static) setReferenceInfo(referenceWidth, referenceHeight, referenceInterval, anchorPoint) → {Promise.<void>}

设置锚点

##### Parameters:

Name | Type | Description
--- | --- | ---
`referenceWidth` | Number | 参考宽度
`referenceHeight` | Number | 参考高度
`referenceInterval` | Number | 参考间隔
`anchorPoint` | PointF | 文本锚点的位置：左下角为(0,0),右上角为(1,1)

Source:
  - GraphicText.js, line 290

##### Returns:

Type
  Promise.<void>

#### (async, static) setSlope(isSlope) → {Promise.<void>}

设置是否随地图倾斜

##### Parameters:

Name | Type | Description
--- | --- | ---
`isSlope` | boolean |

Source:
  - GraphicText.js, line 105

##### Returns:

Type
  Promise.<void>

#### (async, static) setText(text) → {Promise.<void>}

设置文本

##### Parameters:

Name | Type | Description
--- | --- | ---
`text` | String |

Source:
  - GraphicText.js, line 69

##### Returns:

Type
  Promise.<void>