public class IlvIntervalColorModel extends ColorModel implements IlvPersistentObject
IlvMapRaster
. IlvDefaultRasterRenderer.MakeImage(ilog.views.maps.geometry.IlvMapRaster, java.awt.image.ColorModel)
,
MakeElevationColorModel()
,
Serialized Formpixel_bits, transferType
BITMASK, OPAQUE, TRANSLUCENT
Constructor and Description |
---|
IlvIntervalColorModel(Color[] colors,
short[] limits)
Creates an instance of
IlvIntervalColorModel . |
IlvIntervalColorModel(IlvInputStream stream)
Reads an
IlvIntervalColorModel from an
IlvIntervalColorModel . |
Modifier and Type | Method and Description |
---|---|
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 . |
coerceData, createCompatibleSampleModel, createCompatibleWritableRaster, finalize, getAlpha, getAlphaRaster, getBlue, getColorSpace, getComponents, getComponents, getComponentSize, getComponentSize, getDataElement, getDataElement, getDataElements, getDataElements, getDataElements, getGreen, getNormalizedComponents, getNormalizedComponents, getNumColorComponents, getNumComponents, getPixelSize, getRed, getRGB, getRGBdefault, getTransferType, getTransparency, getUnnormalizedComponents, hasAlpha, isAlphaPremultiplied, isCompatibleRaster, isCompatibleSampleModel, toString
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 - 2public IlvIntervalColorModel(IlvInputStream stream) throws IlvReadFileException
IlvIntervalColorModel
from an
IlvIntervalColorModel
.stream
- The input stream.IlvReadFileException
- if an error occurs while reading.public boolean equals(Object object)
equals
in class ColorModel
object
- The object to compare.true
if the two objects are equal.public int hashCode()
hashCode
in class ColorModel
public int getAlpha(int pixel)
getAlpha
in class ColorModel
public int getRed(int pixel)
getRed
in class ColorModel
public int getGreen(int pixel)
getGreen
in class ColorModel
public int getBlue(int pixel)
getBlue
in class ColorModel
public int getRGB(int pixel)
getRGB
in class ColorModel
public Color[] getColors()
public short[] getLimits()
public int getIntervalCount()
public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
.write
in interface IlvPersistentObject
stream
- the output streamIOException
- thrown when an exception occurs during
the write operation for this object.public boolean isPersistent()
true
.public static ColorModel MakeElevationColorModel()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.