FileDocCategorySizeDatePackage
AvoidXfermode.javaAPI DocAndroid 1.5 API2266Wed May 06 22:42:00 BST 2009android.graphics

AvoidXfermode

public class AvoidXfermode extends Xfermode
AvoidXfermode xfermode will draw the src everywhere except on top of the opColor or, depending on the Mode, draw only on top of the opColor.

Fields Summary
Constructors Summary
public AvoidXfermode(int opColor, int tolerance, Mode mode)
This xfermode will draw the src everywhere except on top of the opColor or, depending on the Mode, draw only on top of the opColor.

param
opColor The color to avoid (or to target depending on Mode). Note that the alpha in opColor is ignored.
param
tolerance How closely we compare a pixel to the opColor. 0 - only operate if exact match 255 - maximum gradation (blending) based on how similar the pixel is to our opColor (max tolerance)
param
mode If we should avoid or target the opColor

        if (tolerance < 0 || tolerance > 255) {
            throw new IllegalArgumentException("tolerance must be 0..255");
        }
        native_instance = nativeCreate(opColor, tolerance, mode.nativeInt);
    
Methods Summary
private static native intnativeCreate(int opColor, int tolerance, int nativeMode)