| 
JavaTM 2 Platform Std. Ed. v1.3.1  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
  |
  +--java.awt.image.Raster
        |
        +--java.awt.image.WritableRaster
              |
              +--java.awt.image.MacWritableIntRaster
| Field Summary | |
protected  int | 
pixelStride
Pixel stride of the image data contained in this Raster.  | 
protected  int | 
scanlineStride
Scanline stride of the image data contained in this Raster.  | 
| Fields inherited from class java.awt.image.Raster | 
dataBuffer, height, minX, minY, numBands, numDataElements, parent, sampleModel, sampleModelTranslateX, sampleModelTranslateY, width | 
| Constructor Summary | |
MacWritableIntRaster(SampleModel sampleModel,
                     DataBuffer inDataBuffer,
                     Point origin)
 | 
|
MacWritableIntRaster(SampleModel sampleModel,
                     DataBuffer dataBuffer,
                     Rectangle childbounds,
                     Point origin,
                     MacWritableIntRaster parent)
 | 
|
MacWritableIntRaster(SampleModel sampleModel,
                     Point origin)
 | 
|
| Method Summary | |
 WritableRaster | 
createCompatibleWritableRaster()
Create a compatible WritableRaster the same size as this Raster with the same 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(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 | 
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 | 
createWritableChild(int parentX,
                    int parentY,
                    int width,
                    int height,
                    int childMinX,
                    int childMinY,
                    int[] bandList)
Returns a new WritableRaster which shares all or part of this WritableRaster's DataBuffer.  | 
 Object | 
getDataElements(int x,
                int y,
                int w,
                int h,
                Object obj)
Returns the pixel data for the specified rectangle of pixels in a primitive array of type TransferType.  | 
 int | 
getDataOffset(int inBank)
 | 
 int | 
getScanlineStride()
 | 
 void | 
setDataElements(int x,
                int y,
                int w,
                int h,
                Object obj)
Stores an array of data elements into the specified rectangular region.  | 
 void | 
setDataElements(int x,
                int y,
                Object obj)
Sets the data for a single pixel from a primitive array of type TransferType.  | 
 String | 
toString()
Returns a string representation of the object.  | 
| Methods inherited from class java.awt.image.WritableRaster | 
createWritableTranslatedChild, getWritableParent, setDataElements, setPixel, setPixel, setPixel, setPixels, setPixels, setPixels, setRect, setRect, setSample, setSample, setSample, setSamples, setSamples, setSamples | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
protected int scanlineStride
protected int pixelStride
| Constructor Detail | 
public MacWritableIntRaster(SampleModel sampleModel,
                            Point origin)
public MacWritableIntRaster(SampleModel sampleModel,
                            DataBuffer dataBuffer,
                            Rectangle childbounds,
                            Point origin,
                            MacWritableIntRaster parent)
public MacWritableIntRaster(SampleModel sampleModel,
                            DataBuffer inDataBuffer,
                            Point origin)
| Method Detail | 
public void setDataElements(int x,
                            int y,
                            int w,
                            int h,
                            Object obj)
      inData[((y2-y)*w + (x2-x))*numDataElements + n]
 setDataElements in class WritableRasterx - The X coordinate of the upper left pixel location.y - The Y coordinate of the upper left pixel location.w - Width of the pixel rectangle.h - Height of the pixel rectangle.inData - An object reference to an array of type defined by
                 getTransferType() and length w*h*getNumDataElements()
                 containing the pixel data to place between x,y and
                 x+h, y+h.
public void setDataElements(int x,
                            int y,
                            Object obj)
WritableRastersetDataElements in class WritableRasterjava.awt.image.WritableRasterx - The X coordinate of the pixel location.y - The Y coordinate of the pixel location.inData - An object reference to an array of type defined by
                 getTransferType() and length getNumDataElements()
                 containing the pixel data to place at x,y.SampleModel.setDataElements(int, int, Object, DataBuffer)public int getScanlineStride()
public int getDataOffset(int inBank)
public Object getDataElements(int x,
                              int y,
                              int w,
                              int h,
                              Object obj)
RastergetDataElements in class Rasterjava.awt.image.Rasterx - The X coordinate of the upper left pixel location.y - The Y coordinate of the upper left pixel location.width - Width of the pixel rectangle.height - Height of the pixel rectangle.outData - An object reference to an array of type defined by
                 getTransferType() and length w*h*getNumDataElements().  
                 If null, an array of appropriate type and size will be
                 allocated.SampleModel.getDataElements(int, int, int, int, Object, DataBuffer)public WritableRaster createCompatibleWritableRaster()
createCompatibleWritableRaster in class Raster
public WritableRaster createCompatibleWritableRaster(int w,
                                                     int h)
createCompatibleWritableRaster in class RasterRasterFormatException - if the width or height is less than
                               or equal to zero.public WritableRaster createCompatibleWritableRaster(Rectangle rect)
createCompatibleWritableRaster in class Raster
public WritableRaster createCompatibleWritableRaster(int x,
                                                     int y,
                                                     int w,
                                                     int h)
createCompatibleWritableRaster in class Raster
public WritableRaster createWritableChild(int parentX,
                                          int parentY,
                                          int width,
                                          int height,
                                          int childMinX,
                                          int childMinY,
                                          int[] bandList)
The parentX, parentY, width and height parameters form a Rectangle in this WritableRaster's coordinate space, indicating the area of pixels to be shared. An error will be thrown if this Rectangle is not contained with the bounds of the current WritableRaster.
The new WritableRaster may additionally be translated to a different coordinate system for the plane than that used by the current WritableRaster. The childMinX and childMinY parameters give the new (x, y) coordinate of the upper-left pixel of the returned WritableRaster; the coordinate (childMinX, childMinY) in the new WritableRaster will map to the same pixel as the coordinate (parentX, parentY) in the current WritableRaster.
The new WritableRaster may be defined to contain only a subset of the bands of the current WritableRaster, possibly reordered, by means of the bandList parameter. If bandList is null, it is taken to include all of the bands of the current WritableRaster in their current order.
To create a new WritableRaster that contains a subregion of the current WritableRaster, but shares its coordinate system and bands, this method should be called with childMinX equal to parentX, childMinY equal to parentY, and bandList equal to null.
createWritableChild in class WritableRasterparentX - X coordinate of the upper left corner in this
                   WritableRaster's coordinates.parentY - Y coordinate of the upper left corner in this
                   WritableRaster's coordinates.width - Width of the region starting at (parentX, parentY).height - Height of the region starting at (parentX, parentY).childMinX - X coordinate of the upper left corner of
                   the returned WritableRaster.childMinY - Y coordinate of the upper left corner of
                   the returned WritableRaster.bandList - Array of band indices, or null to use all bands.RasterFormatException - if the subregion is outside of the
                               raster bounds.public String toString()
ObjecttoString method returns a string that 
 "textually represents" this object. The result should 
 be a concise but informative representation that is easy for a 
 person to read.
 It is recommended that all subclasses override this method.
 
 The toString method for class Object 
 returns a string consisting of the name of the class of which the 
 object is an instance, the at-sign character `@', and 
 the unsigned hexadecimal representation of the hash code of the 
 object. In other words, this method returns a string equal to the 
 value of:
 
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString in class Objectjava.lang.Object
  | 
JavaTM 2 Platform Std. Ed. v1.3.1  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A.  All Rights Reserved.