public class IlvAdjustableDelegateColorModel extends ColorModel implements IlvPersistentObject
pixel_bits, transferType
BITMASK, 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, toString
public IlvAdjustableDelegateColorModel(ColorModel cm)
cm
- Color model to wrap.public IlvAdjustableDelegateColorModel(IlvInputStream stream) throws IlvReadFileException
IlvAdjustableDelegateColorModel
by reading a stream.stream
- stream to read from.IlvReadFileException
public 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 ColorModel
ColorModel.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 ColorModel
ColorModel.getAlpha(int)
public int getBlue(int pixel)
getBlue
in class ColorModel
ColorModel.getBlue(int)
public int getGreen(int pixel)
getGreen
in class ColorModel
ColorModel.getGreen(int)
public int getRed(int pixel)
getRed
in class ColorModel
ColorModel.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 IlvPersistentObject
out
- 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 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.