|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.image.DataBuffer
com.jogamp.nativewindow.awt.DirectDataBufferInt
public final class DirectDataBufferInt
DataBuffer specialization using NIO direct buffer of type DataBuffer.TYPE_INT as storage.
| Nested Class Summary | |
|---|---|
static class |
DirectDataBufferInt.BufferedImageInt
|
static class |
DirectDataBufferInt.DirectWritableRaster
|
| Field Summary |
|---|
| Fields inherited from class java.awt.image.DataBuffer |
|---|
TYPE_BYTE, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_SHORT, TYPE_UNDEFINED, TYPE_USHORT |
| Constructor Summary | |
|---|---|
DirectDataBufferInt(int size)
Constructs an nio integer-based DataBuffer with a single bank
and the specified size. |
|
DirectDataBufferInt(IntBuffer dataArray,
int size)
Constructs an nio integer-based DataBuffer with a single bank using the
specified array. |
|
DirectDataBufferInt(int size,
int numBanks)
Constructs an nio integer-based DataBuffer with the specified number of
banks, all of which are the specified size. |
|
| Method Summary | |
|---|---|
static DirectDataBufferInt.BufferedImageInt |
createBufferedImage(int width,
int height,
int imageType,
Point location,
Hashtable<?,?> properties)
Creates a DirectDataBufferInt.BufferedImageInt using a direct color model in sRGB color space.It uses a DirectDataBufferInt.DirectWritableRaster utilizing DirectDataBufferInt storage. |
IntBuffer |
getData()
Returns the default (first) int data array in DataBuffer. |
IntBuffer |
getData(int bank)
Returns the data array for the specified bank. |
int |
getElem(int i)
Returns the requested data array element from the first (default) bank. |
int |
getElem(int bank,
int i)
Returns the requested data array element from the specified bank. |
void |
setElem(int i,
int val)
Sets the requested data array element in the first (default) bank to the specified value. |
void |
setElem(int bank,
int i,
int val)
Sets the requested data array element in the specified bank to the integer value i. |
| Methods inherited from class java.awt.image.DataBuffer |
|---|
getDataType, getDataTypeSize, getElemDouble, getElemDouble, getElemFloat, getElemFloat, getNumBanks, getOffset, getOffsets, getSize, setElemDouble, setElemDouble, setElemFloat, setElemFloat |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DirectDataBufferInt(int size)
DataBuffer with a single bank
and the specified size.
size - The size of the DataBuffer.
public DirectDataBufferInt(int size,
int numBanks)
DataBuffer with the specified number of
banks, all of which are the specified size.
size - The size of the banks in the DataBuffer.numBanks - The number of banks in the aDataBuffer.
public DirectDataBufferInt(IntBuffer dataArray,
int size)
DataBuffer with a single bank using the
specified array.
Only the first size elements should be used by accessors of
this DataBuffer. dataArray must be large enough to
hold size elements.
dataArray - The integer array for the DataBuffer.size - The size of the DataBuffer bank.| Method Detail |
|---|
public static DirectDataBufferInt.BufferedImageInt createBufferedImage(int width,
int height,
int imageType,
Point location,
Hashtable<?,?> properties)
DirectDataBufferInt.BufferedImageInt using a direct color model in sRGB color space.DirectDataBufferInt.DirectWritableRaster utilizing DirectDataBufferInt storage.
Note that due to using the custom storage type DirectDataBufferInt, the resulting
BufferedImage's image-type is of TYPE_CUSTOM.
We are not able to change this detail, since the AWT image implementation associates the image-type
with a build-in storage-type.
Use DirectDataBufferInt.BufferedImageInt.getCustomType() to retrieve the custom image-type, which will return the imageType
value passed here.
width - height - imageType - one of TYPE_INT_ARGB, TYPE_INT_ARGB_PRE,
TYPE_INT_RGB or TYPE_INT_BGR.location - origin, if null 0/0 is assumed.properties - Hashtable of
String/Object pairs. Used for BufferedImage.getProperty(String) etc.
public IntBuffer getData()
DataBuffer.
public IntBuffer getData(int bank)
bank - The bank whose data array you want to get.
public int getElem(int i)
getElem in class DataBufferi - The data array element you want to get.
setElem(int, int),
setElem(int, int, int)
public int getElem(int bank,
int i)
getElem in class DataBufferbank - The bank from which you want to get a data array element.i - The data array element you want to get.
setElem(int, int),
setElem(int, int, int)
public void setElem(int i,
int val)
setElem in class DataBufferi - The data array element you want to set.val - The integer value to which you want to set the data array element.getElem(int),
getElem(int, int)
public void setElem(int bank,
int i,
int val)
i.
setElem in class DataBufferbank - The bank in which you want to set the data array element.i - The data array element you want to set.val - The integer value to which you want to set the specified data array element.getElem(int),
getElem(int, int)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||