how can I clear a transparent or translucent canvas

by sebastian » Fri, 13 Mar 2009 01:43:06 GMT


Sponsored Links
 Hi

I am painting some bitmaps onto a transparent canvas, so it is
rendered above the system screen.

When I draw the next bitmap, I cannot clear the previously drawn one.
How can I "erase" it?

If I could capture the initial canvas would be fine...because I could
paint always that before drawing the bitmap...but I am not succedding
on capturing it.

Thanks!

--~--~---------~--~----~------------~-------~--~----~



how can I clear a transparent or translucent canvas

by Eric » Fri, 13 Mar 2009 02:44:03 GMT


 > Just call Canvas.drawColor(0).

That probably won't do much because it uses the default srcover
porterduff mode

Canvas.drawColor( 0, PorterDuff.Mode.CLEAR );

would be better




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


how can I clear a transparent or translucent canvas

by sebastian » Fri, 13 Mar 2009 16:38:42 GMT


 I worked perfectly fine!

Thanks :)






--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Android Pre Compile step just became very slow

Everything has been going fine on my project. But recently after
adding some resources (too many into the assets folder). Realizing
that, then deleting the files. It seems like the Android Pre Compile
step is taking a long time now. I'm not sure if the two things are
related, or what's causing the slow down. Is there anyway to get more
detailed output from it to see what is taking so long?

-- 

2. Development and debugging tools

Is there a way to achieve the following in Android?

1.

generate a Java stack trace in Android. In J2SE, we use to use
something like this -  send a signal to the Java Virtual Machine; the
Java Virtual Machine generates a stack trace for you; or we can also
use debugging tools or Java API calls.

-- 

3. basic website integration

4. Nexus One DDMS only two processes

5. Droid requires specific permission to read GMail attachments ???

6. Droid requires specific permission to read GMail attachments ???

7. Alarm Clock Localization query