Code example for ArcShape

0
     */ 
    public static final ShapeDrawable arc(){
    	final float startAngle = 45; //开始角度
    	final float sweepAngle = -270; //旋转角度,正数顺时针,负数逆时针
    	final int color = 0x88FF8844; //填充颜色
    	ShapeDrawable dr = new ShapeDrawable(new ArcShape(startAngle, sweepAngle));
    	dr.getPaint().setColor(color);
    	return dr;
    } 
     
    /** 
     * 路径图形 
     */ 
    public static final ShapeDrawable path(){
    	final int color = 0xFF0000FF; //填充颜色
    	Path path = new Path();
        path.moveTo(50, 0);//路径开始
        path.lineTo(30, 0);
        path.lineTo(0, 50);
        path.lineTo(50, 100);
        path.lineTo(100, 50);