public class TextureContentFile extends TextureContentImage
TextureContent.ContentFormat
DEFAULT_USE_POWER_OF_TWO
Constructor and Description |
---|
TextureContentFile(java.lang.String filename) |
Modifier and Type | Method and Description |
---|---|
TextureContentFile |
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")
|
java.io.File |
getFile() |
java.lang.String |
getFileName() |
int |
getHeight()
Number of pixels across height in content
|
java.lang.Object |
getKey()
Uses the filename as a key so that multiple textures referring to the same file
|
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 |
setFileName(java.lang.String filename) |
getFormat, getImage, markClean
acquireAndCount, getReferenceCount, release, releaseAndCount
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
acquireAndCount, getReferenceCount, release, releaseAndCount
public void setFileName(java.lang.String filename)
public java.lang.String getFileName()
public java.io.File getFile()
public void getData(java.nio.ByteBuffer buff)
TextureContent
getData
in interface TextureContent
getData
in class TextureContentImage
public void getData(Rectangle region, java.nio.ByteBuffer buff)
TextureContent
getData
in interface TextureContent
getData
in class TextureContentImage
region
- rectangular region to acquire data forbuff
- buffer to fillpublic Rectangle getDirty()
TextureContent
getDirty
in interface TextureContent
getDirty
in class TextureContentImage
public boolean isDirty()
TextureContent
isDirty
in interface TextureContent
isDirty
in class TextureContentImage
public java.lang.Object getKey()
getKey
in interface TextureContent
getKey
in class TextureContentImage
public int getHeight()
TextureContent
getHeight
in interface TextureContent
getHeight
in class TextureContentImage
public int getWidth()
TextureContent
getWidth
in interface TextureContent
getWidth
in class TextureContentImage
public int getPixelSize()
TextureContent
getPixelSize
in interface TextureContent
getPixelSize
in class TextureContentImage
public TextureContentFile acquire()
ReferenceCounted
acquire
in interface TextureContent
acquire
in interface ReferenceCounted
acquire
in class TextureContentImage