API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt.image. Raster View Source
Author(s)
Since
Version
Serial
Hierarchy
 Object
      Raster
Implements
Subclasses
Description
public class Raster
  A class representing a rectangular array of pixels.
Constructors
protected Raster (SampleModel sampleModel, DataBuffer dataBuffer, Point origin)
  Constructs a Raster with the given SampleModel and DataBuffer.
protected Raster (SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, Raster parent)
  Constructs a Raster with the given SampleModel, DataBuffer, and parent.
protected Raster (SampleModel sampleModel, Point origin)
  Constructs a Raster with the given SampleModel.
Methods
Hide/Show inherited methods
publicstatic 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.
publicstatic 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.
publicstatic 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.
public 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.
public WritableRaster createCompatibleWritableRaster ()
  Create a compatible WritableRaster the same size as this Raster with the same SampleModel and a new initialized DataBuffer.
public WritableRaster createCompatibleWritableRaster (int w, int h)
  Create a compatible WritableRaster with the specified size, a new SampleModel, and a new initialized DataBuffer.
public 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.
public 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.
publicstatic 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.
publicstatic 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.
publicstatic 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.
publicstatic 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.
publicstatic 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.
publicstatic 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.
publicstatic 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.
publicstatic Raster createRaster (SampleModel sm, DataBuffer db, Point location)
  Creates a Raster with the specified SampleModel and DataBuffer.
public Raster createTranslatedChild (int childMinX, int childMinY)
  Create a Raster with the same size, SampleModel and DataBuffer as this one, but with a different location.
publicstatic WritableRaster createWritableRaster (SampleModel sm, DataBuffer db, Point location)
  Creates a WritableRaster with the specified SampleModel and DataBuffer.
publicstatic WritableRaster createWritableRaster (SampleModel sm, Point location)
  Creates a WritableRaster with the specified SampleModel.
public Rectangle getBounds ()
  Returns the bounding Rectangle of this Raster.
public DataBuffer getDataBuffer ()
  Returns the DataBuffer associated with this Raster.
public 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.
public Object getDataElements (int x, int y, Object outData)
  Returns data for a single pixel in a primitive array of type TransferType.
publicfinal int getHeight ()
  Returns the height in pixels of the Raster.
publicfinal int getMinX ()
  Returns the minimum valid X coordinate of the Raster.
publicfinal int getMinY ()
  Returns the minimum valid Y coordinate of the Raster.
publicfinal int getNumBands ()
  Returns the number of bands (samples per pixel) in this Raster.
publicfinal int getNumDataElements ()
  Returns the number of data elements needed to transfer one pixel via the getDataElements and setDataElements methods.
public Raster getParent ()
  Returns the parent Raster (if any) of this Raster or null.
public double getPixel (int x, int y, double[] dArray)
  Returns the samples in an array of double for the specified pixel.
public float getPixel (int x, int y, float[] fArray)
  Returns the samples in an array of float for the specified pixel.
public int getPixel (int x, int y, int[] iArray)
  Returns the samples in an array of int for the specified pixel.
public 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.
public 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.
public 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.
public 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.
public 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.
public 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.
public SampleModel getSampleModel ()
  Returns the SampleModel that describes the layout of the image data.
publicfinal int getSampleModelTranslateX ()
  Returns the X translation from the coordinate system of the SampleModel to that of the Raster.
publicfinal int getSampleModelTranslateY ()
  Returns the Y translation from the coordinate system of the SampleModel to that of the Raster.
public 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.
public 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.
public 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.
publicfinal int getTransferType ()
  Returns the TransferType used to transfer pixels via the getDataElements and setDataElements methods.
publicfinal int getWidth ()
  Returns the width in pixels of the Raster.
Fields
Hide/Show inherited fields
protected DataBuffer dataBuffer
The DataBuffer that stores the image data.
protected int height
The height of this Raster.
protected int minX
The X coordinate of the upper-left pixel of this Raster.
protected int minY
The Y coordinate of the upper-left pixel of this Raster.
protected int numBands
The number of bands in the Raster.
protected int numDataElements
The number of DataBuffer data elements per pixel.
protected Raster parent
The parent of this Raster, or null.
protected SampleModel sampleModel
The SampleModel that describes how pixels from this Raster are stored in the DataBuffer.
protected int sampleModelTranslateX
The X translation from the coordinate space of the Raster's SampleModel to that of the Raster.
protected int sampleModelTranslateY
The Y translation from the coordinate space of the Raster's SampleModel to that of the Raster.
protected int width
The width of this Raster.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar