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. Where is source code for Dev Tools?

Could someone please tell me where I can find the source code for Dev
Tools (i.e., Sync, Media Browser, and etc)? Or are they under
different names in the source code?

Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~

2. How to start android emulator in landscape mode?

Create an AVD with landscape skin.

$ android create avd --name somename --skin HVGA-L

(or use the AVD Manager in Eclise ADT 0.9.1)

If you omit the parameter, --skin will display the valid choices.

R/




> 

3. Notification without firing any Intent

4. Maintaining two Eclipse installs with two Android SDKs

5. How to get list id from many list?

6. Why can't I en ter android-developers:reference:android.R.s tyleable? Is it availableé”›

7. Problem launching an Activity (other than built-in with classes loaded) from widget click