FileDocCategorySizeDatePackage
BlendComposite.javaAPI DocAndroid 5.1 API33403Thu Mar 12 22:22:44 GMT 2015android.graphics

BlendComposite

public final class BlendComposite extends Object implements Composite

Fields Summary
public static final BlendComposite
Normal
public static final BlendComposite
Average
public static final BlendComposite
Multiply
public static final BlendComposite
Screen
public static final BlendComposite
Darken
public static final BlendComposite
Lighten
public static final BlendComposite
Overlay
public static final BlendComposite
HardLight
public static final BlendComposite
SoftLight
public static final BlendComposite
Difference
public static final BlendComposite
Negation
public static final BlendComposite
Exclusion
public static final BlendComposite
ColorDodge
public static final BlendComposite
InverseColorDodge
public static final BlendComposite
SoftDodge
public static final BlendComposite
ColorBurn
public static final BlendComposite
InverseColorBurn
public static final BlendComposite
SoftBurn
public static final BlendComposite
Reflect
public static final BlendComposite
Glow
public static final BlendComposite
Freeze
public static final BlendComposite
Heat
public static final BlendComposite
Add
public static final BlendComposite
Subtract
public static final BlendComposite
Stamp
public static final BlendComposite
Red
public static final BlendComposite
Green
public static final BlendComposite
Blue
public static final BlendComposite
Hue
public static final BlendComposite
Saturation
public static final BlendComposite
Color
public static final BlendComposite
Luminosity
private float
alpha
private BlendingMode
mode
Constructors Summary
private BlendComposite(BlendingMode mode)


       
        this(mode, 1.0f);
    
private BlendComposite(BlendingMode mode, float alpha)

        this.mode = mode;
        setAlpha(alpha);
    
Methods Summary
public java.awt.CompositeContextcreateContext(java.awt.image.ColorModel srcColorModel, java.awt.image.ColorModel dstColorModel, java.awt.RenderingHints hints)

        return new BlendingContext(this);
    
public android.graphics.BlendCompositederive(android.graphics.BlendComposite$BlendingMode mode)

        return this.mode == mode ? this : new BlendComposite(mode, getAlpha());
    
public android.graphics.BlendCompositederive(float alpha)

        return this.alpha == alpha ? this : new BlendComposite(getMode(), alpha);
    
public booleanequals(java.lang.Object obj)

        if (!(obj instanceof BlendComposite)) {
            return false;
        }

        BlendComposite bc = (BlendComposite) obj;

        if (mode != bc.mode) {
            return false;
        }

        return alpha == bc.alpha;
    
public floatgetAlpha()

        return alpha;
    
public static android.graphics.BlendCompositegetInstance(android.graphics.BlendComposite$BlendingMode mode)

        return new BlendComposite(mode);
    
public static android.graphics.BlendCompositegetInstance(android.graphics.BlendComposite$BlendingMode mode, float alpha)

        return new BlendComposite(mode, alpha);
    
public android.graphics.BlendComposite$BlendingModegetMode()

        return mode;
    
public inthashCode()

        return Float.floatToIntBits(alpha) * 31 + mode.ordinal();
    
private voidsetAlpha(float alpha)

        if (alpha < 0.0f || alpha > 1.0f) {
            throw new IllegalArgumentException(
                    "alpha must be comprised between 0.0f and 1.0f");
        }

        this.alpha = alpha;