Show
Ignore:
Timestamp:
04/30/03 13:40:17 (11 years ago)
Author:
robert
Message:

Added support for automatic scaling of text to screen coords. Optimized
the text implementation to provide better speed, especially by using the
alignement to screen option.

Deprecated the Text::setFontSize(,) method, which is now being replaced
by setFontResolution(,)

Fixed typos in Texture*.cpp.

Removed old deprecated methods from osg headers.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgtext/osgtext.cpp

    r1922 r1927  
    115115         
    116116        // use text that uses 10 by 10 texels as a target resolution for fonts. 
    117         text->setFontSize(10,10); // blocky but small texture memory usage 
    118          
    119         text->setText("text->setFontSize(10,10); // blocky but small texture memory usage"); 
     117        text->setFontResolution(10,10); // blocky but small texture memory usage 
     118         
     119        text->setText("text->setFontResolution(10,10); // blocky but small texture memory usage"); 
    120120        geode->addDrawable(text); 
    121121    } 
     
    130130         
    131131        // use text that uses 10 by 10 texels as a target resolution for fonts. 
    132         text->setFontSize(20,20); // smoother but higher texture memory usage (but still quite low). 
    133          
    134         text->setText("text->setFontSize(20,20); // smoother but higher texture memory usage (but still quite low)."); 
     132        text->setFontResolution(20,20); // smoother but higher texture memory usage (but still quite low). 
     133         
     134        text->setText("text->setFontResolution(20,20); // smoother but higher texture memory usage (but still quite low)."); 
    135135        geode->addDrawable(text); 
    136136    } 
     
    145145         
    146146        // use text that uses 10 by 10 texels as a target resolution for fonts. 
    147         text->setFontSize(40,40); // even smoother but again higher texture memory usage. 
    148          
    149         text->setText("text->setFontSize(40,40); // even smoother but again higher texture memory usage."); 
     147        text->setFontResolution(40,40); // even smoother but again higher texture memory usage. 
     148         
     149        text->setText("text->setFontResolution(40,40); // even smoother but again higher texture memory usage."); 
    150150        geode->addDrawable(text); 
    151151    } 
     
    165165        text->setFont(font); 
    166166        text->setColor(characterSizeColor); 
    167         text->setFontSize(20,20); 
     167        text->setFontResolution(20,20); 
    168168        text->setPosition(cursor); 
    169169         
     
    180180        text->setFont(font); 
    181181        text->setColor(characterSizeColor); 
    182         text->setFontSize(30,30); 
     182        text->setFontResolution(30,30); 
    183183        text->setPosition(cursor); 
    184184         
     
    195195        text->setFont(font); 
    196196        text->setColor(characterSizeColor); 
    197         text->setFontSize(40,40); 
     197        text->setFontResolution(40,40); 
    198198        text->setPosition(cursor); 
    199199