
protected class BlendComposite.BlendingContext extends Object implements CompositeContext
| Modifier and Type | Field and Description | 
|---|---|
| protected double | alphaOpacity factor | 
| private ColorModel | dstColorModelDestination color model | 
| protected double | ialphaAdditive inverse of alpha value. | 
| private ColorModel | srcColorModelSource color model | 
| Modifier | Constructor and Description | 
|---|---|
| protected  | BlendComposite.BlendingContext(ColorModel srcColorModel,
                              ColorModel dstColorModel,
                              double alpha)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected int | blend(int sA,
     int sR,
     int sG,
     int sB,
     int dA,
     int dR,
     int dG,
     int dB)The actual blending function for two colors. | 
| void | compose(Raster src,
       Raster dstIn,
       WritableRaster dstOut)Compose a raster image (source) and a background (destination) to a
 result raster. | 
| void | dispose() | 
| protected int | mixAlpha(int nA,
        int nR,
        int nG,
        int nB,
        int dA,
        int dR,
        int dG,
        int dB)Mix the new values with the original values taking the alpha value into
 account. | 
private ColorModel srcColorModel
private ColorModel dstColorModel
protected double alpha
protected double ialpha
protected BlendComposite.BlendingContext(ColorModel srcColorModel, ColorModel dstColorModel, double alpha)
srcColorModel - source color modeldstColorModel - destination color modelalpha - Alpha (opacity) factorpublic void dispose()
dispose in interface CompositeContextpublic void compose(Raster src, Raster dstIn, WritableRaster dstOut)
compose in interface CompositeContextprotected int blend(int sA,
        int sR,
        int sG,
        int sB,
        int dA,
        int dR,
        int dG,
        int dB)
sA - source alpha component (0-255)sR - source red component (0-255)sG - source green component (0-255)sB - source blue component (0-255)dA - destination alpha component (0-255)dR - destination red component (0-255)dG - destination green component (0-255)dB - destination blues component (0-255)BlendComposite.combineComponents(int, int, int, int) and mixAlpha(int, int, int, int, int, int, int, int)
         helper functions)protected int mixAlpha(int nA,
           int nR,
           int nG,
           int nB,
           int dA,
           int dR,
           int dG,
           int dB)
nA - new alpha component (0-255)nR - new red component (0-255)nG - new green component (0-255)nB - new blue component (0-255)dA - old alpha component (0-255)dR - old red component (0-255)dG - old green component (0-255)dB - old blue component (0-255)