| java.lang.Object javax.media.jai.PackedImageData
PackedImageData | final public class PackedImageData (Code) | | 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.
since: JAI 1.1 |
Field Summary | |
final public int | bitOffset The number of bits into the byte that contains the first pixel
of each scanline. | final public boolean | coercedZeroOffset Whether the data have been coerced to have zero offsets. | final public boolean | convertToDest Indicates whether the PixelAccessor can and must set the
data back into the Raster . | final public byte[] | data The data array supplied to store the converted data. | final public int | lineStride The number of array elements in each scanline. | final public int | offset The number of array elements from the beginning of the data array
to the first pixel of the Rectangle . | final public Raster | raster The Raster containing the pixel data. | final public Rectangle | rect The rectangular region within the Raster from which the
data are to be retrieved. |
Constructor Summary | |
public | PackedImageData(Raster raster, Rectangle rect, byte[] data, int lineStride, int offset, int bitOffset, boolean coercedZeroOffset, boolean convertToDest) Constructs a PackedImageRaster. |
bitOffset | final public int bitOffset(Code) | | 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 (bit 7) has an offset of 0.
|
coercedZeroOffset | final public boolean coercedZeroOffset(Code) | | Whether the data have been coerced to have zero offsets.
|
convertToDest | final public boolean convertToDest(Code) | | Indicates whether the 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.
|
data | final public byte[] data(Code) | | The data array supplied to store the converted data.
|
lineStride | final public int lineStride(Code) | | The number of array elements in each scanline.
|
offset | final public int offset(Code) | | The number of array elements from the beginning of the data array
to the first pixel of the Rectangle . Since there is
only one sample per pixel, there is only one offset value.
|
raster | final public Raster raster(Code) | | The Raster containing the pixel data.
|
rect | final public Rectangle rect(Code) | | The rectangular region within the Raster from which the
data are to be retrieved.
|
PackedImageData | public PackedImageData(Raster raster, Rectangle rect, byte[] data, int lineStride, int offset, int bitOffset, boolean coercedZeroOffset, boolean convertToDest)(Code) | | Constructs a PackedImageRaster.
Parameters: raster - The Raster containing the pixel data. Parameters: rect - The rectangular region from which the data are extracted. Parameters: data - The byte data array supplied to store the data. Parameters: lineStride - The data array increment to move from the coordinatex of line i to coordinate x of line i+1. Parameters: offset - The number of bytes from the start of the data arrayat which to store the first pixel of the rectangle. Parameters: 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 mostsignificant bit of a byte (bit 7) has an offset of 0. Parameters: coercedZeroOffset - Whether the data have been coerced tohave zero offsets. Parameters: convertToDest - A boolean indicating whether the data can and must be set back into the Raster . This applies only to destinations. |
|
|