//画弧线
p.tStyle(Paint.Style.STROKE);
RectF oval1 = new RectF(150, 20, 280, 80);
canvas.drawArc(oval1, 90, 180, true, p);
此处绘制的是D沿底点旋转360度的形状!
==================================================================================================
public RectF (float left, float 警示教育片观后感
top, float right, float bottom)
Since: API Level 1
Create a new rectangle with the specified coordinates. Note: no range checking is performed, so the caller must ensure that left <= right and top <= bottom.
Parameters
//弧线的位置设置中的左端X坐标
| left The X coordinate of the left side of the rectagle
//弧线最高的点离画布的顶端的距离 |
| top The Y coordinate of the top of the rectangle //弧线的位置设置中的右端X坐标 |
| right The X coordinate of the right side of the rectagle
//弧线最低的地方离画布的最高的点的距离 |
| bottom The Y coordinate of the bottom of the rectangle |
| |
==================================================================================================
aphics.Canvas.drawArc(RectF oval, float startAngle, float sweepAngle, boolean uCenter, Paint paint)
public void drawArc (RectF oval, float startAngle, float sweepAngle, boolean uCenter, Paint paint)
Since: API Level 1
Draw the specified arc, which will be scal重生复仇文
ed to fit inside the specified oval.
If the start angle is negative or >= 360, the start angle is treated as start angle modulo 平衡受体位于
360.
If the sweep angle is >= 360, then the oval is drawn completely. Note that this differs slightly from SkPath::arcTo, which treats the sweep angle modulo 360. If the sweep angle is negative, the sweep angle is treated as sweep angle modulo 360
The arc is drawn clockwi. An angle of 0 degrees correspond to the geometric angle of 0 degrees (3 o'clock on a watch.)
Parameters
//使用自定义的oval画弧线
| oval The bounds of oval ud to define the shape and size of the arc //弧线的起始角度,此角度按照正常的0~~360坐标轴划分, |
| startAngle Starting angle (in degrees) where the arc begins //弧线的角度,比如D的弧线角度就是180度,设置其实角度后,android是按照逆时针的方向开始绘图的 |
sweepAngle | Sweep angle (in degrees) measured clockwi |
uCenter | If true, include the center of the oval in the arc, and clo it if it is being stroked. This will draw a wedge |
paint | The paint ud to draw the arc |
| |