|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.image.ColorModel java.awt.image.ComponentColorModel org.geotools.resources.image.ComponentColorModelJAI
A ComponentColorModel
modified for interoperability with Java Advanced Imaging.
JAI 1.1 was designed for use with J2SE 1.3 and is not aware of new features in J2SE 1.4.
This lead to the following problems:
ComponentColorModel
support and
datatypes since J2SE 1.4 only. The workaround for J2SE 1.3 is to use the
FloatDoubleColorModel
provided with JAI 1.1.FloatDoubleColorModel
ignore the new API in ColorSpace
, especially
the and methods. Consequently,
rendering of any image using our custom is wrong.ComponentColorModel
uses DataBufferFloat
and DataBufferDouble
, which are unknown to JAI 1.1. Consequently, trying
to use RectIter
with one of those will throw ClassCastException
.ComponentColorModel
(which work with our custom
ColorSpace
) and override its in order to
returns ComponentSampleModelJAI
instead of ComponentSampleModel
when
or datatype is requested.
Field Summary |
Fields inherited from class java.awt.image.ColorModel |
pixel_bits, transferType |
Fields inherited from interface java.awt.Transparency |
BITMASK, OPAQUE, TRANSLUCENT |
Constructor Summary | |
ComponentColorModelJAI(java.awt.color.ColorSpace colorSpace,
boolean hasAlpha,
boolean isAlphaPremultiplied,
int transparency,
int transferType)
Construct a new color model. |
|
ComponentColorModelJAI(java.awt.color.ColorSpace colorSpace,
int[] bits,
boolean hasAlpha,
boolean isAlphaPremultiplied,
int transparency,
int transferType)
Construct a new color model. |
Method Summary | |
java.awt.image.SampleModel |
createCompatibleSampleModel(int w,
int h)
Returns a compatible sample model. |
java.lang.String |
toString()
Returns the representation of the contents of this object. |
Methods inherited from class java.awt.image.ComponentColorModel |
coerceData, createCompatibleWritableRaster, equals, getAlpha, getAlpha, getAlphaRaster, getBlue, getBlue, getComponents, getComponents, getDataElement, getDataElement, getDataElements, getDataElements, getDataElements, getGreen, getGreen, getNormalizedComponents, getNormalizedComponents, getRed, getRed, getRGB, getRGB, getUnnormalizedComponents, isCompatibleRaster, isCompatibleSampleModel |
Methods inherited from class java.awt.image.ColorModel |
finalize, getColorSpace, getComponentSize, getComponentSize, getNumColorComponents, getNumComponents, getPixelSize, getRGBdefault, getTransferType, getTransparency, hasAlpha, hashCode, isAlphaPremultiplied |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ComponentColorModelJAI(java.awt.color.ColorSpace colorSpace, int[] bits, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType)
public ComponentColorModelJAI(java.awt.color.ColorSpace colorSpace, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType)
Method Detail |
public java.awt.image.SampleModel createCompatibleSampleModel(int w, int h)
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |