Interface ITexture
- All Superinterfaces:
IDestroyable
,IMaskerable
- All Known Implementing Classes:
AngelCodeFont.CharDefTexture
,CharacterSmartTexture
,ItemSmartTexture
,SmartTexture
,Texture
,VideoTexture
-
Method Summary
Modifier and TypeMethodDescriptionvoid
bind()
bind the current texture in the VRAMvoid
bind
(int unit) bind the current texture object in the specified texture unitgetData()
returns the texture's pixel in a ByteBuffer EXAMPLE:int
returns the height of imageint
return the height hardware of imageint
getID()
returns the ID of image in the Vramint
getWidth()
returns the width of imageint
return the width Hardware of imagefloat
getXEnd()
returns the end X-coordinatefloat
returns the start X-coordinatefloat
getYEnd()
returns the end Y-coordinatefloat
returns the start Y-coordinateboolean
isSolid()
indicates if the texture is solid or not.void
makeTransp
(int red, int green, int blue) sets transparent each pixel that it's equal to the red, green blue value specifiedvoid
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 specifiedvoid
setData
(ByteBuffer data) sets the texture's pixel from a ByteBuffer EXAMPLE:void
Pixel collision mask of texturevoid
setRegion
(int x, int y, int width, int height) sets the region of the imageMethods inherited from interface zombie.interfaces.IDestroyable
destroy, isDestroyed
Methods 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
-