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()
PixelRectangleComputes 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 PixelRectanglehashCode in class Objectpublic PixelFormat getPixelformat()
PixelRectanglePixelFormat.getPixelformat in interface PixelRectanglepublic DimensionImmutable getSize()
PixelRectanglegetSize in interface PixelRectanglepublic int getStride()
PixelRectangle
Must be >= PixelRectangle.getPixelformat().bytesPerPixel() * PixelRectangle.getSize().getWidth().
getStride in interface PixelRectanglepublic boolean isGLOriented()
PixelRectangletrue 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 PixelRectanglepublic ByteBuffer getPixels()
PixelRectanglegetPixels in interface PixelRectanglepublic final String toString()
toString in interface PixelRectangletoString in class ObjectCopyright 2010 JogAmp Community.