0

I am new to android and i have problem in my painting application.When user want to delete or erase some already painted stuff ,by using below mentioned method i achieved the clearness but during clear it shows dark black lines whenever this function get called. I dont want to show that black lines, I want that ,Simple just like our real eraser works.

mPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));

Please help me out. Hope anybody has the answer for the above. Thanks in advance.

Pratik
  • 30,639
  • 18
  • 84
  • 159
Prasad
  • 3
  • 6

1 Answers1

0

You can draw the color on canvas if you used the canvas.

canvas.drawColor(Color.white);

whatever color you want to draw it will drawing on canvas

Pratik
  • 30,639
  • 18
  • 84
  • 159
  • thanks for answer Pratik , I used that but its not work for me.I used one class like Myview which extends view class. So please elaborate how to do the same .Is there any other method like setXfermode() ? – Prasad Dec 27 '12 at 12:52
  • http://stackoverflow.com/a/5729876/760489 or http://stackoverflow.com/a/6995087/760489 – Pratik Dec 27 '12 at 12:56
  • Thanks pratik ,But mPaint.setColor(Color.WHITE); this is working for me but it clears means draw on background image also that i dont want. So any help regarding same. – Prasad Dec 27 '12 at 13:34