Code example for Path

Methods: offset

0
 
public class DrawingHistoryLine extends DrawingHistoryItem { 
 
	public DrawingHistoryLine(int dx, int dy, Path path, Paint paint) {
		super(dx, dy);
		path.offset(dx, dy);
		mPath = new Path(path);
			 
		mPaint = new Paint(paint);
	} 
 
	@Override 
	public void draw(Bitmap bm, Canvas canvas) {
		//mPath.offset(mDx, mDy); 
		canvas.setBitmap(bm);
		canvas.drawPath(mPath, mPaint);
	} 
	 
	@Override 
	public void doResize(Matrix m, float scale) {
		mPath.transform(m);