Package com.fs.starfarer.api.graphics
Interface SpriteAPI
public interface SpriteAPI
-
Method Summary
Modifier and TypeMethodDescriptionvoid
float
float
getAngle()
int
int
float
float
getColor()
float
float
Fraction of the OpenGL texture's height taken up by the image.int
float
Fraction of the OpenGL texture's width taken up by the image.float
getWidth()
void
render
(float x, float y) void
renderAtCenter
(float x, float y) void
renderAtCenterNoBind
(float x, float y) void
renderNoBind
(float x, float y) void
renderRegion
(float x, float y, float tx, float ty, float tw, float th) void
renderRegionAtCenter
(float x, float y, float tx, float ty, float tw, float th) void
renderWithCorners
(float blX, float blY, float tlX, float tlY, float trX, float trY, float brX, float brY) void
void
setAlphaMult
(float alphaMult) void
setAngle
(float angle) void
setBlendFunc
(int src, int dest) void
setCenter
(float x, float y) void
setCenterX
(float cx) void
setCenterY
(float cy) void
void
setHeight
(float height) void
void
setSize
(float width, float height) void
setTexHeight
(float texHeight) void
setTexWidth
(float texWidth) void
setTexX
(float texX) void
setTexY
(float texY) void
setWidth
(float width)
-
Method Details
-
setBlendFunc
void setBlendFunc(int src, int dest) -
setNormalBlend
void setNormalBlend() -
setAdditiveBlend
void setAdditiveBlend() -
setCenter
void setCenter(float x, float y) -
setSize
void setSize(float width, float height) -
getAngle
float getAngle() -
setAngle
void setAngle(float angle) -
getColor
Color getColor() -
setColor
-
setHeight
void setHeight(float height) -
setWidth
void setWidth(float width) -
getHeight
float getHeight() -
getWidth
float getWidth() -
bindTexture
void bindTexture() -
getTextureId
int getTextureId() -
renderAtCenter
void renderAtCenter(float x, float y) -
render
void render(float x, float y) -
renderRegionAtCenter
void renderRegionAtCenter(float x, float y, float tx, float ty, float tw, float th) -
renderRegion
void renderRegion(float x, float y, float tx, float ty, float tw, float th) -
getCenterX
float getCenterX() -
getCenterY
float getCenterY() -
getAlphaMult
float getAlphaMult() -
setAlphaMult
void setAlphaMult(float alphaMult) -
getTextureWidth
float getTextureWidth()Fraction of the OpenGL texture's width taken up by the image. OpenGL textures have width and height that are powers of 2, the image may not.- Returns:
-
getTextureHeight
float getTextureHeight()Fraction of the OpenGL texture's height taken up by the image. OpenGL textures have width and height that are powers of 2, the image may not.- Returns:
-
setCenterY
void setCenterY(float cy) -
setCenterX
void setCenterX(float cx) -
getAverageColor
Color getAverageColor() -
setTexX
void setTexX(float texX) -
setTexY
void setTexY(float texY) -
setTexWidth
void setTexWidth(float texWidth) -
setTexHeight
void setTexHeight(float texHeight) -
renderWithCorners
void renderWithCorners(float blX, float blY, float tlX, float tlY, float trX, float trY, float brX, float brY) -
getAverageBrightColor
Color getAverageBrightColor() -
renderNoBind
void renderNoBind(float x, float y) -
renderAtCenterNoBind
void renderAtCenterNoBind(float x, float y) -
getBlendDest
int getBlendDest() -
getBlendSrc
int getBlendSrc()
-