From cf5f000ea12289e100f34235be61daf0d63f05d2 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 3 Oct 2007 23:03:13 +0000 Subject: [PATCH] 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." --- src/osgText/Text.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osgText/Text.cpp b/src/osgText/Text.cpp index 84e210ac5..76ea9a77b 100644 --- a/src/osgText/Text.cpp +++ b/src/osgText/Text.cpp @@ -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: