Class AbstractARGBComposite
- java.lang.Object
-
- ca.cgjennings.graphics.composites.AbstractARGBComposite
-
- All Implemented Interfaces:
java.awt.Composite
- Direct Known Subclasses:
BlendMode
public abstract class AbstractARGBComposite extends java.lang.Object implements java.awt.CompositeAn abstract base class for composites that support compositing (A)RGB image data. Concrete subclasses must implementcreateContext(java.awt.image.ColorModel, java.awt.image.ColorModel, java.awt.RenderingHints)to return a concrete subclass ofAbstractCompositeContext. Concrete subclasses will transparently take advantage of multiple CPUs to increase performance.- Author:
- Chris Jennings
-
-
Field Summary
Fields Modifier and Type Field Description protected floatalpha
-
Constructor Summary
Constructors Constructor Description AbstractARGBComposite()AbstractARGBComposite(float alpha)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.awt.image.BufferedImagecompose(java.awt.image.BufferedImage source, int x, int y, java.awt.image.BufferedImage destination)Blends one image directly into another using this composite.abstract AbstractCompositeContextcreateContext(java.awt.image.ColorModel srcColorModel, java.awt.image.ColorModel dstColorModel, java.awt.RenderingHints hints)AbstractARGBCompositederive(float alpha)floatgetAlpha()
-
-
-
Method Detail
-
derive
public AbstractARGBComposite derive(float alpha)
-
getAlpha
public float getAlpha()
-
compose
public java.awt.image.BufferedImage compose(java.awt.image.BufferedImage source, int x, int y, java.awt.image.BufferedImage destination)Blends one image directly into another using this composite. Ifdestinationisnull, a new compatible image will be created. If the source image is not in a format supported format, a copy of the image, suitably converted, will be used. This will also be done for a non-nulldestination in an unsupported format; in this case the converted destination is returned rather than the one passed to the method.- Parameters:
source- the source imagex- the x-offset into the destination at which to draw the sourcey- the y-offset into the destination at which to draw the sourcedestination- the image to be painted into- Returns:
- the destination image
-
createContext
public abstract AbstractCompositeContext createContext(java.awt.image.ColorModel srcColorModel, java.awt.image.ColorModel dstColorModel, java.awt.RenderingHints hints)
- Specified by:
createContextin interfacejava.awt.Composite
-
-