Code example for PathShape

0
		path.lineTo(5.0f, 10.0f);
		path.addArc(new RectF(4, 0, 16, 15), -180, 180);
		path.lineTo(10.0f, 30.0f);
		path.close();
 
		Shape s = new PathShape(path, 20, 30);
		setShape(s);
 
		Paint p = getPaint();
		p.setColor(Color.RED);
		p.setStyle(Paint.Style.FILL_AND_STROKE);
		p.setStrokeWidth(1);
 
		this.offsetX = 40;
		this.offsetY = 40;
		this.width = 20;
		this.height = 30;
	} 
 
	public int getWidth() {