public final class DiscreteAlphaIndexColorModel
extends java.awt.image.ColorModel
IndexColorModel and a ComponentColorModel,
having both a color map and a full, discrete alpha channel and/or one or more "extra" channels.
The color map entries are assumed to be fully opaque and should have no transparent index.
ColorSpace will always be the default sRGB color space (as with IndexColorModel).
Component order is always I, A, X1, X2... Xn, where I is a palette index, A is the alpha value and Xn are extra samples (ignored for display).
IndexColorModel,
ComponentColorModel| Constructor and Description |
|---|
DiscreteAlphaIndexColorModel(java.awt.image.IndexColorModel icm)
Creates a
DiscreteAlphaIndexColorModel, delegating color map look-ups
to the given IndexColorModel. |
DiscreteAlphaIndexColorModel(java.awt.image.IndexColorModel icm,
int extraSamples,
boolean hasAlpha)
Creates a
DiscreteAlphaIndexColorModel, delegating color map look-ups
to the given IndexColorModel. |
| Modifier and Type | Method and Description |
|---|---|
java.awt.image.SampleModel |
createCompatibleSampleModel(int w,
int h) |
java.awt.image.WritableRaster |
createCompatibleWritableRaster(int w,
int h) |
boolean |
equals(java.lang.Object obj) |
int |
getAlpha(int pixel) |
int |
getAlpha(java.lang.Object inData) |
int |
getBlue(int pixel) |
int |
getBlue(java.lang.Object inData) |
int |
getGreen(int pixel) |
int |
getGreen(java.lang.Object inData) |
int |
getNumComponents() |
int |
getRed(int pixel) |
int |
getRed(java.lang.Object inData) |
boolean |
isCompatibleRaster(java.awt.image.Raster raster) |
boolean |
isCompatibleSampleModel(java.awt.image.SampleModel sm) |
java.lang.String |
toString() |
coerceData, finalize, getAlphaRaster, getColorSpace, getComponents, getComponents, getComponentSize, getComponentSize, getDataElement, getDataElement, getDataElements, getDataElements, getDataElements, getNormalizedComponents, getNormalizedComponents, getNumColorComponents, getPixelSize, getRGB, getRGB, getRGBdefault, getTransferType, getTransparency, getUnnormalizedComponents, hasAlpha, hashCode, isAlphaPremultipliedpublic DiscreteAlphaIndexColorModel(java.awt.image.IndexColorModel icm)
DiscreteAlphaIndexColorModel, delegating color map look-ups
to the given IndexColorModel.icm - The IndexColorModel delegate. Color map entries are assumed to be
fully opaque, any transparency or transparent index will be ignored.public DiscreteAlphaIndexColorModel(java.awt.image.IndexColorModel icm,
int extraSamples,
boolean hasAlpha)
DiscreteAlphaIndexColorModel, delegating color map look-ups
to the given IndexColorModel.icm - The IndexColorModel delegate. Color map entries are assumed to be
fully opaque, any transparency or transparent index will be ignored.extraSamples - the number of extra samples in the color model.hasAlpha - true if the extra samples contains alpha, otherwise false.public int getNumComponents()
getNumComponents in class java.awt.image.ColorModelpublic final int getRed(int pixel)
getRed in class java.awt.image.ColorModelpublic final int getGreen(int pixel)
getGreen in class java.awt.image.ColorModelpublic final int getBlue(int pixel)
getBlue in class java.awt.image.ColorModelpublic final int getAlpha(int pixel)
getAlpha in class java.awt.image.ColorModelpublic final int getRed(java.lang.Object inData)
getRed in class java.awt.image.ColorModelpublic final int getGreen(java.lang.Object inData)
getGreen in class java.awt.image.ColorModelpublic final int getBlue(java.lang.Object inData)
getBlue in class java.awt.image.ColorModelpublic final int getAlpha(java.lang.Object inData)
getAlpha in class java.awt.image.ColorModelpublic final java.awt.image.SampleModel createCompatibleSampleModel(int w,
int h)
createCompatibleSampleModel in class java.awt.image.ColorModelpublic final boolean isCompatibleSampleModel(java.awt.image.SampleModel sm)
isCompatibleSampleModel in class java.awt.image.ColorModelpublic final java.awt.image.WritableRaster createCompatibleWritableRaster(int w,
int h)
createCompatibleWritableRaster in class java.awt.image.ColorModelpublic final boolean isCompatibleRaster(java.awt.image.Raster raster)
isCompatibleRaster in class java.awt.image.ColorModelpublic boolean equals(java.lang.Object obj)
equals in class java.awt.image.ColorModelpublic java.lang.String toString()
toString in class java.awt.image.ColorModelCopyright © 2020. All Rights Reserved.