views:

69

answers:

1

I draw a bitmap onto a canvas using the following call:

_playerImage = BitmapFactory.decodeResource(getResources(), R.drawable.player);

How can I now tint this image white? I'm trying to make the image flash white like in top-scrollers when an enemy is hit by a bullet.

Do I need to use something other than BitmapFactory?

+2  A: 

You can use a ColorFilter on your Paint when you draw the bitmap.

Romain Guy
Brilliant! Thanks a ton! "Paint p = new Paint(Color.RED); ColorFilter filter = new LightingColorFilter(Color.RED, 1); p.setColorFilter(filter);"
FoppyOmega