public class LibgdxGraphics
extends java.lang.Object
implements org.mini2Dx.core.Graphics
| Modifier and Type | Field and Description |
|---|---|
LibgdxSpriteBatchWrapper |
spriteBatch |
| Constructor and Description |
|---|
LibgdxGraphics(GameWrapper gameWrapper,
LibgdxSpriteBatchWrapper spriteBatch,
com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch polygonSpriteBatch,
com.badlogic.gdx.graphics.glutils.ShapeRenderer shapeRenderer) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearBlendFunction() |
void |
clearContext() |
void |
clearContext(org.mini2Dx.core.graphics.Color color) |
void |
clearContext(org.mini2Dx.core.graphics.Color color,
boolean depthBufferBit,
boolean colorBufferBit) |
void |
clearScaling() |
void |
clearShader() |
void |
disableBlending() |
void |
drawCircle(float centerX,
float centerY,
float radius) |
void |
drawCircle(float centerX,
float centerY,
int radius) |
void |
drawFontCache(org.mini2Dx.core.font.GameFontCache fontCache) |
void |
drawLineSegment(float x1,
float y1,
float x2,
float y2) |
void |
drawNinePatch(org.mini2Dx.core.graphics.NinePatch ninePatch,
float x,
float y,
float width,
float height) |
void |
drawParticleEffect(org.mini2Dx.core.graphics.ParticleEffect effect) |
void |
drawPolygon(float[] vertices) |
void |
drawRect(float x,
float y,
float width,
float height) |
void |
drawShape(org.mini2Dx.core.geom.Shape shape) |
void |
drawSprite(org.mini2Dx.core.graphics.Sprite sprite) |
void |
drawSprite(org.mini2Dx.core.graphics.Sprite sprite,
float x,
float y) |
void |
drawSpriteCache(org.mini2Dx.core.graphics.SpriteCache spriteCache,
int cacheId) |
void |
drawString(java.lang.String text,
float x,
float y) |
void |
drawString(java.lang.String text,
float x,
float y,
float targetWidth) |
void |
drawString(java.lang.String text,
float x,
float y,
float targetWidth,
int horizontalAlign) |
void |
drawTexture(org.mini2Dx.core.graphics.Texture texture,
float x,
float y) |
void |
drawTexture(org.mini2Dx.core.graphics.Texture texture,
float x,
float y,
boolean flipY) |
void |
drawTexture(org.mini2Dx.core.graphics.Texture texture,
float x,
float y,
float width,
float height) |
void |
drawTexture(org.mini2Dx.core.graphics.Texture texture,
float x,
float y,
float width,
float height,
boolean flipY) |
void |
drawTextureRegion(org.mini2Dx.core.graphics.TextureRegion textureRegion,
float x,
float y) |
void |
drawTextureRegion(org.mini2Dx.core.graphics.TextureRegion textureRegion,
float x,
float y,
float width,
float height) |
void |
drawTextureRegion(org.mini2Dx.core.graphics.TextureRegion textureRegion,
float x,
float y,
float width,
float height,
float rotation) |
void |
drawTilingDrawable(org.mini2Dx.core.graphics.TilingDrawable tilingDrawable,
float x,
float y,
float width,
float height) |
void |
drawTriangle(float x1,
float y1,
float x2,
float y2,
float x3,
float y3) |
void |
enableBlending() |
void |
fillCircle(float centerX,
float centerY,
float radius) |
void |
fillCircle(float centerX,
float centerY,
int radius) |
void |
fillPolygon(float[] vertices,
short[] triangles) |
void |
fillRect(float x,
float y,
float width,
float height) |
void |
fillShape(org.mini2Dx.core.geom.Shape shape) |
void |
fillTriangle(float x1,
float y1,
float x2,
float y2,
float x3,
float y3) |
void |
flush() |
org.mini2Dx.core.graphics.Color |
getBackgroundColor() |
org.mini2Dx.core.graphics.Color |
getColor() |
org.mini2Dx.core.font.GameFont |
getFont() |
long |
getFrameId() |
int |
getLineHeight() |
org.mini2Dx.core.graphics.TextureFilter |
getMagFilter() |
org.mini2Dx.core.graphics.TextureFilter |
getMinFilter() |
org.mini2Dx.gdx.math.Matrix4 |
getProjectionMatrix() |
float |
getRotation() |
float |
getRotationX() |
float |
getRotationY() |
float |
getScaleX() |
float |
getScaleY() |
org.mini2Dx.core.graphics.Shader |
getShader() |
org.mini2Dx.core.graphics.Color |
getTint() |
float |
getTranslationX() |
float |
getTranslationY() |
float |
getViewportHeight() |
float |
getViewportWidth() |
int |
getWindowHeight() |
int |
getWindowSafeHeight() |
int |
getWindowSafeWidth() |
int |
getWindowSafeX() |
int |
getWindowSafeY() |
int |
getWindowWidth() |
boolean |
isWindowReady() |
org.mini2Dx.core.geom.Rectangle |
peekClip() |
void |
peekClip(org.mini2Dx.core.geom.Rectangle rectangle) |
void |
postRender() |
void |
preRender(int gameWidth,
int gameHeight) |
org.mini2Dx.core.geom.Rectangle |
removeClip() |
void |
removeTint() |
void |
rotate(float degrees,
float x,
float y) |
void |
scale(float scaleX,
float scaleY) |
void |
setBackgroundColor(org.mini2Dx.core.graphics.Color backgroundColor) |
void |
setBlendFunction(org.mini2Dx.core.graphics.Mini2DxBlendFunction srcFunc,
org.mini2Dx.core.graphics.Mini2DxBlendFunction dstFunc) |
void |
setClip(float x,
float y,
float width,
float height) |
void |
setClip(org.mini2Dx.core.geom.Rectangle clip) |
void |
setColor(org.mini2Dx.core.graphics.Color color) |
void |
setFont(org.mini2Dx.core.font.GameFont font) |
void |
setLineHeight(int lineHeight) |
void |
setMagFilter(org.mini2Dx.core.graphics.TextureFilter filter) |
void |
setMinFilter(org.mini2Dx.core.graphics.TextureFilter filter) |
void |
setRotation(float degrees,
float x,
float y) |
void |
setScale(float scaleX,
float scaleY) |
void |
setShader(org.mini2Dx.core.graphics.Shader shader) |
void |
setTint(org.mini2Dx.core.graphics.Color tint) |
void |
setTranslation(float translateX,
float translateY) |
void |
translate(float translateX,
float translateY) |
public final LibgdxSpriteBatchWrapper spriteBatch
public LibgdxGraphics(GameWrapper gameWrapper, LibgdxSpriteBatchWrapper spriteBatch, com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch polygonSpriteBatch, com.badlogic.gdx.graphics.glutils.ShapeRenderer shapeRenderer)
public void preRender(int gameWidth,
int gameHeight)
preRender in interface org.mini2Dx.core.Graphicspublic void postRender()
postRender in interface org.mini2Dx.core.Graphicspublic void clearContext()
clearContext in interface org.mini2Dx.core.Graphicspublic void clearContext(org.mini2Dx.core.graphics.Color color)
clearContext in interface org.mini2Dx.core.Graphicspublic void clearContext(org.mini2Dx.core.graphics.Color color,
boolean depthBufferBit,
boolean colorBufferBit)
clearContext in interface org.mini2Dx.core.Graphicspublic void drawLineSegment(float x1,
float y1,
float x2,
float y2)
drawLineSegment in interface org.mini2Dx.core.Graphicspublic void drawRect(float x,
float y,
float width,
float height)
drawRect in interface org.mini2Dx.core.Graphicspublic void fillRect(float x,
float y,
float width,
float height)
fillRect in interface org.mini2Dx.core.Graphicspublic void drawCircle(float centerX,
float centerY,
int radius)
drawCircle in interface org.mini2Dx.core.Graphicspublic void drawCircle(float centerX,
float centerY,
float radius)
drawCircle in interface org.mini2Dx.core.Graphicspublic void fillCircle(float centerX,
float centerY,
int radius)
fillCircle in interface org.mini2Dx.core.Graphicspublic void fillCircle(float centerX,
float centerY,
float radius)
fillCircle in interface org.mini2Dx.core.Graphicspublic void drawTriangle(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
drawTriangle in interface org.mini2Dx.core.Graphicspublic void fillTriangle(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
fillTriangle in interface org.mini2Dx.core.Graphicspublic void drawPolygon(float[] vertices)
drawPolygon in interface org.mini2Dx.core.Graphicspublic void fillPolygon(float[] vertices,
short[] triangles)
fillPolygon in interface org.mini2Dx.core.Graphicspublic void drawString(java.lang.String text,
float x,
float y)
drawString in interface org.mini2Dx.core.Graphicspublic void drawString(java.lang.String text,
float x,
float y,
float targetWidth)
drawString in interface org.mini2Dx.core.Graphicspublic void drawString(java.lang.String text,
float x,
float y,
float targetWidth,
int horizontalAlign)
drawString in interface org.mini2Dx.core.Graphicspublic void drawTexture(org.mini2Dx.core.graphics.Texture texture,
float x,
float y)
drawTexture in interface org.mini2Dx.core.Graphicspublic void drawTexture(org.mini2Dx.core.graphics.Texture texture,
float x,
float y,
boolean flipY)
drawTexture in interface org.mini2Dx.core.Graphicspublic void drawTexture(org.mini2Dx.core.graphics.Texture texture,
float x,
float y,
float width,
float height)
drawTexture in interface org.mini2Dx.core.Graphicspublic void drawTexture(org.mini2Dx.core.graphics.Texture texture,
float x,
float y,
float width,
float height,
boolean flipY)
drawTexture in interface org.mini2Dx.core.Graphicspublic void drawTextureRegion(org.mini2Dx.core.graphics.TextureRegion textureRegion,
float x,
float y)
drawTextureRegion in interface org.mini2Dx.core.Graphicspublic void drawTextureRegion(org.mini2Dx.core.graphics.TextureRegion textureRegion,
float x,
float y,
float width,
float height)
drawTextureRegion in interface org.mini2Dx.core.Graphicspublic void drawTextureRegion(org.mini2Dx.core.graphics.TextureRegion textureRegion,
float x,
float y,
float width,
float height,
float rotation)
drawTextureRegion in interface org.mini2Dx.core.Graphicspublic void drawShape(org.mini2Dx.core.geom.Shape shape)
drawShape in interface org.mini2Dx.core.Graphicspublic void fillShape(org.mini2Dx.core.geom.Shape shape)
fillShape in interface org.mini2Dx.core.Graphicspublic void drawSprite(org.mini2Dx.core.graphics.Sprite sprite)
drawSprite in interface org.mini2Dx.core.Graphicspublic void drawSprite(org.mini2Dx.core.graphics.Sprite sprite,
float x,
float y)
drawSprite in interface org.mini2Dx.core.Graphicspublic void drawSpriteCache(org.mini2Dx.core.graphics.SpriteCache spriteCache,
int cacheId)
drawSpriteCache in interface org.mini2Dx.core.Graphicspublic void drawParticleEffect(org.mini2Dx.core.graphics.ParticleEffect effect)
drawParticleEffect in interface org.mini2Dx.core.Graphicspublic void drawNinePatch(org.mini2Dx.core.graphics.NinePatch ninePatch,
float x,
float y,
float width,
float height)
drawNinePatch in interface org.mini2Dx.core.Graphicspublic void drawTilingDrawable(org.mini2Dx.core.graphics.TilingDrawable tilingDrawable,
float x,
float y,
float width,
float height)
drawTilingDrawable in interface org.mini2Dx.core.Graphicspublic void drawFontCache(org.mini2Dx.core.font.GameFontCache fontCache)
drawFontCache in interface org.mini2Dx.core.Graphicspublic void setClip(float x,
float y,
float width,
float height)
setClip in interface org.mini2Dx.core.Graphicspublic void setClip(org.mini2Dx.core.geom.Rectangle clip)
setClip in interface org.mini2Dx.core.Graphicspublic org.mini2Dx.core.geom.Rectangle removeClip()
removeClip in interface org.mini2Dx.core.Graphicspublic org.mini2Dx.core.geom.Rectangle peekClip()
peekClip in interface org.mini2Dx.core.Graphicspublic void peekClip(org.mini2Dx.core.geom.Rectangle rectangle)
peekClip in interface org.mini2Dx.core.Graphicspublic void setTint(org.mini2Dx.core.graphics.Color tint)
setTint in interface org.mini2Dx.core.Graphicspublic void removeTint()
removeTint in interface org.mini2Dx.core.Graphicspublic void enableBlending()
enableBlending in interface org.mini2Dx.core.Graphicspublic void disableBlending()
disableBlending in interface org.mini2Dx.core.Graphicspublic void setShader(org.mini2Dx.core.graphics.Shader shader)
setShader in interface org.mini2Dx.core.Graphicspublic org.mini2Dx.core.graphics.Shader getShader()
getShader in interface org.mini2Dx.core.Graphicspublic void clearShader()
clearShader in interface org.mini2Dx.core.Graphicspublic void setBlendFunction(org.mini2Dx.core.graphics.Mini2DxBlendFunction srcFunc,
org.mini2Dx.core.graphics.Mini2DxBlendFunction dstFunc)
setBlendFunction in interface org.mini2Dx.core.Graphicspublic void clearBlendFunction()
clearBlendFunction in interface org.mini2Dx.core.Graphicspublic void flush()
flush in interface org.mini2Dx.core.Graphicspublic void setFont(org.mini2Dx.core.font.GameFont font)
setFont in interface org.mini2Dx.core.Graphicspublic void setLineHeight(int lineHeight)
setLineHeight in interface org.mini2Dx.core.Graphicspublic void setColor(org.mini2Dx.core.graphics.Color color)
setColor in interface org.mini2Dx.core.Graphicspublic void setBackgroundColor(org.mini2Dx.core.graphics.Color backgroundColor)
setBackgroundColor in interface org.mini2Dx.core.Graphicspublic void scale(float scaleX,
float scaleY)
scale in interface org.mini2Dx.core.Graphicspublic void setScale(float scaleX,
float scaleY)
setScale in interface org.mini2Dx.core.Graphicspublic void clearScaling()
clearScaling in interface org.mini2Dx.core.Graphicspublic void translate(float translateX,
float translateY)
translate in interface org.mini2Dx.core.Graphicspublic void setTranslation(float translateX,
float translateY)
setTranslation in interface org.mini2Dx.core.Graphicspublic void rotate(float degrees,
float x,
float y)
rotate in interface org.mini2Dx.core.Graphicspublic void setRotation(float degrees,
float x,
float y)
setRotation in interface org.mini2Dx.core.Graphicspublic org.mini2Dx.gdx.math.Matrix4 getProjectionMatrix()
getProjectionMatrix in interface org.mini2Dx.core.Graphicspublic boolean isWindowReady()
isWindowReady in interface org.mini2Dx.core.Graphicspublic int getWindowWidth()
getWindowWidth in interface org.mini2Dx.core.Graphicspublic int getWindowHeight()
getWindowHeight in interface org.mini2Dx.core.Graphicspublic float getViewportWidth()
getViewportWidth in interface org.mini2Dx.core.Graphicspublic float getViewportHeight()
getViewportHeight in interface org.mini2Dx.core.Graphicspublic int getWindowSafeX()
getWindowSafeX in interface org.mini2Dx.core.Graphicspublic int getWindowSafeY()
getWindowSafeY in interface org.mini2Dx.core.Graphicspublic int getWindowSafeWidth()
getWindowSafeWidth in interface org.mini2Dx.core.Graphicspublic int getWindowSafeHeight()
getWindowSafeHeight in interface org.mini2Dx.core.Graphicspublic long getFrameId()
getFrameId in interface org.mini2Dx.core.Graphicspublic org.mini2Dx.core.graphics.TextureFilter getMinFilter()
getMinFilter in interface org.mini2Dx.core.Graphicspublic void setMinFilter(org.mini2Dx.core.graphics.TextureFilter filter)
setMinFilter in interface org.mini2Dx.core.Graphicspublic org.mini2Dx.core.graphics.TextureFilter getMagFilter()
getMagFilter in interface org.mini2Dx.core.Graphicspublic void setMagFilter(org.mini2Dx.core.graphics.TextureFilter filter)
setMagFilter in interface org.mini2Dx.core.Graphicspublic float getRotation()
getRotation in interface org.mini2Dx.core.Graphicspublic float getRotationX()
getRotationX in interface org.mini2Dx.core.Graphicspublic float getRotationY()
getRotationY in interface org.mini2Dx.core.Graphicspublic float getTranslationX()
getTranslationX in interface org.mini2Dx.core.Graphicspublic float getTranslationY()
getTranslationY in interface org.mini2Dx.core.Graphicspublic float getScaleX()
getScaleX in interface org.mini2Dx.core.Graphicspublic float getScaleY()
getScaleY in interface org.mini2Dx.core.Graphicspublic org.mini2Dx.core.graphics.Color getTint()
getTint in interface org.mini2Dx.core.Graphicspublic org.mini2Dx.core.graphics.Color getBackgroundColor()
getBackgroundColor in interface org.mini2Dx.core.Graphicspublic org.mini2Dx.core.graphics.Color getColor()
getColor in interface org.mini2Dx.core.Graphicspublic int getLineHeight()
getLineHeight in interface org.mini2Dx.core.Graphicspublic org.mini2Dx.core.font.GameFont getFont()
getFont in interface org.mini2Dx.core.Graphics