SarEngine2D

Document

SarEngine2D Arc

Arc

可渲染的一段圆弧。

Syntax

//from global
var arc=new Arc(radius, startAng, endAng, antiCW);
//from SarEngine
var arc=new SarEngine.Arc(r, startAng, endAng, antiCW);

Parameters

Number radius
圆弧的半径。
Number startAng
圆弧的起始弧度。
Number endAng
圆弧的终止弧度
Boolean antiCW
是否为顺时针。

Methods

Properties

antiCW
Boolean 表示是否为顺时针构造。
cooridnate
Coordinate 表示该圆弧所在的坐标系。
end
Number 表示该圆弧的终止弧度。
fillStyle
Color 用于填充这段圆弧的颜色。
lineCap
LineCap 圆弧线冒样式。
o
Point 圆弧的圆心相对center的位置。
position
Point 圆弧的位置坐标。
r
Number 圆弧的半径。
start
Number 圆弧的起始弧度。
strokeStyle
Color 用于绘制圆弧弧线的颜色。
strokeWidth
Number 绘制圆弧弧线的线宽。

Methods

changeCoordinate(coordinate)
改变圆弧所在的坐标系,并将相关数据映射为等效的目标坐标系中的值。
copy()
复制一个一致的圆弧实例。
render(graphics, x, y, r, dt, camera, output)
将圆弧渲染到指定的Graphics对象上。
rotate(rad, x, y)
旋转圆弧。
setCoordinate(coordinate)
保持各种数值不变的前提下,设置圆弧所在的坐标系。