Package playn.robovm

Class RoboImage

All Implemented Interfaces:
AutoCloseable, Canvas.Drawable, Closeable
Direct Known Subclasses:
RoboCanvasImage

public class RoboImage extends ImageImpl
  • Constructor Details

    • RoboImage

      public RoboImage(Graphics gfx, Scale scale, org.robovm.apple.coregraphics.CGImage img, String source)
    • RoboImage

      public RoboImage(RoboPlatform plat, boolean async, int preWidth, int preHeight, String source)
  • Method Details

    • cgImage

      public org.robovm.apple.coregraphics.CGImage cgImage()
      Returns the CGImage that underlies this image. This is public so that games that need to write custom backend code to do special stuff can access it. No promises are made, caveat coder. Note: it's not initialized immediately for async loaded images.
    • toUIImage

      public org.robovm.apple.uikit.UIImage toUIImage()
      Creates a UIImage based on our underlying image data. This is useful when you need to pass PlayN images to iOS APIs.
    • createPattern

      public Pattern createPattern(boolean repeatX, boolean repeatY)
      Specified by:
      createPattern in class Image
    • getRgb

      public void getRgb(int startX, int startY, int width, int height, int[] rgbArray, int offset, int scanSize)
      Specified by:
      getRgb in class Image
    • setRgb

      public void setRgb(int startX, int startY, int width, int height, int[] rgbArray, int offset, int scanSize)
      Specified by:
      setRgb in class Image
    • transform

      public Image transform(Image.BitmapTransformer xform)
      Specified by:
      transform in class Image
    • draw

      public void draw(Object ctx, float x, float y, float width, float height)
    • draw

      public void draw(Object ctx, float dx, float dy, float dw, float dh, float sx, float sy, float sw, float sh)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • dispose

      public void dispose()