You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have create a osgText::Text object with empty text and setAlignment as LEFT_BOTTOM_BASE_LINE, then getBoundingBox will get a very large Y value.
I maybe found the reason right here:
The member "_lineCount" type is "unsignel int", it will be 0 when text is empty, unsigned 0 - 1 will got a very large positive number.
member "_offset" will be make transalte for member "_matrix", and the "_matrix" will be use at computeBoundingBox.
OSG Version: 3.6.5
The text was updated successfully, but these errors were encountered:
That does look like a bug, with the code assuming that _lineCount is >= 1, changing the code to check for this condition, or use a min(_lineCount, 1) in stead of the _lineCount would resolve this issue.
I have create a osgText::Text object with empty text and setAlignment as LEFT_BOTTOM_BASE_LINE, then getBoundingBox will get a very large Y value.
I maybe found the reason right here:
The member "_lineCount" type is "unsignel int", it will be 0 when text is empty, unsigned 0 - 1 will got a very large positive number.
member "_offset" will be make transalte for member "_matrix", and the "_matrix" will be use at computeBoundingBox.
OSG Version: 3.6.5
The text was updated successfully, but these errors were encountered: