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