Code example for Drawable

Methods: getBoundsgetIntrinsicWidth

0
     */ 
    protected void doUseClearPorterDuffXfermode( Canvas canvas, Drawable drawable ) {
        if ( isClearPorterDuffXfermodeEnabled ) {
            Paint p = new Paint();
            p.setXfermode( new PorterDuffXfermode( Mode.CLEAR ) );
            int cx = drawable.getBounds().centerX();
            int cy = drawable.getBounds().centerY();
            int radius = drawable.getIntrinsicWidth() / 2 - 3;
            canvas.drawCircle( cx, cy, radius, p );
        } 
    } 
 
    /** 
     * Animate the point to draw on screen. 
     *  
     * @author sni 
     *  
     */ 
    private static final class AnimatorHandler extends Handler {
        private static final int ANIMATION_MESSAGE_ID = 0;