public static class PixelRectangle.GenericPixelRect extends Object implements PixelRectangle
PixelRectangle.GenericPixelRect
Constructor and Description |
---|
PixelRectangle.GenericPixelRect(PixelFormat pixelformat,
DimensionImmutable size,
int strideInBytes,
boolean isGLOriented,
ByteBuffer pixels) |
PixelRectangle.GenericPixelRect(PixelRectangle src)
Copy ctor validating src.
|
Modifier and Type | Method and Description |
---|---|
PixelFormat |
getPixelformat()
Returns the
PixelFormat . |
ByteBuffer |
getPixels()
Returns the pixels.
|
DimensionImmutable |
getSize()
Returns the size, i.e.
|
int |
getStride()
Returns stride in byte-size, i.e.
|
int |
hashCode()
Computes a hash code over:
pixelformat
size
stride
isGLOriented
pixels
|
boolean |
isGLOriented()
Returns
true if the memory is laid out in
OpenGL's coordinate system, origin at bottom left. |
String |
toString() |
public PixelRectangle.GenericPixelRect(PixelFormat pixelformat, DimensionImmutable size, int strideInBytes, boolean isGLOriented, ByteBuffer pixels) throws IllegalArgumentException, IndexOutOfBoundsException
pixelformat
- size
- strideInBytes
- stride in byte-size, i.e. byte count from one line to the next.
If not zero, value must be >= width * bytes-per-pixel
.
If zero, stride is set to width * bytes-per-pixel
.isGLOriented
- pixels
- IllegalArgumentException
- if strideInBytes
is invalid.IndexOutOfBoundsException
- if pixels
has insufficient bytes leftpublic PixelRectangle.GenericPixelRect(PixelRectangle src) throws IllegalArgumentException, IndexOutOfBoundsException
src
- IllegalArgumentException
- if strideInBytes
is invalid.IndexOutOfBoundsException
- if pixels
has insufficient bytes leftpublic int hashCode()
PixelRectangle
Computes a hash code over:
The hashCode shall be computed only once with first call and stored for later retrieval to enhance performance.
hashCode
in interface PixelRectangle
hashCode
in class Object
public PixelFormat getPixelformat()
PixelRectangle
PixelFormat
.getPixelformat
in interface PixelRectangle
public DimensionImmutable getSize()
PixelRectangle
getSize
in interface PixelRectangle
public int getStride()
PixelRectangle
Must be >= PixelRectangle.getPixelformat()
.bytesPerPixel()
* PixelRectangle.getSize()
.getWidth()
.
getStride
in interface PixelRectangle
public boolean isGLOriented()
PixelRectangle
true
if the memory is laid out in
OpenGL's coordinate system, origin at bottom left.
Otherwise returns false
, i.e. origin at top left.isGLOriented
in interface PixelRectangle
public ByteBuffer getPixels()
PixelRectangle
getPixels
in interface PixelRectangle
public final String toString()
toString
in interface PixelRectangle
toString
in class Object
Copyright 2010 JogAmp Community.