|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.jai.PackedImageData
This class is used by PixelAccessor
to store packed
image data along with access information. The data must be single
banded and one bit in depth, and are stored in a one-dimensional
byte
array, with eight pixels packed into one
byte
. To insure that each scanline has an integral number
of bytes the last byte may be padded with zeros.
Field Summary | |
int |
bitOffset
The number of bits into the byte that contains the first pixel of each scanline. |
boolean |
coercedZeroOffset
Whether the data have been coerced to have zero offsets. |
boolean |
convertToDest
Indicates whether the PixelAccessor can and must set the
data back into the Raster . |
byte[] |
data
The data array supplied to store the converted data. |
int |
lineStride
The number of array elements in each scanline. |
int |
offset
The number of array elements from the beginning of the data array to the first pixel of the Rectangle . |
Raster |
raster
The Raster containing the pixel data. |
Rectangle |
rect
The rectangular region within the Raster from which the
data are to be retrieved. |
Constructor Summary | |
PackedImageData(Raster raster,
Rectangle rect,
byte[] data,
int lineStride,
int offset,
int bitOffset,
boolean coercedZeroOffset,
boolean convertToDest)
Constructs a PackedImageRaster. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public final Raster raster
Raster
containing the pixel data.public final Rectangle rect
Raster
from which the
data are to be retrieved.public final byte[] data
public final int lineStride
public final int offset
Rectangle
. Since there is
only one sample per pixel, there is only one offset value.public final int bitOffset
public final boolean coercedZeroOffset
public final boolean convertToDest
PixelAccessor
can and must set the
data back into the Raster
. If the data does not need
to be copied back to the Raster
, this variable should be
set to false
. Only destinations can be set.Constructor Detail |
public PackedImageData(Raster raster, Rectangle rect, byte[] data, int lineStride, int offset, int bitOffset, boolean coercedZeroOffset, boolean convertToDest)
raster
- The Raster
containing the pixel data.rect
- The rectangular region from which the data are extracted.data
- The byte data array supplied to store the data.lineStride
- The data array increment to move from the coordinate
x of line i to coordinate x of line i+1.offset
- The number of bytes from the start of the data array
at which to store the first pixel of the rectangle.bitOffset
- The number of bits into the byte that contains the
first pixel of each scanline. This is the same for
every scanline. Note that the bit offset is counted
from left to right in a byte. That is, the most
significant bit of a byte (bit 7) has an offset of 0.coercedZeroOffset
- Whether the data have been coerced to
have zero offsets.convertToDest
- A boolean
indicating whether the data
can and must be set back into the
Raster
. This applies only to
destinations.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |