Class: Annotation

Annotation


new Annotation()

Annotation构造函数。

Methods


clear()

注释清除


clearCurrHlightPoint()

清除激光笔


download(value)

下载

Parameters:
Name Type Description
value arrowTypeEnum

箭头类别,枚举型

Example
annotation.setArrowType(arrowTypeEnum.double);

hlightPointInit()

设置激光笔


init(annoDiv)

初始化annotation对象

Parameters:
Name Type Description
annoDiv Object

注释所在的应用层DOM Div


redo()

注释重做下一步


setArrowLength(value)

注释设置箭头宽度

Parameters:
Name Type Description
value int

箭头宽度

Example
annotation.setArrowLength(10);

setArrowType(value)

注释设置箭头类别

Parameters:
Name Type Description
value arrowTypeEnum

箭头类别,枚举型

Example
annotation.setArrowType(arrowTypeEnum.double);

setColor(value)

注释设置颜色

Parameters:
Name Type Description
value String

颜色,采用rgb和rgba格式

Example
annotation.setColor('rgba(255,0,0,1');

setColorOpacity(value)

注释设置颜色透明度

Parameters:
Name Type Description
value String

颜色,采用rgb和rgba格式

Example
annotation.setColor('rgba(255,0,0,1');

setFillColor(value)

注释设置颜色填充类别

Parameters:
Name Type Description
value fillTypeEnum

颜色填充类别,枚举型

Example
annotation.setFillColor(fillTypeEnum.full);

setLineWidth(value)

注释设置线条宽度

Parameters:
Name Type Description
value int

线条宽度

Example
annotation.setLineWidth(1);

setShapeType(type)

注释设置几何形状,如矩形,随机线等 注释类型,如鼠标、注释、橡皮擦

Parameters:
Name Type Description
type canvasTypeEnum

几何形 和 注释状态 枚举型

Example
annotation.setShapeType(shapeTypeEnum.polyline);

startHlightPoint()

设置激光笔


undo()

注释撤销上一步