Raster (Java Platform SE 8 ) (original) (raw)

Modifier and Type

Method

Description

static [WritableRaster](../../../java/awt/image/WritableRaster.html "class in java.awt.image")

[createBandedRaster](../../../java/awt/image/Raster.html#createBandedRaster-java.awt.image.DataBuffer-int-int-int-int:A-int:A-java.awt.Point-)([DataBuffer](../../../java/awt/image/DataBuffer.html "class in java.awt.image") dataBuffer, int w, int h, int scanlineStride, int[] bankIndices, int[] bandOffsets,[Point](../../../java/awt/Point.html "class in java.awt") location)

Creates a Raster based on a BandedSampleModel with the specified DataBuffer, width, height, scanline stride, bank indices, and band offsets.

static [WritableRaster](../../../java/awt/image/WritableRaster.html "class in java.awt.image")

[createBandedRaster](../../../java/awt/image/Raster.html#createBandedRaster-int-int-int-int-int:A-int:A-java.awt.Point-)(int dataType, int w, int h, int scanlineStride, int[] bankIndices, int[] bandOffsets,[Point](../../../java/awt/Point.html "class in java.awt") location)

Creates a Raster based on a BandedSampleModel with the specified data type, width, height, scanline stride, bank indices and band offsets.

static [WritableRaster](../../../java/awt/image/WritableRaster.html "class in java.awt.image")

[createBandedRaster](../../../java/awt/image/Raster.html#createBandedRaster-int-int-int-int-java.awt.Point-)(int dataType, int w, int h, int bands,[Point](../../../java/awt/Point.html "class in java.awt") location)

Creates a Raster based on a BandedSampleModel with the specified data type, width, height, and number of bands.

[Raster](../../../java/awt/image/Raster.html "class in java.awt.image")

[createChild](../../../java/awt/image/Raster.html#createChild-int-int-int-int-int-int-int:A-)(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](../../../java/awt/image/WritableRaster.html "class in java.awt.image")

[createCompatibleWritableRaster](../../../java/awt/image/Raster.html#createCompatibleWritableRaster--)()

Create a compatible WritableRaster the same size as this Raster with the same SampleModel and a new initialized DataBuffer.

[WritableRaster](../../../java/awt/image/WritableRaster.html "class in java.awt.image")

[createCompatibleWritableRaster](../../../java/awt/image/Raster.html#createCompatibleWritableRaster-int-int-)(int w, int h)

Create a compatible WritableRaster with the specified size, a new SampleModel, and a new initialized DataBuffer.

[WritableRaster](../../../java/awt/image/WritableRaster.html "class in java.awt.image")

[createCompatibleWritableRaster](../../../java/awt/image/Raster.html#createCompatibleWritableRaster-int-int-int-int-)(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.

[WritableRaster](../../../java/awt/image/WritableRaster.html "class in java.awt.image")

[createCompatibleWritableRaster](../../../java/awt/image/Raster.html#createCompatibleWritableRaster-java.awt.Rectangle-)([Rectangle](../../../java/awt/Rectangle.html "class in java.awt") rect)

Create a compatible WritableRaster with location (minX, minY) and size (width, height) specified by rect, a new SampleModel, and a new initialized DataBuffer.

static [WritableRaster](../../../java/awt/image/WritableRaster.html "class in java.awt.image")

[createInterleavedRaster](../../../java/awt/image/Raster.html#createInterleavedRaster-java.awt.image.DataBuffer-int-int-int-int-int:A-java.awt.Point-)([DataBuffer](../../../java/awt/image/DataBuffer.html "class in java.awt.image") dataBuffer, int w, int h, int scanlineStride, int pixelStride, int[] bandOffsets,[Point](../../../java/awt/Point.html "class in java.awt") location)

Creates a Raster based on a PixelInterleavedSampleModel with the specified DataBuffer, width, height, scanline stride, pixel stride, and band offsets.

static [WritableRaster](../../../java/awt/image/WritableRaster.html "class in java.awt.image")

[createInterleavedRaster](../../../java/awt/image/Raster.html#createInterleavedRaster-int-int-int-int-int-int:A-java.awt.Point-)(int dataType, int w, int h, int scanlineStride, int pixelStride, int[] bandOffsets,[Point](../../../java/awt/Point.html "class in java.awt") location)

Creates a Raster based on a PixelInterleavedSampleModel with the specified data type, width, height, scanline stride, pixel stride, and band offsets.

static [WritableRaster](../../../java/awt/image/WritableRaster.html "class in java.awt.image")

[createInterleavedRaster](../../../java/awt/image/Raster.html#createInterleavedRaster-int-int-int-int-java.awt.Point-)(int dataType, int w, int h, int bands,[Point](../../../java/awt/Point.html "class in java.awt") location)

Creates a Raster based on a PixelInterleavedSampleModel with the specified data type, width, height, and number of bands.

static [WritableRaster](../../../java/awt/image/WritableRaster.html "class in java.awt.image")

[createPackedRaster](../../../java/awt/image/Raster.html#createPackedRaster-java.awt.image.DataBuffer-int-int-int-int:A-java.awt.Point-)([DataBuffer](../../../java/awt/image/DataBuffer.html "class in java.awt.image") dataBuffer, int w, int h, int scanlineStride, int[] bandMasks,[Point](../../../java/awt/Point.html "class in java.awt") location)

Creates a Raster based on a SinglePixelPackedSampleModel with the specified DataBuffer, width, height, scanline stride, and band masks.

static [WritableRaster](../../../java/awt/image/WritableRaster.html "class in java.awt.image")

[createPackedRaster](../../../java/awt/image/Raster.html#createPackedRaster-java.awt.image.DataBuffer-int-int-int-java.awt.Point-)([DataBuffer](../../../java/awt/image/DataBuffer.html "class in java.awt.image") dataBuffer, int w, int h, int bitsPerPixel,[Point](../../../java/awt/Point.html "class in java.awt") location)

Creates a Raster based on a MultiPixelPackedSampleModel with the specified DataBuffer, width, height, and bits per pixel.

static [WritableRaster](../../../java/awt/image/WritableRaster.html "class in java.awt.image")

[createPackedRaster](../../../java/awt/image/Raster.html#createPackedRaster-int-int-int-int:A-java.awt.Point-)(int dataType, int w, int h, int[] bandMasks,[Point](../../../java/awt/Point.html "class in java.awt") location)

Creates a Raster based on a SinglePixelPackedSampleModel with the specified data type, width, height, and band masks.

static [WritableRaster](../../../java/awt/image/WritableRaster.html "class in java.awt.image")

[createPackedRaster](../../../java/awt/image/Raster.html#createPackedRaster-int-int-int-int-int-java.awt.Point-)(int dataType, int w, int h, int bands, int bitsPerBand,[Point](../../../java/awt/Point.html "class in java.awt") location)

Creates a Raster based on a packed SampleModel with the specified data type, width, height, number of bands, and bits per band.

static [Raster](../../../java/awt/image/Raster.html "class in java.awt.image")

[createRaster](../../../java/awt/image/Raster.html#createRaster-java.awt.image.SampleModel-java.awt.image.DataBuffer-java.awt.Point-)([SampleModel](../../../java/awt/image/SampleModel.html "class in java.awt.image") sm,[DataBuffer](../../../java/awt/image/DataBuffer.html "class in java.awt.image") db,[Point](../../../java/awt/Point.html "class in java.awt") location)

Creates a Raster with the specified SampleModel and DataBuffer.

[Raster](../../../java/awt/image/Raster.html "class in java.awt.image")

[createTranslatedChild](../../../java/awt/image/Raster.html#createTranslatedChild-int-int-)(int childMinX, int childMinY)

Create a Raster with the same size, SampleModel and DataBuffer as this one, but with a different location.

static [WritableRaster](../../../java/awt/image/WritableRaster.html "class in java.awt.image")

[createWritableRaster](../../../java/awt/image/Raster.html#createWritableRaster-java.awt.image.SampleModel-java.awt.image.DataBuffer-java.awt.Point-)([SampleModel](../../../java/awt/image/SampleModel.html "class in java.awt.image") sm,[DataBuffer](../../../java/awt/image/DataBuffer.html "class in java.awt.image") db,[Point](../../../java/awt/Point.html "class in java.awt") location)

Creates a WritableRaster with the specified SampleModel and DataBuffer.

static [WritableRaster](../../../java/awt/image/WritableRaster.html "class in java.awt.image")

[createWritableRaster](../../../java/awt/image/Raster.html#createWritableRaster-java.awt.image.SampleModel-java.awt.Point-)([SampleModel](../../../java/awt/image/SampleModel.html "class in java.awt.image") sm,[Point](../../../java/awt/Point.html "class in java.awt") location)

Creates a WritableRaster with the specified SampleModel.

[Rectangle](../../../java/awt/Rectangle.html "class in java.awt")

[getBounds](../../../java/awt/image/Raster.html#getBounds--)()

Returns the bounding Rectangle of this Raster.

[DataBuffer](../../../java/awt/image/DataBuffer.html "class in java.awt.image")

[getDataBuffer](../../../java/awt/image/Raster.html#getDataBuffer--)()

Returns the DataBuffer associated with this Raster.

[Object](../../../java/lang/Object.html "class in java.lang")

[getDataElements](../../../java/awt/image/Raster.html#getDataElements-int-int-int-int-java.lang.Object-)(int x, int y, int w, int h,[Object](../../../java/lang/Object.html "class in java.lang") outData)

Returns the pixel data for the specified rectangle of pixels in a primitive array of type TransferType.

[Object](../../../java/lang/Object.html "class in java.lang")

[getDataElements](../../../java/awt/image/Raster.html#getDataElements-int-int-java.lang.Object-)(int x, int y,[Object](../../../java/lang/Object.html "class in java.lang") outData)

Returns data for a single pixel in a primitive array of type TransferType.

int

[getHeight](../../../java/awt/image/Raster.html#getHeight--)()

Returns the height in pixels of the Raster.

int

[getMinX](../../../java/awt/image/Raster.html#getMinX--)()

Returns the minimum valid X coordinate of the Raster.

int

[getMinY](../../../java/awt/image/Raster.html#getMinY--)()

Returns the minimum valid Y coordinate of the Raster.

int

[getNumBands](../../../java/awt/image/Raster.html#getNumBands--)()

Returns the number of bands (samples per pixel) in this Raster.

int

[getNumDataElements](../../../java/awt/image/Raster.html#getNumDataElements--)()

Returns the number of data elements needed to transfer one pixel via the getDataElements and setDataElements methods.

[Raster](../../../java/awt/image/Raster.html "class in java.awt.image")

[getParent](../../../java/awt/image/Raster.html#getParent--)()

Returns the parent Raster (if any) of this Raster or null.

double[]

[getPixel](../../../java/awt/image/Raster.html#getPixel-int-int-double:A-)(int x, int y, double[] dArray)

Returns the samples in an array of double for the specified pixel.

float[]

[getPixel](../../../java/awt/image/Raster.html#getPixel-int-int-float:A-)(int x, int y, float[] fArray)

Returns the samples in an array of float for the specified pixel.

int[]

[getPixel](../../../java/awt/image/Raster.html#getPixel-int-int-int:A-)(int x, int y, int[] iArray)

Returns the samples in an array of int for the specified pixel.

double[]

[getPixels](../../../java/awt/image/Raster.html#getPixels-int-int-int-int-double:A-)(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.

float[]

[getPixels](../../../java/awt/image/Raster.html#getPixels-int-int-int-int-float:A-)(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.

int[]

[getPixels](../../../java/awt/image/Raster.html#getPixels-int-int-int-int-int:A-)(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](../../../java/awt/image/Raster.html#getSample-int-int-int-)(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](../../../java/awt/image/Raster.html#getSampleDouble-int-int-int-)(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](../../../java/awt/image/Raster.html#getSampleFloat-int-int-int-)(int x, int y, int b)

Returns the sample in a specified band for the pixel located at (x,y) as a float.

[SampleModel](../../../java/awt/image/SampleModel.html "class in java.awt.image")

[getSampleModel](../../../java/awt/image/Raster.html#getSampleModel--)()

Returns the SampleModel that describes the layout of the image data.

int

[getSampleModelTranslateX](../../../java/awt/image/Raster.html#getSampleModelTranslateX--)()

Returns the X translation from the coordinate system of the SampleModel to that of the Raster.

int

[getSampleModelTranslateY](../../../java/awt/image/Raster.html#getSampleModelTranslateY--)()

Returns the Y translation from the coordinate system of the SampleModel to that of the Raster.

double[]

[getSamples](../../../java/awt/image/Raster.html#getSamples-int-int-int-int-int-double:A-)(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.

float[]

[getSamples](../../../java/awt/image/Raster.html#getSamples-int-int-int-int-int-float:A-)(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.

int[]

[getSamples](../../../java/awt/image/Raster.html#getSamples-int-int-int-int-int-int:A-)(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.

int

[getTransferType](../../../java/awt/image/Raster.html#getTransferType--)()

Returns the TransferType used to transfer pixels via the getDataElements and setDataElements methods.

int

[getWidth](../../../java/awt/image/Raster.html#getWidth--)()

Returns the width in pixels of the Raster.