Re: [android-developers] Help XFermode

2013-05-29 Thread Tiago Braga
Hello Romain! I put a background image in view, so I can not draw with the background color. On Wed, May 29, 2013 at 1:53 AM, Romain Guy wrote: > Erase is working as intended here. You are erasing the window's Canvas, > which is shared by all the Views. If you want to erase to transparent you

Re: [android-developers] Help XFermode

2013-05-28 Thread Romain Guy
Erase is working as intended here. You are erasing the window's Canvas, which is shared by all the Views. If you want to erase to transparent you should make that View use a drawing cache (setDrawingCacheEnabled()) or a layer (setLayerType()) but this will come at a cost performance-wise. Another s

[android-developers] Help XFermode

2013-05-28 Thread Tiago Braga
Hello! I am starting the studies, and decide to make a little program to draw on a white canvas. I rode one example of android called "FingerPaint" and I noticed something: When I select the option "Erase", it uses the following method to clean up what is on the screen: mPaint.setXfermode (new P