Skip to content

PolygonComponent ​

PolygonComponent类定义了多边形组件

public constructor () ​

简介 ​

构造多边形组件实例。

示例 ​
js
const polygon = new FP.PolygonComponent()

public beginPath () ​

简介 ​

开启路径编辑,编辑路径前需要调用。

示例 ​
js
polygon.beginPath()

public closePath () ​

简介 ​

关闭路径编辑,编辑路径完成时需要调用。

示例 ​
js
polygon.closePath()

public moveTo (x: number, y: number) ​

简介 ​

将路径编辑指针移至指定坐标。

示例 ​
js
polygon.moveTo(start.x, start.y)

public lineTo (x: number, y: number) ​

简介 ​

添加一条直线线段。

参数 ​

终点x、y坐标。

示例 ​
js
polygon.lineTo(x, y)