Class AbstractGraphics

  • All Implemented Interfaces:
    Graphics

    public abstract class AbstractGraphics
    extends java.lang.Object
    implements Graphics
    • Constructor Detail

      • AbstractGraphics

        public AbstractGraphics()
    • Method Detail

      • getRawDeltaTime

        public float getRawDeltaTime()
        Specified by:
        getRawDeltaTime in interface Graphics
        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 interface Graphics
        Returns:
        the Density Independent Pixel factor of the display.
      • getBackBufferScale

        public float getBackBufferScale()
        Specified by:
        getBackBufferScale in interface Graphics
        Returns:
        amount of pixels per logical pixel (point)