java.awt.image

Class Raster

Known Direct Subclasses:
WritableRaster

public class Raster
extends Object

Field Summary

protected DataBuffer
dataBuffer
protected int
height
protected int
minX
protected int
minY
protected int
numBands
protected int
numDataElements
protected Raster
parent
protected SampleModel
sampleModel
protected int
sampleModelTranslateX
protected int
sampleModelTranslateY
protected int
width

Constructor Summary

Raster(SampleModel sampleModel, Point origin)
Raster(SampleModel sampleModel, DataBuffer dataBuffer, Point origin)
Raster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, Raster parent)

Method Summary

static WritableRaster
createBandedRaster(int dataType, int w, int h, int scanlineStride, int[] bankIndices, int[] bandOffsets, Point location)
static WritableRaster
createBandedRaster(int dataType, int w, int h, int bands, Point location)
static WritableRaster
createBandedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int[] bankIndices, int[] bandOffsets, Point location)
Raster
createChild(int parentX, int parentY, int width, int height, int childMinX, int childMinY, int[] bandList)
WritableRaster
createCompatibleWritableRaster()
WritableRaster
createCompatibleWritableRaster(int w, int h)
WritableRaster
createCompatibleWritableRaster(int x, int y, int w, int h)
WritableRaster
createCompatibleWritableRaster(Rectangle rect)
static WritableRaster
createInterleavedRaster(int dataType, int w, int h, int scanlineStride, int pixelStride, int[] bandOffsets, Point location)
static WritableRaster
createInterleavedRaster(int dataType, int w, int h, int bands, Point location)
static WritableRaster
createInterleavedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int pixelStride, int[] bandOffsets, Point location)
static WritableRaster
createPackedRaster(int dataType, int w, int h, int bands, int bitsPerBand, Point location)
static WritableRaster
createPackedRaster(int dataType, int w, int h, int[] bandMasks, Point location)
static WritableRaster
createPackedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int[] bandMasks, Point location)
static WritableRaster
createPackedRaster(DataBuffer dataBuffer, int w, int h, int bitsPerPixel, Point location)
static Raster
createRaster(SampleModel sm, DataBuffer db, Point location)
Raster
createTranslatedChild(int childMinX, int childMinY)
static WritableRaster
createWritableRaster(SampleModel sm, Point location)
static WritableRaster
createWritableRaster(SampleModel sm, DataBuffer db, Point location)
Rectangle
getBounds()
DataBuffer
getDataBuffer()
Object
getDataElements(int x, int y, int w, int h, Object outData)
Object
getDataElements(int x, int y, Object outData)
int
getHeight()
int
getMinX()
int
getMinY()
int
getNumBands()
int
getNumDataElements()
Raster
getParent()
double[]
getPixel(int x, int y, double[] dArray)
float[]
getPixel(int x, int y, float[] fArray)
int[]
getPixel(int x, int y, int[] iArray)
double[]
getPixels(int x, int y, int w, int h, double[] dArray)
float[]
getPixels(int x, int y, int w, int h, float[] fArray)
int[]
getPixels(int x, int y, int w, int h, int[] iArray)
int
getSample(int x, int y, int b)
double
getSampleDouble(int x, int y, int b)
float
getSampleFloat(int x, int y, int b)
SampleModel
getSampleModel()
int
getSampleModelTranslateX()
int
getSampleModelTranslateY()
double[]
getSamples(int x, int y, int w, int h, int b, double[] dArray)
float[]
getSamples(int x, int y, int w, int h, int b, float[] fArray)
int[]
getSamples(int x, int y, int w, int h, int b, int[] iArray)
int
getTransferType()
int
getWidth()
String
toString()
Create a String representing the stat of this Raster.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

dataBuffer

protected DataBuffer dataBuffer

height

protected int height

minX

protected int minX

minY

protected int minY

numBands

protected int numBands

numDataElements

protected int numDataElements

parent

protected Raster parent

sampleModel

protected SampleModel sampleModel

sampleModelTranslateX

protected int sampleModelTranslateX

sampleModelTranslateY

protected int sampleModelTranslateY

width

protected int width

Constructor Details

Raster

protected Raster(SampleModel sampleModel,
                 Point origin)

Raster

protected Raster(SampleModel sampleModel,
                 DataBuffer dataBuffer,
                 Point origin)

Raster

protected Raster(SampleModel sampleModel,
                 DataBuffer dataBuffer,
                 Rectangle aRegion,
                 Point sampleModelTranslate,
                 Raster parent)

Method Details

createBandedRaster

public static WritableRaster createBandedRaster(int dataType,
                                                int w,
                                                int h,
                                                int scanlineStride,
                                                int[] bankIndices,
                                                int[] bandOffsets,
                                                Point location)

createBandedRaster

public static WritableRaster createBandedRaster(int dataType,
                                                int w,
                                                int h,
                                                int bands,
                                                Point location)

createBandedRaster

public static WritableRaster createBandedRaster(DataBuffer dataBuffer,
                                                int w,
                                                int h,
                                                int scanlineStride,
                                                int[] bankIndices,
                                                int[] bandOffsets,
                                                Point location)

createChild

public Raster createChild(int parentX,
                          int parentY,
                          int width,
                          int height,
                          int childMinX,
                          int childMinY,
                          int[] bandList)

createCompatibleWritableRaster

public WritableRaster createCompatibleWritableRaster()

createCompatibleWritableRaster

public WritableRaster createCompatibleWritableRaster(int w,
                                                     int h)

createCompatibleWritableRaster

public WritableRaster createCompatibleWritableRaster(int x,
                                                     int y,
                                                     int w,
                                                     int h)

createCompatibleWritableRaster

public WritableRaster createCompatibleWritableRaster(Rectangle rect)

createInterleavedRaster

public static WritableRaster createInterleavedRaster(int dataType,
                                                     int w,
                                                     int h,
                                                     int scanlineStride,
                                                     int pixelStride,
                                                     int[] bandOffsets,
                                                     Point location)

createInterleavedRaster

public static WritableRaster createInterleavedRaster(int dataType,
                                                     int w,
                                                     int h,
                                                     int bands,
                                                     Point location)

createInterleavedRaster

public static WritableRaster createInterleavedRaster(DataBuffer dataBuffer,
                                                     int w,
                                                     int h,
                                                     int scanlineStride,
                                                     int pixelStride,
                                                     int[] bandOffsets,
                                                     Point location)

createPackedRaster

public static WritableRaster createPackedRaster(int dataType,
                                                int w,
                                                int h,
                                                int bands,
                                                int bitsPerBand,
                                                Point location)

createPackedRaster

public static WritableRaster createPackedRaster(int dataType,
                                                int w,
                                                int h,
                                                int[] bandMasks,
                                                Point location)

createPackedRaster

public static WritableRaster createPackedRaster(DataBuffer dataBuffer,
                                                int w,
                                                int h,
                                                int scanlineStride,
                                                int[] bandMasks,
                                                Point location)

createPackedRaster

public static WritableRaster createPackedRaster(DataBuffer dataBuffer,
                                                int w,
                                                int h,
                                                int bitsPerPixel,
                                                Point location)

createRaster

public static Raster createRaster(SampleModel sm,
                                  DataBuffer db,
                                  Point location)

createTranslatedChild

public Raster createTranslatedChild(int childMinX,
                                    int childMinY)

createWritableRaster

public static WritableRaster createWritableRaster(SampleModel sm,
                                                  Point location)

createWritableRaster

public static WritableRaster createWritableRaster(SampleModel sm,
                                                  DataBuffer db,
                                                  Point location)

getBounds

public Rectangle getBounds()

getDataBuffer

public DataBuffer getDataBuffer()

getDataElements

public Object getDataElements(int x,
                              int y,
                              int w,
                              int h,
                              Object outData)

getDataElements

public Object getDataElements(int x,
                              int y,
                              Object outData)

getHeight

public final int getHeight()

getMinX

public final int getMinX()

getMinY

public final int getMinY()

getNumBands

public final int getNumBands()

getNumDataElements

public final int getNumDataElements()

getParent

public Raster getParent()

getPixel

public double[] getPixel(int x,
                         int y,
                         double[] dArray)

getPixel

public float[] getPixel(int x,
                        int y,
                        float[] fArray)

getPixel

public int[] getPixel(int x,
                      int y,
                      int[] iArray)

getPixels

public double[] getPixels(int x,
                          int y,
                          int w,
                          int h,
                          double[] dArray)

getPixels

public float[] getPixels(int x,
                         int y,
                         int w,
                         int h,
                         float[] fArray)

getPixels

public int[] getPixels(int x,
                       int y,
                       int w,
                       int h,
                       int[] iArray)

getSample

public int getSample(int x,
                     int y,
                     int b)

getSampleDouble

public double getSampleDouble(int x,
                              int y,
                              int b)

getSampleFloat

public float getSampleFloat(int x,
                            int y,
                            int b)

getSampleModel

public SampleModel getSampleModel()

getSampleModelTranslateX

public final int getSampleModelTranslateX()

getSampleModelTranslateY

public final int getSampleModelTranslateY()

getSamples

public double[] getSamples(int x,
                           int y,
                           int w,
                           int h,
                           int b,
                           double[] dArray)

getSamples

public float[] getSamples(int x,
                          int y,
                          int w,
                          int h,
                          int b,
                          float[] fArray)

getSamples

public int[] getSamples(int x,
                        int y,
                        int w,
                        int h,
                        int b,
                        int[] iArray)

getTransferType

public final int getTransferType()

getWidth

public final int getWidth()

toString

public String toString()
Create a String representing the stat of this Raster.
Overrides:
toString in interface Object
Returns:
A String representing the stat of this Raster.

Copyright (C) 2000, 2002, 2003 Free Software Foundation This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.