|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.image.ImageFilter
java.awt.image.RGBImageFilter
public abstract class RGBImageFilter
A filter designed to filter images in the default RGBColorModel regardless of the ImageProducer's ColorModel.
Field Summary | |
---|---|
protected boolean |
canFilterIndexColorModel
Specifies whether to apply the filter to the index entries of the IndexColorModel. |
protected ColorModel |
newmodel
|
protected ColorModel |
origmodel
|
Fields inherited from class java.awt.image.ImageFilter |
---|
consumer |
Fields inherited from interface java.awt.image.ImageConsumer |
---|
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT |
Constructor Summary | |
---|---|
RGBImageFilter()
Construct new RGBImageFilter. |
Method Summary | |
---|---|
IndexColorModel |
filterIndexColorModel(IndexColorModel icm)
Filters an IndexColorModel through the filterRGB function. |
abstract int |
filterRGB(int x,
int y,
int rgb)
Filters a single pixel from the default ColorModel. |
void |
filterRGBPixels(int x,
int y,
int w,
int h,
int[] pixels,
int offset,
int scansize)
This functions filters a set of RGB pixels through filterRGB. |
void |
setColorModel(ColorModel model)
Sets the ColorModel used to filter with. |
void |
setPixels(int x,
int y,
int w,
int h,
ColorModel model,
byte[] pixels,
int offset,
int scansize)
If the ColorModel is the same ColorModel which as already converted then it converts it the converted ColorModel. |
void |
setPixels(int x,
int y,
int w,
int h,
ColorModel model,
int[] pixels,
int offset,
int scansize)
This function delivers a rectangle of pixels where any pixel(m,n) is stored in the array as an int at
index (n * scansize + m + offset). |
void |
substituteColorModel(ColorModel oldcm,
ColorModel newcm)
Registers a new ColorModel to subsitute for the old ColorModel when setPixels encounters the a pixel with the old ColorModel. |
Methods inherited from class java.awt.image.ImageFilter |
---|
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setDimensions, setHints, setProperties |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ColorModel origmodel
protected ColorModel newmodel
protected boolean canFilterIndexColorModel
Constructor Detail |
---|
public RGBImageFilter()
Method Detail |
---|
public void setColorModel(ColorModel model)
setColorModel
in interface ImageConsumer
setColorModel
in class ImageFilter
model
- the color model to be used most often by setPixelsColorModel
public void substituteColorModel(ColorModel oldcm, ColorModel newcm)
oldcm
- the old ColorModelnewcm
- the new ColorModelpublic IndexColorModel filterIndexColorModel(IndexColorModel icm)
icm
- an IndexColorModel to filterpublic void filterRGBPixels(int x, int y, int w, int h, int[] pixels, int offset, int scansize)
x
- the x coordinate of the rectangley
- the y coordinate of the rectanglew
- the width of the rectangleh
- the height of the rectanglepixels
- the array of pixel valuesoffset
- the index of the first pixels in the
pixels
arrayscansize
- the width to use in extracting pixels from the
pixels
arraypublic void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int offset, int scansize)
setPixels
in interface ImageConsumer
setPixels
in class ImageFilter
x
- the x coordinate of the rectangley
- the y coordinate of the rectanglew
- the width of the rectangleh
- the height of the rectanglemodel
- the ColorModel
used to translate the pixelspixels
- the array of pixel valuesoffset
- the index of the first pixels in the pixels
arrayscansize
- the width to use in extracting pixels from the
pixels
arraypublic void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int offset, int scansize)
int
at
index (n * scansize + m + offset).
setPixels
in interface ImageConsumer
setPixels
in class ImageFilter
x
- the x coordinate of the rectangley
- the y coordinate of the rectanglew
- the width of the rectangleh
- the height of the rectanglemodel
- the ColorModel
used to translate the pixelspixels
- the array of pixel valuesoffset
- the index of the first pixels in the pixels
arrayscansize
- the width to use in extracting pixels from the
pixels
arraypublic abstract int filterRGB(int x, int y, int rgb)
x
- x-coordinatey
- y-coordinatergb
- color
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |