Uses of Class
com.badlogic.gdx.graphics.g2d.TextureRegion
-
-
Uses of TextureRegion in com.badlogic.gdx.graphics.g2d
Subclasses of TextureRegion in com.badlogic.gdx.graphics.g2d Modifier and Type Class Description static class
ParticleEmitter.Particle
class
Sprite
Holds the geometry, color, and texture information for drawing 2D sprites usingBatch
.static class
TextureAtlas.AtlasRegion
Describes the region of a packed image and provides information about the original image before it was packed.static class
TextureAtlas.AtlasSprite
A sprite that, if whitespace was stripped from the region when it was packed, is automatically positioned as if whitespace had not been stripped.Methods in com.badlogic.gdx.graphics.g2d that return TextureRegion Modifier and Type Method Description TextureRegion
BitmapFont. getRegion()
Returns the first texture region.TextureRegion
BitmapFont. getRegion(int index)
Returns the texture page at the given index.TextureRegion
PolygonRegion. getRegion()
TextureRegion[][]
TextureRegion. split(int tileWidth, int tileHeight)
Helper method to create tiles out of this TextureRegion starting from the top left corner going to the right and ending at the bottom right corner.static TextureRegion[][]
TextureRegion. split(Texture texture, int tileWidth, int tileHeight)
Helper method to create tiles out of the givenTexture
starting from the top left corner going to the right and ending at the bottom right corner.Methods in com.badlogic.gdx.graphics.g2d that return types with arguments of type TextureRegion Modifier and Type Method Description Array<TextureRegion>
BitmapFont. getRegions()
Returns the array of TextureRegions that represents each texture page of glyphs.Methods in com.badlogic.gdx.graphics.g2d with parameters of type TextureRegion Modifier and Type Method Description void
SpriteCache. add(TextureRegion region, float x, float y)
Adds the specified region to the cache.void
SpriteCache. add(TextureRegion region, float x, float y, float width, float height)
Adds the specified region to the cache.void
SpriteCache. add(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)
Adds the specified region to the cache.TextureAtlas.AtlasRegion
TextureAtlas. addRegion(java.lang.String name, TextureRegion textureRegion)
Adds a region to the atlas.void
Batch. draw(TextureRegion region, float x, float y)
Draws a rectangle with the bottom left corner at x,y having the width and height of the region.void
Batch. draw(TextureRegion region, float x, float y, float width, float height)
Draws a rectangle with the bottom left corner at x,y and stretching the region to cover the given width and height.void
Batch. draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)
Draws a rectangle with the bottom left corner at x,y and stretching the region to cover the given width and height.void
Batch. draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, boolean clockwise)
Draws a rectangle with the texture coordinates rotated 90 degrees.void
Batch. draw(TextureRegion region, float width, float height, Affine2 transform)
Draws a rectangle transformed by the given matrix.void
CpuSpriteBatch. draw(TextureRegion region, float x, float y)
void
CpuSpriteBatch. draw(TextureRegion region, float x, float y, float width, float height)
void
CpuSpriteBatch. draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)
void
CpuSpriteBatch. draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, boolean clockwise)
void
CpuSpriteBatch. draw(TextureRegion region, float width, float height, Affine2 transform)
void
PolygonSpriteBatch. draw(TextureRegion region, float x, float y)
void
PolygonSpriteBatch. draw(TextureRegion region, float x, float y, float width, float height)
void
PolygonSpriteBatch. draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)
void
PolygonSpriteBatch. draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, boolean clockwise)
void
PolygonSpriteBatch. draw(TextureRegion region, float width, float height, Affine2 transform)
void
SpriteBatch. draw(TextureRegion region, float x, float y)
void
SpriteBatch. draw(TextureRegion region, float x, float y, float width, float height)
void
SpriteBatch. draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)
void
SpriteBatch. draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, boolean clockwise)
void
SpriteBatch. draw(TextureRegion region, float width, float height, Affine2 transform)
PolygonRegion
PolygonRegionLoader. load(TextureRegion textureRegion, FileHandle file)
Loads a PolygonRegion from a PSH (Polygon SHape) file.void
BitmapFont.BitmapFontData. setGlyphRegion(BitmapFont.Glyph glyph, TextureRegion region)
void
RepeatablePolygonSprite. setPolygon(TextureRegion region, float[] vertices)
Sets polygon with repeating texture region, the size of repeating grid is equal to region sizevoid
RepeatablePolygonSprite. setPolygon(TextureRegion region, float[] vertices, float density)
Sets polygon with repeating texture region, the size of repeating grid is equal to region sizevoid
TextureRegion. setRegion(TextureRegion region)
Sets the texture and coordinates to the specified region.void
TextureRegion. setRegion(TextureRegion region, int x, int y, int width, int height)
Sets the texture to that of the specified region and sets the coordinates relative to the specified region.Method parameters in com.badlogic.gdx.graphics.g2d with type arguments of type TextureRegion Modifier and Type Method Description void
PixmapPacker. updateTextureRegions(Array<TextureRegion> regions, Texture.TextureFilter minFilter, Texture.TextureFilter magFilter, boolean useMipMaps)
CallsupdateTexture
for each page and adds a region to the specified array for each page texture.Constructors in com.badlogic.gdx.graphics.g2d with parameters of type TextureRegion Constructor Description AtlasRegion(TextureRegion region)
BitmapFont(FileHandle fontFile, TextureRegion region)
Creates a BitmapFont with the glyphs relative to the specified region.BitmapFont(FileHandle fontFile, TextureRegion region, boolean flip)
Creates a BitmapFont with the glyphs relative to the specified region.BitmapFont(BitmapFont.BitmapFontData data, TextureRegion region, boolean integer)
Constructs a new BitmapFont from the givenBitmapFont.BitmapFontData
andTextureRegion
.DistanceFieldFont(FileHandle fontFile, TextureRegion region)
DistanceFieldFont(FileHandle fontFile, TextureRegion region, boolean flip)
DistanceFieldFont(BitmapFont.BitmapFontData data, TextureRegion region, boolean integer)
NinePatch(TextureRegion region)
Construct a degenerate "nine" patch with only a center component.NinePatch(TextureRegion... patches)
Construct a nine patch from the given nine texture regions.NinePatch(TextureRegion region, int left, int right, int top, int bottom)
Create a ninepatch by cutting up the given texture region into nine patches.NinePatch(TextureRegion region, Color color)
Construct a degenerate "nine" patch with only a center component.PolygonRegion(TextureRegion region, float[] vertices, short[] triangles)
Creates a PolygonRegion by triangulating the polygon coordinates in vertices and calculates uvs based on that.Sprite(TextureRegion region)
Creates a sprite based on a specific TextureRegion, the new sprite's region is a copy of the parameter region - altering one does not affect the otherSprite(TextureRegion region, int srcX, int srcY, int srcWidth, int srcHeight)
Creates a sprite with width, height, and texture region equal to the specified size, relative to specified sprite's texture region.TextureRegion(TextureRegion region)
Constructs a region with the same texture and coordinates of the specified region.TextureRegion(TextureRegion region, int x, int y, int width, int height)
Constructs a region with the same texture as the specified region and sets the coordinates relative to the specified region.Constructor parameters in com.badlogic.gdx.graphics.g2d with type arguments of type TextureRegion Constructor Description BitmapFont(BitmapFont.BitmapFontData data, Array<TextureRegion> pageRegions, boolean integer)
Constructs a new BitmapFont from the givenBitmapFont.BitmapFontData
and array ofTextureRegion
.DistanceFieldFont(BitmapFont.BitmapFontData data, Array<TextureRegion> pageRegions, boolean integer)
-
Uses of TextureRegion in com.badlogic.gdx.graphics.g3d.attributes
Methods in com.badlogic.gdx.graphics.g3d.attributes with parameters of type TextureRegion Modifier and Type Method Description static TextureAttribute
TextureAttribute. createAmbient(TextureRegion region)
static TextureAttribute
TextureAttribute. createBump(TextureRegion region)
static TextureAttribute
TextureAttribute. createDiffuse(TextureRegion region)
static TextureAttribute
TextureAttribute. createEmissive(TextureRegion region)
static TextureAttribute
TextureAttribute. createNormal(TextureRegion region)
static TextureAttribute
TextureAttribute. createReflection(TextureRegion region)
static TextureAttribute
TextureAttribute. createSpecular(TextureRegion region)
void
TextureAttribute. set(TextureRegion region)
Constructors in com.badlogic.gdx.graphics.g3d.attributes with parameters of type TextureRegion Constructor Description TextureAttribute(long type, TextureRegion region)
-
Uses of TextureRegion in com.badlogic.gdx.graphics.g3d.decals
Fields in com.badlogic.gdx.graphics.g3d.decals declared as TextureRegion Modifier and Type Field Description protected TextureRegion
DecalMaterial. textureRegion
Methods in com.badlogic.gdx.graphics.g3d.decals that return TextureRegion Modifier and Type Method Description TextureRegion
Decal. getTextureRegion()
Methods in com.badlogic.gdx.graphics.g3d.decals with parameters of type TextureRegion Modifier and Type Method Description static Decal
Decal. newDecal(float width, float height, TextureRegion textureRegion)
Creates a decal using the region for texturingstatic Decal
Decal. newDecal(float width, float height, TextureRegion textureRegion, boolean hasTransparency)
Creates a decal using the region for texturingstatic Decal
Decal. newDecal(float width, float height, TextureRegion textureRegion, int srcBlendFactor, int dstBlendFactor)
Creates a decal using the region for texturing and the specified blending parameters for blendingstatic Decal
Decal. newDecal(float width, float height, TextureRegion textureRegion, int srcBlendFactor, int dstBlendFactor, DecalMaterial material)
Creates a decal using the region for texturing and the specified blending parameters for blendingstatic Decal
Decal. newDecal(TextureRegion textureRegion)
Creates a decal assuming the dimensions of the texture regionstatic Decal
Decal. newDecal(TextureRegion textureRegion, boolean hasTransparency)
Creates a decal assuming the dimensions of the texture region and adding transparencyvoid
Decal. setTextureRegion(TextureRegion textureRegion)
Sets the texture region -
Uses of TextureRegion in com.badlogic.gdx.graphics.g3d.particles.influencers
Methods in com.badlogic.gdx.graphics.g3d.particles.influencers with parameters of type TextureRegion Modifier and Type Method Description void
RegionInfluencer. add(TextureRegion... regions)
void
RegionInfluencer.AspectTextureRegion. set(TextureRegion region)
Constructors in com.badlogic.gdx.graphics.g3d.particles.influencers with parameters of type TextureRegion Constructor Description Animated(TextureRegion textureRegion)
AspectTextureRegion(TextureRegion region)
Random(TextureRegion textureRegion)
RegionInfluencer(TextureRegion... regions)
All the regions must be defined on the same TextureSingle(TextureRegion textureRegion)
-
Uses of TextureRegion in com.badlogic.gdx.graphics.g3d.utils
Methods in com.badlogic.gdx.graphics.g3d.utils with parameters of type TextureRegion Modifier and Type Method Description void
MeshBuilder. setUVRange(TextureRegion region)
void
MeshPartBuilder. setUVRange(TextureRegion r)
Set range of texture coordinates from the specified TextureRegion. -
Uses of TextureRegion in com.badlogic.gdx.maps
Methods in com.badlogic.gdx.maps that return TextureRegion Modifier and Type Method Description TextureRegion
ImageResolver.AssetManagerImageResolver. getImage(java.lang.String name)
TextureRegion
ImageResolver.DirectImageResolver. getImage(java.lang.String name)
TextureRegion
ImageResolver. getImage(java.lang.String name)
TextureRegion
ImageResolver.TextureAtlasImageResolver. getImage(java.lang.String name)
-
Uses of TextureRegion in com.badlogic.gdx.maps.objects
Methods in com.badlogic.gdx.maps.objects that return TextureRegion Modifier and Type Method Description TextureRegion
TextureMapObject. getTextureRegion()
Methods in com.badlogic.gdx.maps.objects with parameters of type TextureRegion Modifier and Type Method Description void
TextureMapObject. setTextureRegion(TextureRegion region)
Constructors in com.badlogic.gdx.maps.objects with parameters of type TextureRegion Constructor Description TextureMapObject(TextureRegion textureRegion)
Creates texture map object with the given region -
Uses of TextureRegion in com.badlogic.gdx.maps.tiled
Methods in com.badlogic.gdx.maps.tiled that return TextureRegion Modifier and Type Method Description TextureRegion
AtlasTmxMapLoader.AtlasResolver.AssetManagerAtlasResolver. getImage(java.lang.String name)
TextureRegion
AtlasTmxMapLoader.AtlasResolver.DirectAtlasResolver. getImage(java.lang.String name)
TextureRegion
TiledMapImageLayer. getTextureRegion()
TextureRegion
TiledMapTile. getTextureRegion()
Methods in com.badlogic.gdx.maps.tiled with parameters of type TextureRegion Modifier and Type Method Description protected void
BaseTmxMapLoader. addStaticTiledMapTile(TiledMapTileSet tileSet, TextureRegion textureRegion, int tileId, float offsetX, float offsetY)
void
TiledMapImageLayer. setTextureRegion(TextureRegion region)
void
TiledMapTile. setTextureRegion(TextureRegion textureRegion)
Sets the texture region used to render the tileConstructors in com.badlogic.gdx.maps.tiled with parameters of type TextureRegion Constructor Description TiledMapImageLayer(TextureRegion region, float x, float y)
-
Uses of TextureRegion in com.badlogic.gdx.maps.tiled.tiles
Methods in com.badlogic.gdx.maps.tiled.tiles that return TextureRegion Modifier and Type Method Description TextureRegion
AnimatedTiledMapTile. getTextureRegion()
TextureRegion
StaticTiledMapTile. getTextureRegion()
Methods in com.badlogic.gdx.maps.tiled.tiles with parameters of type TextureRegion Modifier and Type Method Description void
AnimatedTiledMapTile. setTextureRegion(TextureRegion textureRegion)
void
StaticTiledMapTile. setTextureRegion(TextureRegion textureRegion)
Constructors in com.badlogic.gdx.maps.tiled.tiles with parameters of type TextureRegion Constructor Description StaticTiledMapTile(TextureRegion textureRegion)
Creates a static tile with the given region -
Uses of TextureRegion in com.badlogic.gdx.scenes.scene2d.ui
Methods in com.badlogic.gdx.scenes.scene2d.ui that return TextureRegion Modifier and Type Method Description TextureRegion
Skin. getRegion(java.lang.String name)
Returns a registered texture region.Methods in com.badlogic.gdx.scenes.scene2d.ui that return types with arguments of type TextureRegion Modifier and Type Method Description Array<TextureRegion>
Skin. getRegions(java.lang.String regionName)
Constructors in com.badlogic.gdx.scenes.scene2d.ui with parameters of type TextureRegion Constructor Description Image(TextureRegion region)
Creates an image stretched, and aligned center. -
Uses of TextureRegion in com.badlogic.gdx.scenes.scene2d.utils
Methods in com.badlogic.gdx.scenes.scene2d.utils that return TextureRegion Modifier and Type Method Description TextureRegion
TextureRegionDrawable. getRegion()
Methods in com.badlogic.gdx.scenes.scene2d.utils with parameters of type TextureRegion Modifier and Type Method Description static void
TiledDrawable. draw(Batch batch, TextureRegion textureRegion, float x, float y, float width, float height, float scale, int align)
void
TextureRegionDrawable. setRegion(TextureRegion region)
Constructors in com.badlogic.gdx.scenes.scene2d.utils with parameters of type TextureRegion Constructor Description TextureRegionDrawable(TextureRegion region)
TiledDrawable(TextureRegion region)
-
Uses of TextureRegion in com.badlogic.gdx.utils
Methods in com.badlogic.gdx.utils that return TextureRegion Modifier and Type Method Description static TextureRegion
ScreenUtils. getFrameBufferTexture()
Returns the current framebuffer contents as aTextureRegion
with a width and height equal to the current screen size.static TextureRegion
ScreenUtils. getFrameBufferTexture(int x, int y, int w, int h)
Returns a portion of the current framebuffer contents specified by x, y, width and height as aTextureRegion
with the same dimensions.
-