public BitmapFontCache (BitmapFont font) { this(font, font.usesIntegerPositions()); }
public BitmapFontCache (BitmapFont font) { this(font, font.usesIntegerPositions()); }
protected float getTextY (BitmapFont font, Drawable background) { float height = getHeight(); float textY = textHeight / 2 + font.getDescent(); if (background != null) { float bottom = background.getBottomHeight(); textY = textY + (height - background.getTopHeight() - bottom) / 2 + bottom; } else { textY = textY + height / 2; } if (font.usesIntegerPositions()) textY = (int)textY; return textY; }
protected float getTextY (BitmapFont font, Drawable background) { float height = getHeight(); float textY = textHeight / 2 + font.getDescent(); if (background != null) { float bottom = background.getBottomHeight(); textY = textY + (height - background.getTopHeight() - bottom) / 2 + bottom; } else { textY = textY + height / 2; } if (font.usesIntegerPositions()) textY = (int)textY; return textY; }
public BitmapFontCache (BitmapFont font) { this(font, font.usesIntegerPositions()); }
protected float getTextY (BitmapFont font, Drawable background) { float height = getHeight(); float textY = textHeight / 2 + font.getDescent(); if (background != null) { float bottom = background.getBottomHeight(); textY = textY + (height - background.getTopHeight() - bottom) / 2 + bottom; } else { textY = textY + height / 2; } if (font.usesIntegerPositions()) textY = (int) textY; return textY; }
protected float getTextY (BitmapFont font, Drawable background) { float height = getHeight(); float textY = textHeight / 2 + font.getDescent(); if (background != null) { float bottom = background.getBottomHeight(); textY = textY + (height - background.getTopHeight() - bottom) / 2 + bottom; } else { textY = textY + height / 2; } if (font.usesIntegerPositions()) textY = (int)textY; return textY; }
protected float getTextY(BitmapFont font, Drawable background) { float height = getHeight(); float textY = textHeight / 2 + font.getDescent(); if (background != null) { float bottom = background.getBottomHeight(); textY = textY + (height - background.getTopHeight() - bottom) / 2 + bottom; } else { textY = textY + height / 2; } if (font.usesIntegerPositions()) textY = (int) textY; return textY; }
static BitmapFont copyFont(BitmapFont font) { if(font == null) return new BitmapFont(); return new BitmapFont(new BitmapFont.BitmapFontData(font.getData().getFontFile(), false), font.getRegions(), font.usesIntegerPositions()); } private DefaultResources()