abstract style~RegularShape(options)

规则形状的矢量点符号。

Summary

Methods:
getFillColor

获取填充颜色。

getOutlineColor

获取边框的颜色。

getOutlineWidth

获取边框的宽度。

setOutlineColor

设置边框的颜色。

setOutlineWidth

设置边框的宽度。

Constructor

new abstract RegularShape(options)

构造函数

Parameters:
Name Type Description
options Object

规则矢量符号的可选项。

Name Type Description
fillColor module:style~Color

填充颜色。

outlineColor module:style~Color

边框颜色。

outlineWidth Number

外边框的宽度,单位是像素。

Throws:
  • 当实例化RegularShape时,抛出异常:"the RegularShape is an abstract class,can not be instantiated!"。

  • 当fillColor或者outlineColor不是Color,或者outlineWidth是NaN或正、负无穷大的数字时,抛出异常:"parameter 'fillColor' and 'outlineColor' must be hmap.style.Color and parameter 'outlineWidth' must be a number"。

Methods

getFillColor() → {module:style~Color}

获取填充颜色。

Returns:
module:style~Color -

填充颜色

getOutlineColor() → {module:style~Color}

获取边框的颜色。

Returns:
module:style~Color -

边框线颜色

getOutlineWidth() → {Number}

获取边框的宽度。

Returns:
Number -

线符号的宽度

setOutlineColor(color)

设置边框的颜色。

Parameters:
Name Type Description
color module:style~Color

边框线颜色

Throws:

当参数不是Color时,抛出异常:"parameter 'color' must be instance of Color"。

setOutlineWidth(width)

设置边框的宽度。

Parameters:
Name Type Description
width Number

边框线宽度

Throws:

参数的值不是数字类型,或者是无穷大的数字时,抛出异常:“parameter 'width' must be Number that is not infinity”。