Search code examples
javaandroidcolorsblending

Android Blend Modes


I am looking for a way to add more advanced blend modes to my program (ones that I could define myself). How would you suggest going about this with Android?

Setting pixels individually is too slow to be a viable solution.


Solution

  • To be honest I'm not sure this is supported. Using OpenGL as an example, the blending modes are defined by the OpenGL ES Spec, so that they can potentially be implemented in hardware. Adding your own blend function would be breaking the spec, not to mention incredibly slow, because it would have to act pixel by pixel.

    I'm not so sure about canvas, but I believe that you can't do it there either, for similar reasons.