List of usage examples for com.badlogic.gdx.graphics.g2d BitmapFont usesIntegerPositions
public boolean usesIntegerPositions()
From source file:com.calanti.androidnativekeyboardinputtest.libgdxModified_1_9_3.CalTextField.java
License:Apache License
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 {/* ww w . j a v a2s .c om*/ textY = textY + height / 2; } if (font.usesIntegerPositions()) textY = (int) textY; return textY; }