* instance is used for all methods that return TextBounds.\r
*/\r
public TextBounds draw (SpriteBatch spriteBatch, CharSequence str, float x, float y, int start, int end) {\r
+ float batchColor = spriteBatch.getColor().toFloatBits();\r
spriteBatch.setColor(color);\r
final Texture texture = region.getTexture();\r
y += ascent;\r
x += g.xadvance * scaleX;\r
}\r
}\r
+ spriteBatch.setColor(batchColor); \r
textBounds.width = (int)(x - startX);\r
textBounds.height = (int)capHeight;\r
return textBounds;\r
*/\r
public TextBounds drawMultiLine (SpriteBatch spriteBatch, CharSequence str, float x, float y, float alignmentWidth,\r
HAlignment alignment) {\r
+ float batchColor = spriteBatch.getColor().toFloatBits();\r
float down = this.down;\r
int start = 0;\r
int numLines = 0;\r
y += down;\r
numLines++;\r
}\r
+ spriteBatch.setColor(batchColor);\r
+ \r
textBounds.width = maxWidth;\r
textBounds.height = (int)(capHeight + (numLines - 1) * lineHeight);\r
return textBounds;\r
*/\r
public TextBounds drawWrapped (SpriteBatch spriteBatch, CharSequence str, float x, float y, float wrapWidth,\r
HAlignment alignment) {\r
+ float batchColor = spriteBatch.getColor().toFloatBits();\r
float down = this.down;\r
int start = 0;\r
int numLines = 0;\r
y += down;\r
numLines++;\r
}\r
+ spriteBatch.setColor(batchColor); \r
textBounds.width = maxWidth;\r
textBounds.height = (int)(capHeight + (numLines - 1) * lineHeight);\r
return textBounds;\r