Code example for Paint

Methods: set

0
        } 
 
        /* Add new drawable at touched position */ 
        public boolean onTouch(View v, MotionEvent me) {
            ShapeDrawable drawable = new ShapeDrawable(touchShape);
            drawable.getPaint().set(paint);
            drawable.setBounds((int) me.getX() - 25, (int) me.getY() - 25,
                    (int) me.getX() + 25, (int) me.getY() + 25);
            drawables.add(drawable);
            invalidate();
            return true; 
        } 
    } 
}