Android Blend Modes

I am looking for a way to add more complex blending modes to my program (those that I could define myself). How do you suggest getting around this with Android?

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

+6
java android colors blending
source share
3 answers

Honestly, I'm not sure if this is supported. Using OpenGL as an example, blending modes are defined by OpenGL ES Spec, so that they can potentially be implemented at the hardware level. Adding your own blend function will break the spec, not to mention the incredibly slow, because it will have to act pixel by pixel.

I’m not sure about the canvas, but I think that you also can’t do this for the same reasons.

+2
source share

This is possible even without openGL. PorterDuff should be the solution:

android.graphics.PorterDuffXfermode

and

android.graphics.PorterDuff

Here is a very good example:

http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/Xfermodes.html

+2
source share

Android supports a subset of OpenGL. This will be the route if you are looking for speed.

-one
source share

All Articles