Interface ITexture
- All Superinterfaces:
 IDestroyable,IMaskerable
- All Known Implementing Classes:
 AngelCodeFont.CharDefTexture,CharacterSmartTexture,ItemSmartTexture,SmartTexture,Texture,VideoTexture
- 
Method Summary
Modifier and TypeMethodDescriptionvoidbind()bind the current texture in the VRAMvoidbind(int unit) bind the current texture object in the specified texture unitgetData()returns the texture's pixel in a ByteBuffer EXAMPLE:intreturns the height of imageintreturn the height hardware of imageintgetID()returns the ID of image in the VramintgetWidth()returns the width of imageintreturn the width Hardware of imagefloatgetXEnd()returns the end X-coordinatefloatreturns the start X-coordinatefloatgetYEnd()returns the end Y-coordinatefloatreturns the start Y-coordinatebooleanisSolid()indicates if the texture is solid or not.voidmakeTransp(int red, int green, int blue) sets transparent each pixel that it's equal to the red, green blue value specifiedvoidsetAlphaForeach(int red, int green, int blue, int alpha) sets the specified alpha for each pixel that it's equal to the red, green blue value specifiedvoidsetData(ByteBuffer data) sets the texture's pixel from a ByteBuffer EXAMPLE:voidPixel collision mask of texturevoidsetRegion(int x, int y, int width, int height) sets the region of the imageMethods inherited from interface zombie.interfaces.IDestroyable
destroy, isDestroyedMethods inherited from interface zombie.interfaces.IMaskerable
getMask 
- 
Method Details
- 
bind
void bind()bind the current texture in the VRAM - 
bind
void bind(int unit) bind the current texture object in the specified texture unit- Parameters:
 unit- the texture unit in witch the current TextureObject will be binded
 - 
getData
WrappedBuffer getData()returns the texture's pixel in a ByteBuffer EXAMPLE: - 
getHeight
int getHeight()returns the height of image- Returns:
 - the height of image
 
 - 
getHeightHW
int getHeightHW()return the height hardware of image - 
getID
int getID()returns the ID of image in the Vram- Returns:
 - the ID of image in the Vram
 
 - 
getWidth
int getWidth()returns the width of image- Returns:
 - the width of image
 
 - 
getWidthHW
int getWidthHW()return the width Hardware of image - 
getXEnd
float getXEnd()returns the end X-coordinate- Returns:
 - the end X-coordinate
 
 - 
getXStart
float getXStart()returns the start X-coordinate- Returns:
 - the start X-coordinate
 
 - 
getYEnd
float getYEnd()returns the end Y-coordinate- Returns:
 - the end Y-coordinate
 
 - 
getYStart
float getYStart()returns the start Y-coordinate- Returns:
 - the start Y-coordinate
 
 - 
isSolid
boolean isSolid()indicates if the texture is solid or not.- Returns:
 - if the texture is solid or not.
 
 - 
makeTransp
void makeTransp(int red, int green, int blue) sets transparent each pixel that it's equal to the red, green blue value specified- Parameters:
 red- color used in the testgreen- color used in the testblue- color used in the test
 - 
setAlphaForeach
void setAlphaForeach(int red, int green, int blue, int alpha) sets the specified alpha for each pixel that it's equal to the red, green blue value specified- Parameters:
 red- color used in the testgreen- color used in the testblue- color used in the testalpha- the alpha color that will be setted to the pixel that pass the test
 - 
setData
sets the texture's pixel from a ByteBuffer EXAMPLE:- Parameters:
 data- texture's pixel data
 - 
setMask
Pixel collision mask of texture - 
setRegion
void setRegion(int x, int y, int width, int height) sets the region of the image- Parameters:
 x- xstart positiony- ystart positionwidth- width of the regionheight- height of the region
 
 -