我正在学习 HTML5,但我被困在弧线上。
语法
arc(x, y, radius, startAngle, endAngle, anticlockwise)
我没有得到这个 startAngle,endAngle 这两个参数是如何计算的 绘制不同类型的圆、弧?
最佳答案
这个方法有六个参数:
- x 和 y 是圆心的坐标。
- Radius 是不言自明的。
- startAngle 和 endAngle 参数以弧度定义弧的起点和终点。起始 Angular 和闭合 Angular 是从 x 轴开始测量的。
- 逆时针参数是一个 bool 值,当为真时逆时针绘制圆弧,否则为顺时针方向。
为了更好的理解startAngle和endAngle
http://www.html5canvastutorials.com/tutorials/html5-canvas-arcs/
关于javascript - html5 canvas中圆弧的起始 Angular 和结束 Angular 是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6746598/