Class PixmapRegion

java.lang.Object
arc.graphics.g2d.PixmapRegion

public class PixmapRegion extends Object
Defines a region of a pixmap, like a TextureRegion.
  • Field Details

    • pixmap

      public Pixmap pixmap
    • x

      public int x
    • y

      public int y
    • width

      public int width
    • height

      public int height
  • Constructor Details

    • PixmapRegion

      public PixmapRegion(Pixmap pixmap, int x, int y, int width, int height)
    • PixmapRegion

      public PixmapRegion(Pixmap pixmap)
  • Method Details

    • get

      public int get(int x, int y)
      Returns:
      the RGBA value at a region position.
    • getRaw

      public int getRaw(int x, int y)
      Returns:
      the RGBA value at a region position without bounds checks.
    • getA

      public int getA(int x, int y)
      Returns:
      the alpha value at a region position, 0 - 255.
    • get

      public int get(int x, int y, Color color)
    • set

      public PixmapRegion set(Pixmap pixmap)
    • set

      public PixmapRegion set(Pixmap pixmap, int x, int y, int width, int height)
    • crop

      public Pixmap crop()
      Allocates a new pixmap based on this region data.
    • crop

      public Pixmap crop(int x, int y, int width, int height)
      Allocates a new pixmap with specific offsets.