Package arc.graphics.g2d
Class PixmapRegion
java.lang.Object
arc.graphics.g2d.PixmapRegion
Defines a region of a pixmap, like a TextureRegion.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPixmapRegion
(Pixmap pixmap) PixmapRegion
(Pixmap pixmap, int x, int y, int width, int height) -
Method Summary
-
Field Details
-
pixmap
-
x
public int x -
y
public int y -
width
public int width -
height
public int height
-
-
Constructor Details
-
PixmapRegion
-
PixmapRegion
-
-
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
-
set
-
set
-
crop
Allocates a new pixmap based on this region data. -
crop
Allocates a new pixmap with specific offsets.
-