Code example for Path

Methods: transform

0
	public void setScale( double s ) {
		float factor = (float) s;
		Matrix matrix = new Matrix();
		drawingPath.set( originalPath );
		matrix.setScale( factor, factor );
		originalPath.transform( matrix, drawingPath );
		scale = s;
		invalidate();
	} 
 
	public void drawPath( List<Point> points ) {
		Point start = points.get( 0 );
		originalPath.reset();
		originalPath.moveTo( (float) start.x, (float) start.y );
		int l = points.size();
		for ( int i = 1; i < l; i++ ) {
			Point p = points.get( i );
			originalPath.lineTo( (float) p.x, (float) p.y );
		} 
		drawingPath.set( originalPath );
		invalidate();