add method to create Text RenderInstruction - really need to switch to Builders..

This commit is contained in:
Hannes Janetzek 2013-07-24 01:38:54 +02:00
parent 440ab0e3cc
commit 9043188f94

View File

@ -59,6 +59,19 @@ public final class Text extends RenderInstruction {
return t; return t;
} }
public static Text createText(String textKey, float fontSize, float strokeWidth, int fill, int outline,
boolean billboard) {
Text t = new Text("", textKey, FontFamily.DEFAULT, FontStyle.NORMAL,
fontSize, fill, outline, strokeWidth, 0, billboard, null, Integer.MAX_VALUE);
t.fontHeight = t.paint.getFontHeight();
t.fontDescent = t.paint.getFontDescent();
return t;
}
public Text(String style, String textKey, FontFamily fontFamily, FontStyle fontStyle, public Text(String style, String textKey, FontFamily fontFamily, FontStyle fontStyle,
float fontSize, int fill, int outline, float strokeWidth, float dy, boolean caption, float fontSize, int fill, int outline, float strokeWidth, float dy, boolean caption,
String symbol, int priority) { String symbol, int priority) {