Constructor and Description |
---|
BitmapFont() |
BitmapFont(com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData data,
com.badlogic.gdx.utils.Array<com.badlogic.gdx.graphics.g2d.TextureRegion> pageRegions,
boolean integer) |
BitmapFont(com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData data,
com.badlogic.gdx.graphics.g2d.TextureRegion region,
boolean integer) |
BitmapFont(com.badlogic.gdx.files.FileHandle fileHandle) |
Modifier and Type | Method and Description |
---|---|
void |
draw(Graphics g,
java.lang.String str,
float x,
float y)
Draws text to the
Graphics context using this font |
void |
draw(Graphics g,
java.lang.String str,
float x,
float y,
float targetWidth)
Draws text to the
Graphics context using this font |
void |
draw(Graphics g,
java.lang.String str,
float x,
float y,
float targetWidth,
int horizontalAlignment,
boolean wrap)
Draws text to the
Graphics context using this font |
FontGlyphLayout |
getSharedGlyphLayout()
Returns a
FontGlyphLayout instance associated with this GameFont instance |
GameFontCache |
newCache()
Creates a
GameFontCache for this font |
FontGlyphLayout |
newGlyphLayout()
Creates a
FontGlyphLayout for this font |
boolean |
useIntegerPositions()
Returns if characters use integer positions
|
dispose, draw, draw, draw, draw, draw, getAscent, getCache, getCapHeight, getColor, getData, getDescent, getLineHeight, getRegion, getRegion, getRegions, getScaleX, getScaleY, getSpaceWidth, getXHeight, isFlipped, load, newFontCache, ownsTexture, setColor, setColor, setFixedWidthGlyphs, setOwnsTexture, setUseIntegerPositions, toString, usesIntegerPositions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
dispose, getCapHeight, getColor, getLineHeight, setColor
public BitmapFont()
public BitmapFont(com.badlogic.gdx.files.FileHandle fileHandle)
public BitmapFont(com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData data, com.badlogic.gdx.graphics.g2d.TextureRegion region, boolean integer)
public BitmapFont(com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData data, com.badlogic.gdx.utils.Array<com.badlogic.gdx.graphics.g2d.TextureRegion> pageRegions, boolean integer)
public void draw(Graphics g, java.lang.String str, float x, float y)
GameFont
Graphics
context using this fontpublic void draw(Graphics g, java.lang.String str, float x, float y, float targetWidth)
GameFont
Graphics
context using this fontpublic void draw(Graphics g, java.lang.String str, float x, float y, float targetWidth, int horizontalAlignment, boolean wrap)
GameFont
Graphics
context using this fontdraw
in interface GameFont
g
- The Graphics
contextstr
- The text to renderx
- The x coordinate to draw aty
- The y coordinate to draw attargetWidth
- The target width to render withhorizontalAlignment
- The horizontal alignment within the targetWidth. See Align
wrap
- True if text should wrap if exceeding targetWidth, false if it should clippublic FontGlyphLayout newGlyphLayout()
GameFont
FontGlyphLayout
for this fontnewGlyphLayout
in interface GameFont
FontGlyphLayout
instancepublic FontGlyphLayout getSharedGlyphLayout()
GameFont
FontGlyphLayout
instance associated with this GameFont
instancegetSharedGlyphLayout
in interface GameFont
FontGlyphLayout
instance attached to this fontpublic GameFontCache newCache()
GameFont
GameFontCache
for this fontnewCache
in interface GameFont
GameFontCache
instancepublic boolean useIntegerPositions()
GameFont
useIntegerPositions
in interface GameFont