Code example for Canvas

Methods: drawPath

0
 
        @Override 
        protected void onDraw(Canvas canvas) {
            mPath.offset(1, 1);
            mPaint.setColor(Color.RED);
            canvas.drawPath(mPath, mPaint);
        } 
 
        @Override 
        public boolean onTouchEvent(MotionEvent event) {
            invalidate();
            return super.onTouchEvent(event);
        } 
    } 
}