Class GDXImage
java.lang.Object
nl.colorize.multimedialib.renderer.libgdx.GDXImage
- All Implemented Interfaces:
Image
Refers to a texture that is managed by libGDX. Each texture also keeps track
of all regions that have been defined within it.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionextractRegion
(Region subRegion) Returns a newImage
instance that is based on the same source image, but only contains the specified rectangular region within the source image.int
getAlpha
(int x, int y) Returns the alpha of a pixel within the image.getColor
(int x, int y) Returns the RGB color value of a pixel within the image.com.badlogic.gdx.graphics.Texture
com.badlogic.gdx.graphics.Pixmap
com.badlogic.gdx.graphics.g2d.TextureRegion
-
Constructor Details
-
GDXImage
-
GDXImage
public GDXImage(com.badlogic.gdx.graphics.Texture texture)
-
-
Method Details
-
extractRegion
Description copied from interface:Image
Returns a newImage
instance that is based on the same source image, but only contains the specified rectangular region within the source image. If thisImage
is itself a region, the coordinates in theregion
parameter will be interpreted relative to this image's region.- Specified by:
extractRegion
in interfaceImage
-
getColor
Description copied from interface:Image
Returns the RGB color value of a pixel within the image. This does not include the pixel's alpha value even if the image does support transparency. The returned color does not include an alpha channel. The alpha value of transparent or translucent pixels in the image can be obtained usingImage.getAlpha(int, int)
. -
getAlpha
public int getAlpha(int x, int y) Description copied from interface:Image
Returns the alpha of a pixel within the image. The returned value is between 0 (fully transparent) and 100 (fully opaque). -
getTexture
public com.badlogic.gdx.graphics.Texture getTexture() -
getTextureRegion
public com.badlogic.gdx.graphics.g2d.TextureRegion getTextureRegion() -
getTextureData
public com.badlogic.gdx.graphics.Pixmap getTextureData() -
getRegion
-