Hello all,

I'm doing a bit of work with the FTGL contribution libraries for OpenSG 
1.8 but am have some problems updating the bounding box of the text 
after changing its font properties.

I have got the bounding boxes to update when I change the text string 
like this:

beginEditCP ( this->text );
{
    this->text->setText ( "some new text" );
    this->text->adjustVolume( this->textNode->getVolume(true) );
    this->text->invalidateVolume();
}
endEditCP ( this->text );

(please tell me if there is a better way)

I have had a look at the adjustVolume() method and from what I 
understand it gets the font and works out values to adjust the bounding 
box by.  So I assumed if I did this it should also work, but it doesn't:

beginEditCP ( this->font );
beginEditCP ( this->text );
{
    this->font->setSize ( this->fontSize );

    this->text->adjustVolume( this->textNode->getVolume(true) );
    this->text->invalidateVolume();
}
endEditCP ( this->font );
endEditCP ( this->text );

Its like the changed font is not being updated  in the FTGLText node 
though the size of the font obviously still changes.

Could someone help me out please?


Thanks
Andrew

   



------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to