| javax.media.jai.PointOpImage com.sun.media.jai.opimage.CompositeNoDestAlphaOpImage
CompositeNoDestAlphaOpImage | final class CompositeNoDestAlphaOpImage extends PointOpImage (Code) | | An OpImage implementing the "Composite" operation as
described in javax.media.jai.operator.CompositeDescriptor .
This implementation handles the case where the destination image does
not include its result alpha channel.
For two source images source1 and source2 ,
this OpImage places the foreground source1
in front of the background source2 . This is what commonly
known as the "over" composite. The destination color values are
calculated using the following formula:
dest = source1 * alpha1 + source2 * alpha2 * (1 - alpha1)
where source1 and source2 are the color values
of the two source images, without their alpha multiplied to them, and
alpha1 and alpha2 are the two sources's alpha
values in fraction.
See Also: javax.media.jai.operator.CompositeDescriptor See Also: CompositeCRIF |
Constructor Summary | |
public | CompositeNoDestAlphaOpImage(RenderedImage source1, RenderedImage source2, Map config, ImageLayout layout, RenderedImage alpha1, RenderedImage alpha2, boolean premultiplied) Constructor.
Parameters: source1 - The foreground source image. Parameters: source2 - The background source image. Parameters: layout - The destination image layout. Parameters: alpha1 - The alpha image for the first source. Parameters: alpha2 - The alpha image for the second source. |
Method Summary | |
protected void | computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect) Composites two images within a specified rectangle. | protected synchronized RasterFormatTag[] | getFormatTags() Returns the format tags to be used with RasterAccessor . |
CompositeNoDestAlphaOpImage | public CompositeNoDestAlphaOpImage(RenderedImage source1, RenderedImage source2, Map config, ImageLayout layout, RenderedImage alpha1, RenderedImage alpha2, boolean premultiplied)(Code) | | Constructor.
Parameters: source1 - The foreground source image. Parameters: source2 - The background source image. Parameters: layout - The destination image layout. Parameters: alpha1 - The alpha image for the first source. Parameters: alpha2 - The alpha image for the second source. Ifnull , the second source is assumed to be opaque. Parameters: premultiplied - Indicates whether both sources and destinationhave their alpha premultiplied. |
computeRect | protected void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect)(Code) | | Composites two images within a specified rectangle.
Parameters: sources - Cobbled sources, guaranteed to provide all thesource data necessary for computing the rectangle. Parameters: dest - The tile containing the rectangle to be computed. Parameters: destRect - The rectangle within the tile to be computed. |
getFormatTags | protected synchronized RasterFormatTag[] getFormatTags()(Code) | | Returns the format tags to be used with RasterAccessor .
|
|
|