From Panagiotis Papadakos, "Setting the maximum height of osgText doen't seem to work. If the text is

big enough, it exceeds the height that I gave as input to
setMaximumHeight. So check if cursor is out of -_maximumHeight."
This commit is contained in:
Robert Osfield
2007-10-03 23:03:13 +00:00
parent c46db2fa15
commit cf5f000ea1

View File

@@ -390,11 +390,13 @@ String::iterator Text::computeLastCharacterOnLine(osg::Vec2& cursor, String::ite
case LEFT_TO_RIGHT:
{
if (_maximumWidth>0.0f && cursor.x()+width>_maximumWidth) outOfSpace=true;
if(_maximumHeight>0.0f && cursor.y()<-_maximumHeight) outOfSpace=true;
break;
}
case RIGHT_TO_LEFT:
{
if (_maximumWidth>0.0f && cursor.x()<-_maximumWidth) outOfSpace=true;
if(_maximumHeight>0.0f && cursor.y()<-_maximumHeight) outOfSpace=true;
break;
}
case VERTICAL: