I wanted to do something very similar to this as well. Right now, I've
just implemented it as two separate nodes. The text as of course an
osgText::Text object. For the rectangle, I used a geometry object
containing quad, using 'computeBound' on the text object to figure out
its dimensions. I had to use 'OBJECT_COORDS' as the characterSizeMode,
since 'computeBound' did not work properly otherwise.
I put an outline around the quad using osgFX::Scribe (perhaps overkill,
but it worked).
- Eron
Andreas Goebel wrote:
Hi,
is there a simple way of drawing a background-rectangle to ensure
readability of the text? For instance a white rectangle behind a black
text to ensure, that the text stays readable if it is over a black
object?
If not, I would draw it with a geometry that uses the bounding box of
the text, right?
Regards,
Andreas
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/