Package playn.core

Class ImageImpl

All Implemented Interfaces:
AutoCloseable, Canvas.Drawable, Closeable

public abstract class ImageImpl extends Image
An implementation detail. Not part of the public API.
  • Method Details

    • succeed

      public void succeed(ImageImpl.Data data)
      Notifies this image that its implementation bitmap is available. This can be called from any thread.
    • fail

      public void fail(Throwable error)
      Notifies this image that its implementation bitmap failed to load. This can be called from any thread.
    • scale

      public Scale scale()
      Description copied from class: Image
      Returns the scale of resolution independent pixels to actual pixels for this image. This will be Scale.ONE unless HiDPI images are being used.
      Specified by:
      scale in class Image
    • pixelWidth

      public int pixelWidth()
      Description copied from class: Image
      Returns the width of this image in physical pixels. If this image is loaded asynchrously, this will return 0 until loading is complete. See Image.state.
      Specified by:
      pixelWidth in class Image
    • pixelHeight

      public int pixelHeight()
      Description copied from class: Image
      Returns the height of this image in physical pixels. If this image is loaded asynchrously, this will return 0 until loading is complete. See Image.state.
      Specified by:
      pixelHeight in class Image