Skip to content Skip to sidebar Skip to footer

On An Android Canvas, How Do I Draw Overlapping Shapes With Non-interacting Alphas?

On an android Canvas, if I draw a circle with alpha 0xCC and color Color.RED and then draw another circle which partially overlaps the first circle with the same parameters, I'll e

Solution 1:

The easy way would be your suggested solution, ie. drawing all circles with no alpha to a bitmap, then draw that bitmap to another one using the desired alpha. The hard way would be using blend modes, specifically PorterDuff.Mode in Android. An example can be found here.


Post a Comment for "On An Android Canvas, How Do I Draw Overlapping Shapes With Non-interacting Alphas?"