com.miginfocom.util.gfx
Class ColorTintComposite

java.lang.Object
  extended by com.miginfocom.util.gfx.ColorTintComposite
All Implemented Interfaces:
java.awt.Composite, java.awt.CompositeContext

public final class ColorTintComposite
extends java.lang.Object
implements java.awt.Composite, java.awt.CompositeContext

A composite that tints the output pixels, either relatively or absolutley. Uses the com.miginfocom.util.gfx.geometry classes to denote the change.

See Also:
AtFixed, AtFraction, AtOffset

Constructor Summary
ColorTintComposite(AtRefNumber r, AtRefNumber g, AtRefNumber b, AtRefNumber a)
          Constructor
 
Method Summary
 void compose(java.awt.image.Raster src, java.awt.image.Raster dstIn, java.awt.image.WritableRaster dstOut)
           
 java.awt.CompositeContext createContext(java.awt.image.ColorModel srcColorModel, java.awt.image.ColorModel dstColorModel, java.awt.RenderingHints hints)
           
 void dispose()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorTintComposite

public ColorTintComposite(AtRefNumber r,
                          AtRefNumber g,
                          AtRefNumber b,
                          AtRefNumber a)
Constructor

Parameters:
r - The relative or absolute tint of the red channel. Red channel not tinted if null. The resulting value will be set to 0 if less than 0 and to 255 if more than 255.
g - The relative or absolute tint of the green channel. Green channel not tinted if null. The resulting value will be set to 0 if less than 0 and to 255 if more than 255.
b - The relative or absolute tint of the blue channel. Blue channel not tinted if null. The resulting value will be set to 0 if less than 0 and to 255 if more than 255.
a - The relative or absolute tint of the alpha channel. Alpha channel not tinted if null. The resulting value will be set to 0 if less than 0 and to 255 if more than 255.
Method Detail

createContext

public final java.awt.CompositeContext createContext(java.awt.image.ColorModel srcColorModel,
                                                     java.awt.image.ColorModel dstColorModel,
                                                     java.awt.RenderingHints hints)
Specified by:
createContext in interface java.awt.Composite

compose

public void compose(java.awt.image.Raster src,
                    java.awt.image.Raster dstIn,
                    java.awt.image.WritableRaster dstOut)
Specified by:
compose in interface java.awt.CompositeContext

dispose

public void dispose()
Specified by:
dispose in interface java.awt.CompositeContext


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.