Path类API详解

来源:互联网 发布:逆战刷复活币软件 编辑:程序博客网 时间:2024/06/06 09:04

public void addArc(RectF oval, float startAngle, float sweepAngle);

添加椭圆的一部分作为新的轮廓。

startAngle是起始角度

sweepAngle是顺时针扫描终止角度


public void addCircle(float x, float y, float radius, Direction dir);

添加一个圆作为新的轮廓。

Direction.CW顺时针

Direction.CWW逆时针


public void addOval(RectF oval, Direction dir);

添加一个椭圆到当前路径。


public void addRect(RectF rect, Direction dir);

添加一个矩形到当前路径。


public void addRoundRect(RectF rect, float[] radii, Direction dir);

添加一个圆角矩形到当前路径。

radii是一个长度为8的定义圆角大小的float类型数组