public class IlvAdjustableDelegateColorModel extends ColorModel implements IlvPersistentObject
pixel_bits, transferTypeBITMASK, OPAQUE, TRANSLUCENT| Constructor and Description |
|---|
IlvAdjustableDelegateColorModel(ColorModel cm)
Creates an adjustable color model based on the supplied color model.
|
IlvAdjustableDelegateColorModel(IlvInputStream stream)
Creates an
IlvAdjustableDelegateColorModel by reading a stream. |
| Modifier and Type | Method and Description |
|---|---|
int |
brightShade(int rgb)
Computes the rgb value passed into a brighter version, for raster shading.
|
int |
darkShade(int rgb)
Computes the rgb value passed into a darker version, for raster shading.
|
int |
getAlpha(int pixel)
Returns the alpha color component for the specified pixel.
|
int |
getBlue(int pixel)
Returns the blue color component for the specified pixel.
|
double |
getBrightness()
Returns the brightness.
|
ColorModel |
getColorModel()
Returns the delegate colorModel.
|
double |
getContrast()
Returns the contrast.
|
int |
getGreen(int pixel)
Returns the green color component for the specified pixel.
|
int |
getRed(int pixel)
Returns the red color component for the specified pixel.
|
int |
getRGB(int pixel)
Apply brightness,saturation, contrast and transparent pixel settings to the value returned by the delegate.
|
double |
getSaturation()
Returns the saturation.
|
int |
getTransparentPixel()
Returns the transparent Pixel.
|
static ColorModel |
readColorModel(IlvInputStream stream)
Reads a color model from an input stream.
|
void |
setBrightness(double brightness)
Sets a new level of brightness.
|
void |
setColorModel(ColorModel colorModel)
Sets the color model used internally.
|
void |
setContrast(double contrast)
Sets a new level of contrast.
|
void |
setSaturation(double saturation)
Sets a new level of saturation.
|
void |
setTransparentPixel(int transparentPixel)
Sets a transparent pixel value used to return a fully transparent rgb value.
|
void |
write(IlvOutputStream out)
Writes the color model of this raster.
|
static void |
writeColorModel(ColorModel colorModel,
IlvOutputStream out)
Write the specified
ColorModel to the specified IlvOutputStream. |
coerceData, createCompatibleSampleModel, createCompatibleWritableRaster, equals, 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, hashCode, isAlphaPremultiplied, isCompatibleRaster, isCompatibleSampleModel, toStringpublic IlvAdjustableDelegateColorModel(ColorModel cm)
cm - Color model to wrap.public IlvAdjustableDelegateColorModel(IlvInputStream stream) throws IlvReadFileException
IlvAdjustableDelegateColorModel by reading a stream.stream - stream to read from.IlvReadFileExceptionpublic double getBrightness()
public void setBrightness(double brightness)
brightness - The brightness to set.public double getSaturation()
public int getTransparentPixel()
public void setTransparentPixel(int transparentPixel)
transparentPixel - The transparent Pixel to set.public void setSaturation(double saturation)
saturation - The saturation to set.public double getContrast()
public void setContrast(double contrast)
contrast - The contrast to set.public void setColorModel(ColorModel colorModel)
colorModel - The color Model to set.public int getRGB(int pixel)
getRGB in class ColorModelColorModel.getRGB(int)public int brightShade(int rgb)
rgb - 4 bytes value of (A,R,G,B)public int darkShade(int rgb)
rgb - 4 bytes value of (A,R,G,B)public int getAlpha(int pixel)
getAlpha in class ColorModelColorModel.getAlpha(int)public int getBlue(int pixel)
getBlue in class ColorModelColorModel.getBlue(int)public int getGreen(int pixel)
getGreen in class ColorModelColorModel.getGreen(int)public int getRed(int pixel)
getRed in class ColorModelColorModel.getRed(int)public static ColorModel readColorModel(IlvInputStream stream) throws IlvReadFileException
stream - The input stream.IlvReadFileException - if an error occurs while reading the data.public void write(IlvOutputStream out) throws IOException
write in interface IlvPersistentObjectout - The output stream.IOException - if an error occurs while writing the data.public static void writeColorModel(ColorModel colorModel, IlvOutputStream out) throws IOException
ColorModel to the specified IlvOutputStream.colorModel - the ColorModel to write.out - the IlvOutputStream to write to.IOException - if an I/O exception occurs during the writing process.public ColorModel getColorModel()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.