public class TextureContentImage extends ReferenceCountedBase implements TextureContent
TextureContent.ContentFormat| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_USE_POWER_OF_TWO |
| Constructor and Description |
|---|
TextureContentImage() |
TextureContentImage(java.awt.image.BufferedImage image) |
TextureContentImage(java.awt.image.BufferedImage image,
boolean powerOfTwo) |
| Modifier and Type | Method and Description |
|---|---|
TextureContentImage |
acquire()
Signal the resource that something is holding a reference to it.
|
void |
getData(java.nio.ByteBuffer buff)
Get raw byte data of content, rasterized in
row-major form, with (0,0) in the bottom-left
corner.
|
void |
getData(Rectangle region,
java.nio.ByteBuffer buff)
Get raw byte data for a region, rasterized in row-major
form with (0,0) in the bottom-left corner.
|
Rectangle |
getDirty()
The portion of the texture that has been modified (marked "dirty")
|
TextureContent.ContentFormat |
getFormat()
Format of data returned by
TextureContent.getData(java.nio.ByteBuffer) |
int |
getHeight()
Number of pixels across height in content
|
java.awt.image.BufferedImage |
getImage() |
java.lang.Object |
getKey()
A key for referring to this texture.
|
int |
getPixelSize()
Size of pixels in bytes
|
int |
getWidth()
Number of pixels across width in content
|
boolean |
isDirty()
All or part of the texture has been marked as "dirty" (i.e.
|
void |
markClean()
Mark the entire texture as being clean
|
acquireAndCount, getReferenceCount, release, releaseAndCountequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacquireAndCount, getReferenceCount, release, releaseAndCountpublic TextureContentImage()
public TextureContentImage(java.awt.image.BufferedImage image)
public TextureContentImage(java.awt.image.BufferedImage image,
boolean powerOfTwo)
public int getWidth()
TextureContentgetWidth in interface TextureContentpublic int getHeight()
TextureContentgetHeight in interface TextureContentpublic int getPixelSize()
TextureContentgetPixelSize in interface TextureContentpublic java.awt.image.BufferedImage getImage()
public void getData(java.nio.ByteBuffer buff)
TextureContentgetData in interface TextureContentpublic void getData(Rectangle region, java.nio.ByteBuffer buff)
TextureContentgetData in interface TextureContentregion - rectangular region to acquire data forbuff - buffer to fillpublic TextureContent.ContentFormat getFormat()
TextureContentTextureContent.getData(java.nio.ByteBuffer)getFormat in interface TextureContentTextureContent.getData(java.nio.ByteBuffer)public TextureContentImage acquire()
ReferenceCountedacquire in interface TextureContentacquire in interface ReferenceCountedacquire in class ReferenceCountedBasepublic boolean isDirty()
TextureContentisDirty in interface TextureContentpublic Rectangle getDirty()
TextureContentgetDirty in interface TextureContentpublic void markClean()
TextureContentmarkClean in interface TextureContentpublic java.lang.Object getKey()
TextureContentgetKey in interface TextureContent