public final class DiscreteAlphaIndexColorModel extends 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,
ComponentColorModelpixel_bits, transferTypeBITMASK, OPAQUE, TRANSLUCENT| Constructor and Description |
|---|
DiscreteAlphaIndexColorModel(IndexColorModel icm)
Creates a
DiscreteAlphaIndexColorModel, delegating color map look-ups
to the given IndexColorModel. |
DiscreteAlphaIndexColorModel(IndexColorModel icm,
int extraSamples,
boolean hasAlpha)
Creates a
DiscreteAlphaIndexColorModel, delegating color map look-ups
to the given IndexColorModel. |
| Modifier and Type | Method and Description |
|---|---|
SampleModel |
createCompatibleSampleModel(int w,
int h) |
WritableRaster |
createCompatibleWritableRaster(int w,
int h) |
boolean |
equals(Object obj) |
int |
getAlpha(int pixel) |
int |
getAlpha(Object inData) |
int |
getBlue(int pixel) |
int |
getBlue(Object inData) |
int |
getGreen(int pixel) |
int |
getGreen(Object inData) |
int |
getNumComponents() |
int |
getRed(int pixel) |
int |
getRed(Object inData) |
boolean |
isCompatibleRaster(Raster raster) |
boolean |
isCompatibleSampleModel(SampleModel sm) |
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(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(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 ColorModelpublic int getRed(int pixel)
getRed in class ColorModelpublic int getGreen(int pixel)
getGreen in class ColorModelpublic int getBlue(int pixel)
getBlue in class ColorModelpublic int getAlpha(int pixel)
getAlpha in class ColorModelpublic int getRed(Object inData)
getRed in class ColorModelpublic int getGreen(Object inData)
getGreen in class ColorModelpublic int getBlue(Object inData)
getBlue in class ColorModelpublic int getAlpha(Object inData)
getAlpha in class ColorModelpublic SampleModel createCompatibleSampleModel(int w, int h)
createCompatibleSampleModel in class ColorModelpublic boolean isCompatibleSampleModel(SampleModel sm)
isCompatibleSampleModel in class ColorModelpublic WritableRaster createCompatibleWritableRaster(int w, int h)
createCompatibleWritableRaster in class ColorModelpublic boolean isCompatibleRaster(Raster raster)
isCompatibleRaster in class ColorModelpublic boolean equals(Object obj)
equals in class ColorModelpublic String toString()
toString in class ColorModelCopyright © 2024. All rights reserved.