Package com.badlogic.gdx
Class AbstractGraphics
- java.lang.Object
-
- com.badlogic.gdx.AbstractGraphics
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.badlogic.gdx.Graphics
Graphics.BufferFormat, Graphics.DisplayMode, Graphics.GraphicsType, Graphics.Monitor
-
-
Constructor Summary
Constructors Constructor Description AbstractGraphics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getBackBufferScale()
float
getDensity()
This is a scaling factor for the Density Independent Pixel unit, following the same conventions as android.util.DisplayMetrics#density, where one DIP is one pixel on an approximately 160 dpi screen.float
getRawDeltaTime()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.badlogic.gdx.Graphics
getBackBufferHeight, getBackBufferWidth, getBufferFormat, getDeltaTime, getDisplayMode, getDisplayMode, getDisplayModes, getDisplayModes, getFrameId, getFramesPerSecond, getGL20, getGL30, getGL31, getGL32, getGLVersion, getHeight, getMonitor, getMonitors, getPpcX, getPpcY, getPpiX, getPpiY, getPrimaryMonitor, getSafeInsetBottom, getSafeInsetLeft, getSafeInsetRight, getSafeInsetTop, getType, getWidth, isContinuousRendering, isFullscreen, isGL30Available, isGL31Available, isGL32Available, newCursor, requestRendering, setContinuousRendering, setCursor, setForegroundFPS, setFullscreenMode, setGL20, setGL30, setGL31, setGL32, setResizable, setSystemCursor, setTitle, setUndecorated, setVSync, setWindowedMode, supportsDisplayModeChange, supportsExtension
-
-
-
-
Method Detail
-
getRawDeltaTime
public float getRawDeltaTime()
- Specified by:
getRawDeltaTime
in interfaceGraphics
- Returns:
- the time span between the current frame and the last frame in seconds, without smoothing
-
getDensity
public float getDensity()
Description copied from interface:Graphics
This is a scaling factor for the Density Independent Pixel unit, following the same conventions as android.util.DisplayMetrics#density, where one DIP is one pixel on an approximately 160 dpi screen. Thus on a 160dpi screen this density value will be 1; on a 120 dpi screen it would be .75; etc. If the density could not be determined, this returns a default value of 1. Depending on the underlying platform implementation this might be a relatively expensive operation. Therefore it should not be called continously on each frame.- Specified by:
getDensity
in interfaceGraphics
- Returns:
- the Density Independent Pixel factor of the display.
-
getBackBufferScale
public float getBackBufferScale()
- Specified by:
getBackBufferScale
in interfaceGraphics
- Returns:
- amount of pixels per logical pixel (point)
-
-