public class GDXRenderer extends AnimationLoopRenderer implements com.badlogic.gdx.ApplicationListener, MediaLoader
framerate, scaling| Constructor and Description |
|---|
GDXRenderer(ScaleStrategy scaling,
int framerate) |
| Modifier and Type | Method and Description |
|---|---|
void |
create() |
void |
dispose() |
void |
drawBackground(ColorRGB backgroundColor) |
void |
drawImage(Image image,
int x,
int y,
Transform transform) |
void |
drawRect(Rect rect,
ColorRGB color,
Transform transform) |
protected InputDevice |
getInputDevice() |
MediaLoader |
getMediaLoader() |
protected Rect |
getScreenBounds() |
void |
initialize() |
Audio |
loadAudio(nl.colorize.util.ResourceFile source)
Loads an audio clip from a file.
|
Image |
loadImage(nl.colorize.util.ResourceFile source)
Loads an image from a file.
|
void |
pause() |
void |
render() |
void |
resize(int width,
int height) |
void |
resume() |
void |
setWindowIcon(nl.colorize.util.ResourceFile windowIcon) |
void |
setWindowTitle(java.lang.String windowTitle) |
protected boolean |
shouldSyncFrames()
If this method returns true, the renderer is responsible for keeping
frame updates synchronized with the targeted framerate.
|
void |
terminate() |
drawText, getCanvasHeight, getCanvasWidth, getFrameTime, getScaleStrategy, getStats, getTargetFramerate, performFrameUpdate, registerCallback, unregisterCallbackclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdrawSpritepublic GDXRenderer(ScaleStrategy scaling, int framerate)
public void initialize()
initialize in interface Rendererpublic void create()
create in interface com.badlogic.gdx.ApplicationListenerpublic void dispose()
dispose in interface com.badlogic.gdx.ApplicationListenerprotected boolean shouldSyncFrames()
AnimationLoopRendererIf this method returns false, the underlying platform is responsible for synchronizing frames, and in these cases the renderer will still adapt the number of frame updates versus the number of frame renders, but it will not sleep to slow down the animation loop.
shouldSyncFrames in class AnimationLoopRendererpublic void resize(int width,
int height)
resize in interface com.badlogic.gdx.ApplicationListenerpublic void pause()
pause in interface com.badlogic.gdx.ApplicationListenerpublic void resume()
resume in interface com.badlogic.gdx.ApplicationListenerpublic void render()
render in interface com.badlogic.gdx.ApplicationListenerpublic void drawBackground(ColorRGB backgroundColor)
drawBackground in interface RenderContextpublic void drawRect(Rect rect, ColorRGB color, Transform transform)
drawRect in interface RenderContextpublic void drawImage(Image image, int x, int y, Transform transform)
drawImage in interface RenderContextpublic MediaLoader getMediaLoader()
getMediaLoader in interface Rendererpublic Image loadImage(nl.colorize.util.ResourceFile source)
MediaLoaderloadImage in interface MediaLoaderpublic Audio loadAudio(nl.colorize.util.ResourceFile source)
MediaLoaderloadAudio in interface MediaLoaderprotected InputDevice getInputDevice()
getInputDevice in class AnimationLoopRendererprotected Rect getScreenBounds()
getScreenBounds in class AnimationLoopRendererpublic void setWindowTitle(java.lang.String windowTitle)
public void setWindowIcon(nl.colorize.util.ResourceFile windowIcon)