|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.image.Raster
java.awt.image.WritableRaster
uk.ac.essex.ia.util.WritableRaster2
public class WritableRaster2
A simple extension of WritableRaster which adds some convenience methods for setting pixel values in a more intuitive way (setGrey(), setRed(), setGreen(), setBlue(), etc.)
| Field Summary | |
|---|---|
static int |
BLACK
|
static int |
WHITE
|
| Fields inherited from class java.awt.image.Raster |
|---|
dataBuffer, height, minX, minY, numBands, numDataElements, parent, sampleModel, sampleModelTranslateX, sampleModelTranslateY, width |
| Constructor Summary | |
|---|---|
protected |
WritableRaster2(java.awt.image.SampleModel sampleModel,
java.awt.image.DataBuffer dataBuffer,
java.awt.Point origin)
constructs a WritableRaster2 by calling parent constructor with the given parameters. |
protected |
WritableRaster2(java.awt.image.SampleModel sampleModel,
java.awt.image.DataBuffer dataBuffer,
java.awt.Rectangle aRegion,
java.awt.Point sampleModelTranslate,
java.awt.image.WritableRaster parent)
constructs a WritableRaster2 by calling parent constructor with the given parameters. |
protected |
WritableRaster2(java.awt.image.SampleModel sampleModel,
java.awt.Point origin)
constructs a WritableRaster2 by calling parent constructor with the given parameters. |
|
WritableRaster2(java.awt.image.WritableRaster src)
Effectively type-casts a Raster as a Raster2 by calling parent constructor with the given parameters. |
| Method Summary | |
|---|---|
void |
setBlue(int u,
int v,
int value)
sets the pixel value in band 0 at the given position. |
void |
setGreen(int u,
int v,
int value)
sets the pixel value in band 0 at the given position. |
void |
setGrey(int x,
int y,
int value)
sets the pixel value in band 0 at the given position. |
void |
setRed(int u,
int v,
int value)
sets the pixel value in band 0 at the given position. |
void |
setRGB(int u,
int v,
int r,
int g,
int b)
sets the pixel value in band 0 at the given position. |
| Methods inherited from class java.awt.image.WritableRaster |
|---|
createWritableChild, createWritableTranslatedChild, getWritableParent, setDataElements, setDataElements, setDataElements, setPixel, setPixel, setPixel, setPixels, setPixels, setPixels, setRect, setRect, setSample, setSample, setSample, setSamples, setSamples, setSamples |
| Methods inherited from class java.awt.image.Raster |
|---|
createBandedRaster, createBandedRaster, createBandedRaster, createChild, createCompatibleWritableRaster, createCompatibleWritableRaster, createCompatibleWritableRaster, createCompatibleWritableRaster, createInterleavedRaster, createInterleavedRaster, createInterleavedRaster, createPackedRaster, createPackedRaster, createPackedRaster, createPackedRaster, createRaster, createTranslatedChild, createWritableRaster, createWritableRaster, getBounds, getDataBuffer, getDataElements, getDataElements, getHeight, getMinX, getMinY, getNumBands, getNumDataElements, getParent, getPixel, getPixel, getPixel, getPixels, getPixels, getPixels, getSample, getSampleDouble, getSampleFloat, getSampleModel, getSampleModelTranslateX, getSampleModelTranslateY, getSamples, getSamples, getSamples, getTransferType, getWidth |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BLACK
public static final int WHITE
| Constructor Detail |
|---|
protected WritableRaster2(java.awt.image.SampleModel sampleModel,
java.awt.image.DataBuffer dataBuffer,
java.awt.Point origin)
protected WritableRaster2(java.awt.image.SampleModel sampleModel,
java.awt.image.DataBuffer dataBuffer,
java.awt.Rectangle aRegion,
java.awt.Point sampleModelTranslate,
java.awt.image.WritableRaster parent)
protected WritableRaster2(java.awt.image.SampleModel sampleModel,
java.awt.Point origin)
public WritableRaster2(java.awt.image.WritableRaster src)
src - the Raster to cast| Method Detail |
|---|
public void setGrey(int x,
int y,
int value)
x - horizontal raster position.y - vertical raster position.value - the pixel value to store at position x,y.
public void setRed(int u,
int v,
int value)
u - horizontal raster position.v - vertical raster position.value - the red pixel value to store at position u,v.
public void setGreen(int u,
int v,
int value)
u - horizontal raster position.v - vertical raster position.value - the green pixel value to store at position u,v.
public void setBlue(int u,
int v,
int value)
u - horizontal raster position.v - vertical raster position.value - the blue pixel value to store at position u,v.
public void setRGB(int u,
int v,
int r,
int g,
int b)
u - horizontal raster position.v - vertical raster position.r - the red pixel value to store at position u,v.g - the green pixel value to store at position u,v.b - the blue pixel value to store at position u,v.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||