Skip to content Skip to sidebar Skip to footer

Masked Bitmap On Canvas With Transparent Activity

I implemented custom ShowCase for activity I am trying to draw on canvas mask: http://i.stack.imgur.com/u23kQ.png Following this code: mCanvas.drawColor(Color.TRANSPARENT, PorterDu

Solution 1:

I solve this

 Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
        paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN));
        mCanvas.drawBitmap(cBitmap,mXPosition,mYPosition,paint);
       // mShape.draw(canvas, mEraser, mXPosition, mYPosition, mShapePadding);
        // Draw the bitmap on our views  canvas.
        canvas.drawBitmap(mBitmap, 0, 0, null);

Post a Comment for "Masked Bitmap On Canvas With Transparent Activity"