|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.image.ColorModel
ilog.views.maps.rendering.IlvIntervalColorModel
public class IlvIntervalColorModel
Implements a color model that performs a linear interpolation to compute
the pixel colors within intervals specified by the user.
This color model can be used to create images from an IlvMapRaster
.
A predefined instance of this color model is adapted to render elevation
rasters.
IlvDefaultRasterRenderer.MakeImage(ilog.views.maps.geometry.IlvMapRaster, java.awt.image.ColorModel),
MakeElevationColorModel()| 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 | |
|---|---|
IlvIntervalColorModel(Color[] colors,
short[] limits)
Creates an instance of IlvIntervalColorModel. |
|
IlvIntervalColorModel(IlvInputStream stream)
Reads an IlvIntervalColorModel from an
IlvIntervalColorModel. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object object)
Compares this color model to the specified object. |
int |
getAlpha(int pixel)
Returns the Alpha component for this pixel value. |
int |
getBlue(int pixel)
Returns the interpolated Blue component for this pixel value. |
Color[] |
getColors()
Returns the color array. |
int |
getGreen(int pixel)
Returns the interpolated Green component for this pixel value. |
int |
getIntervalCount()
Returns the number of intervals. |
short[] |
getLimits()
Returns the limit array. |
int |
getRed(int pixel)
Returns the interpolated Red component for this pixel value. |
int |
getRGB(int pixel)
Returns the interpolated RGB component for this pixel value. |
int |
hashCode()
Returns an hash value for this object. |
boolean |
isPersistent()
Returns true. |
static ColorModel |
MakeElevationColorModel()
Returns a predefined interval color model with values adapted to render elevation rasters. |
void |
write(IlvOutputStream stream)
Writes the renderer to an IlvOutputStream. |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IlvIntervalColorModel(Color[] colors,
short[] limits)
IlvIntervalColorModel.
The intervals from which the color model will interpolate the values
are specified by an array of colors and an array of limits arranged in
descending order.
colors - The array of Colors defining the color limits.limits - The array of short values defining the interval limits.
The length of limits should be equal to colors.length - 2
public IlvIntervalColorModel(IlvInputStream stream)
throws IlvReadFileException
IlvIntervalColorModel from an
IlvIntervalColorModel.
stream - The input stream.
IlvReadFileException - if an error occurs while reading.| Method Detail |
|---|
public boolean equals(Object object)
equals in class ColorModelobject - The object to compare.
true if the two objects are equal.public int hashCode()
hashCode in class ColorModelpublic int getAlpha(int pixel)
getAlpha 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 getRGB(int pixel)
getRGB in class ColorModelpublic Color[] getColors()
public short[] getLimits()
public int getIntervalCount()
public void write(IlvOutputStream stream)
throws IOException
IlvOutputStream.
write in interface IlvPersistentObjectstream - the output stream
IOException - thrown when an exception occurs during
the write operation for this object.public boolean isPersistent()
true.
public static ColorModel MakeElevationColorModel()
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||