From class
java.awt.image.WritableRaster
WritableRaster
|
createWritableChild(int parentX, int parentY, int w, int h, int childMinX, int childMinY, int[] bandList)
Returns a new WritableRaster which shares all or part of this
WritableRaster's DataBuffer.
|
WritableRaster
|
createWritableTranslatedChild(int childMinX, int childMinY)
Create a WritableRaster with the same size, SampleModel and DataBuffer
as this one, but with a different location.
|
WritableRaster
|
getWritableParent()
Returns the parent WritableRaster (if any) of this WritableRaster,
or else null.
|
void
|
setDataElements(int x, int y, int w, int h, Object inData)
Sets the data for a rectangle of pixels from a
primitive array of type TransferType.
|
void
|
setDataElements(int x, int y, Raster inRaster)
Sets the data for a rectangle of pixels from an input Raster.
|
void
|
setDataElements(int x, int y, Object inData)
Sets the data for a single pixel from a
primitive array of type TransferType.
|
void
|
setPixel(int x, int y, float[] fArray)
Sets a pixel in the DataBuffer using a float array of samples for input.
|
void
|
setPixel(int x, int y, int[] iArray)
Sets a pixel in the DataBuffer using an int array of samples for input.
|
void
|
setPixel(int x, int y, double[] dArray)
Sets a pixel in the DataBuffer using a double array of samples for input.
|
void
|
setPixels(int x, int y, int w, int h, float[] fArray)
Sets all samples for a rectangle of pixels from a float array containing
one sample per array element.
|
void
|
setPixels(int x, int y, int w, int h, int[] iArray)
Sets all samples for a rectangle of pixels from an int array containing
one sample per array element.
|
void
|
setPixels(int x, int y, int w, int h, double[] dArray)
Sets all samples for a rectangle of pixels from a double array containing
one sample per array element.
|
void
|
setRect(Raster srcRaster)
Copies pixels from Raster srcRaster to this WritableRaster.
|
void
|
setRect(int dx, int dy, Raster srcRaster)
Copies pixels from Raster srcRaster to this WritableRaster.
|
void
|
setSample(int x, int y, int b, int s)
Sets a sample in the specified band for the pixel located at (x,y)
in the DataBuffer using an int for input.
|
void
|
setSample(int x, int y, int b, double s)
Sets a sample in the specified band for the pixel located at (x,y)
in the DataBuffer using a double for input.
|
void
|
setSample(int x, int y, int b, float s)
Sets a sample in the specified band for the pixel located at (x,y)
in the DataBuffer using a float for input.
|
void
|
setSamples(int x, int y, int w, int h, int b, double[] dArray)
Sets the samples in the specified band for the specified rectangle
of pixels from a double array containing one sample per array element.
|
void
|
setSamples(int x, int y, int w, int h, int b, int[] iArray)
Sets the samples in the specified band for the specified rectangle
of pixels from an int array containing one sample per array element.
|
void
|
setSamples(int x, int y, int w, int h, int b, float[] fArray)
Sets the samples in the specified band for the specified rectangle
of pixels from a float array containing one sample per array element.
|
|
From class
java.awt.image.Raster
static
WritableRaster
|
createBandedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int[] bankIndices, int[] bandOffsets, Point location)
Creates a Raster based on a BandedSampleModel with the
specified DataBuffer, width, height, scanline stride, bank
indices, and band offsets.
|
static
WritableRaster
|
createBandedRaster(int dataType, int w, int h, int scanlineStride, int[] bankIndices, int[] bandOffsets, Point location)
Creates a Raster based on a BandedSampleModel with the
specified data type, width, height, scanline stride, bank
indices and band offsets.
|
static
WritableRaster
|
createBandedRaster(int dataType, int w, int h, int bands, Point location)
Creates a Raster based on a BandedSampleModel with the
specified data type, width, height, and number of bands.
|
Raster
|
createChild(int parentX, int parentY, int width, int height, int childMinX, int childMinY, int[] bandList)
Returns a new Raster which shares all or part of this Raster's
DataBuffer.
|
WritableRaster
|
createCompatibleWritableRaster(Rectangle rect)
Create a compatible WritableRaster with location (minX, minY)
and size (width, height) specified by rect, a
new SampleModel, and a new initialized DataBuffer.
|
WritableRaster
|
createCompatibleWritableRaster(int w, int h)
Create a compatible WritableRaster with the specified size, a new
SampleModel, and a new initialized DataBuffer.
|
WritableRaster
|
createCompatibleWritableRaster()
Create a compatible WritableRaster the same size as this Raster with
the same SampleModel and a new initialized DataBuffer.
|
WritableRaster
|
createCompatibleWritableRaster(int x, int y, int w, int h)
Create a compatible WritableRaster with the specified
location (minX, minY) and size (width, height), a
new SampleModel, and a new initialized DataBuffer.
|
static
WritableRaster
|
createInterleavedRaster(int dataType, int w, int h, int bands, Point location)
Creates a Raster based on a PixelInterleavedSampleModel with the
specified data type, width, height, and number of bands.
|
static
WritableRaster
|
createInterleavedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int pixelStride, int[] bandOffsets, Point location)
Creates a Raster based on a PixelInterleavedSampleModel with the
specified DataBuffer, width, height, scanline stride, pixel
stride, and band offsets.
|
static
WritableRaster
|
createInterleavedRaster(int dataType, int w, int h, int scanlineStride, int pixelStride, int[] bandOffsets, Point location)
Creates a Raster based on a PixelInterleavedSampleModel with the
specified data type, width, height, scanline stride, pixel
stride, and band offsets.
|
static
WritableRaster
|
createPackedRaster(int dataType, int w, int h, int bands, int bitsPerBand, Point location)
Creates a Raster based on a packed SampleModel with the
specified data type, width, height, number of bands, and bits
per band.
|
static
WritableRaster
|
createPackedRaster(DataBuffer dataBuffer, int w, int h, int bitsPerPixel, Point location)
Creates a Raster based on a MultiPixelPackedSampleModel with the
specified DataBuffer, width, height, and bits per pixel.
|
static
WritableRaster
|
createPackedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int[] bandMasks, Point location)
Creates a Raster based on a SinglePixelPackedSampleModel with
the specified DataBuffer, width, height, scanline stride, and
band masks.
|
static
WritableRaster
|
createPackedRaster(int dataType, int w, int h, int[] bandMasks, Point location)
Creates a Raster based on a SinglePixelPackedSampleModel with
the specified data type, width, height, and band masks.
|
static
Raster
|
createRaster(SampleModel sm, DataBuffer db, Point location)
Creates a Raster with the specified SampleModel and DataBuffer.
|
Raster
|
createTranslatedChild(int childMinX, int childMinY)
Create a Raster with the same size, SampleModel and DataBuffer
as this one, but with a different location.
|
static
WritableRaster
|
createWritableRaster(SampleModel sm, DataBuffer db, Point location)
Creates a WritableRaster with the specified SampleModel and DataBuffer.
|
static
WritableRaster
|
createWritableRaster(SampleModel sm, Point location)
Creates a WritableRaster with the specified SampleModel.
|
Rectangle
|
getBounds()
Returns the bounding Rectangle of this Raster.
|
DataBuffer
|
getDataBuffer()
Returns the DataBuffer associated with this Raster.
|
Object
|
getDataElements(int x, int y, int w, int h, Object outData)
Returns the pixel data for the specified rectangle of pixels in a
primitive array of type TransferType.
|
Object
|
getDataElements(int x, int y, Object outData)
Returns data for a single pixel in a primitive array of type
TransferType.
|
final
int
|
getHeight()
Returns the height in pixels of the Raster.
|
final
int
|
getMinX()
Returns the minimum valid X coordinate of the Raster.
|
final
int
|
getMinY()
Returns the minimum valid Y coordinate of the Raster.
|
final
int
|
getNumBands()
Returns the number of bands (samples per pixel) in this Raster.
|
final
int
|
getNumDataElements()
Returns the number of data elements needed to transfer one pixel
via the getDataElements and setDataElements methods.
|
Raster
|
getParent()
Returns the parent Raster (if any) of this Raster or null.
|
int[]
|
getPixel(int x, int y, int[] iArray)
Returns the samples in an array of int for the specified pixel.
|
float[]
|
getPixel(int x, int y, float[] fArray)
Returns the samples in an array of float for the
specified pixel.
|
double[]
|
getPixel(int x, int y, double[] dArray)
Returns the samples in an array of double for the specified pixel.
|
float[]
|
getPixels(int x, int y, int w, int h, float[] fArray)
Returns a float array containing all samples for a rectangle of pixels,
one sample per array element.
|
double[]
|
getPixels(int x, int y, int w, int h, double[] dArray)
Returns a double array containing all samples for a rectangle of pixels,
one sample per array element.
|
int[]
|
getPixels(int x, int y, int w, int h, int[] iArray)
Returns an int array containing all samples for a rectangle of pixels,
one sample per array element.
|
int
|
getSample(int x, int y, int b)
Returns the sample in a specified band for the pixel located
at (x,y) as an int.
|
double
|
getSampleDouble(int x, int y, int b)
Returns the sample in a specified band
for a pixel located at (x,y) as a double.
|
float
|
getSampleFloat(int x, int y, int b)
Returns the sample in a specified band
for the pixel located at (x,y) as a float.
|
SampleModel
|
getSampleModel()
Returns the SampleModel that describes the layout of the image data.
|
final
int
|
getSampleModelTranslateX()
Returns the X translation from the coordinate system of the
SampleModel to that of the Raster.
|
final
int
|
getSampleModelTranslateY()
Returns the Y translation from the coordinate system of the
SampleModel to that of the Raster.
|
int[]
|
getSamples(int x, int y, int w, int h, int b, int[] iArray)
Returns the samples for a specified band for the specified rectangle
of pixels in an int array, one sample per array element.
|
float[]
|
getSamples(int x, int y, int w, int h, int b, float[] fArray)
Returns the samples for a specified band for the specified rectangle
of pixels in a float array, one sample per array element.
|
double[]
|
getSamples(int x, int y, int w, int h, int b, double[] dArray)
Returns the samples for a specified band for a specified rectangle
of pixels in a double array, one sample per array element.
|
final
int
|
getTransferType()
Returns the TransferType used to transfer pixels via the
getDataElements and setDataElements methods.
|
final
int
|
getWidth()
Returns the width in pixels of the Raster.
|
|