Hi,
I wanted to use getLineWidth of BitmapText to center my text.
But it is always returning 0
When I looked the code I saw that only a method local variable is updated in the assemble method inside, and not the member.
public float getLineWidth() {
if (needRefresh) {
assemble(); }
return lineWidth;
}
and assemble method is :
private void assemble() {
float lineWidth = 0; // first generate quadlist
quadList.clear();
if (block.getTextBox() == null) {
lineWidth = font.updateText(block, quadList, rightToLeft);
} else {
lineWidth = font.updateTextRect(block, quadList, wordWrap);
}
// set size to zero of any quads at the end that
// were not updated
quadList.cleanTail();
for (int i = 0; i < textPages.length; i++) {
textPages.assemble(quadList);
}
needRefresh = false;
}
Not sure if it is good forum to post such thing.
Regards,
Fred
This issue has been fixed in the nightly/SVN builds
thx a lot. I will update first next time.