|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mebigfatguy.pixelle.PixelleEval
public abstract class PixelleEval
an abstract class for evaluation pixels in arbitrary images by enforcing a template pattern that derived classes implement per image format.
Field Summary | |
---|---|
protected java.awt.image.DataBuffer |
buffer
|
protected ColorOutOfBoundsOption |
coobOption
|
protected int |
height
|
protected IndexOutOfBoundsOption |
ioobOption
|
protected PixelleImage |
srcImage
|
protected int |
width
|
Constructor Summary | |
---|---|
PixelleEval(PixelleImage image,
IndexOutOfBoundsOption iOption,
ColorOutOfBoundsOption cOption)
create an evaluator for a specific image and options |
Method Summary | |
---|---|
protected double |
adjustColor(double value)
adjust out of bounds colors by applying rules of ColorOutOfBoundsOption |
abstract double |
getBlueValue(int x,
int y)
template method to get the blue value at a specific x and y |
abstract double |
getGreenValue(int x,
int y)
template method to get the green value at a specific x and y |
int |
getHeight()
gets the height of the source image |
abstract double |
getRedValue(int x,
int y)
template method to get the red value at a specific x and y |
abstract double |
getTransparencyValue(int x,
int y)
template method to get the transparency value at a specific x and y |
double |
getValue(int x,
int y,
char pixelSpec)
retrieves the value at a specific index for a specific color, transparency or selection |
int |
getWidth()
gets the width of the source image |
protected void |
setSelectionValue(int x,
int y,
double value)
sets the selection value at a specific index |
void |
setValue(int x,
int y,
char pixelSpec,
double value)
sets the pixel value at the specified x, y |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PixelleImage srcImage
protected java.awt.image.DataBuffer buffer
protected int width
protected int height
protected IndexOutOfBoundsOption ioobOption
protected ColorOutOfBoundsOption coobOption
Constructor Detail |
---|
public PixelleEval(PixelleImage image, IndexOutOfBoundsOption iOption, ColorOutOfBoundsOption cOption)
image
- the image to evaluateiOption
- the out of bounds pixels option to usecOption
- TODOMethod Detail |
---|
public abstract double getRedValue(int x, int y)
x
- the x coordinatey
- the y coordinate
public abstract double getGreenValue(int x, int y)
x
- the x coordinatey
- the y coordinate
public abstract double getBlueValue(int x, int y)
x
- the x coordinatey
- the y coordinate
public abstract double getTransparencyValue(int x, int y)
x
- the x coordinatey
- the y coordinate
public double getValue(int x, int y, char pixelSpec)
x
- the x coordinatey
- the y coordinate
public void setValue(int x, int y, char pixelSpec, double value)
x
- the x coordinatey
- the y coordinatepixelSpec
- the component to setvalue
- the value to setpublic int getWidth()
public int getHeight()
protected void setSelectionValue(int x, int y, double value)
x
- the x coordinatey
- the y coordinatevalue
- the selection value to use where 0 is offprotected double adjustColor(double value)
value
- the input color value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |