Show
Ignore:
Timestamp:
03/21/12 18:36:20 (2 years ago)
Author:
robert
Message:

Ran script to remove trailing spaces and tabs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osgText/TextBase

    r12139 r13041  
    1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield  
     1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
    22 * 
    3  * This library is open source and may be redistributed and/or modified under   
    4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or  
     3 * This library is open source and may be redistributed and/or modified under 
     4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
    55 * (at your option) any later version.  The full license is in LICENSE file 
    66 * included with this distribution, and on the openscenegraph.org website. 
    7  *  
     7 * 
    88 * This library is distributed in the hope that it will be useful, 
    99 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
     10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1111 * OpenSceneGraph Public License for more details. 
    1212*/ 
     
    6767 
    6868    /** Set the Font reference width and height resolution in texels. 
    69       * Note, the size may not be supported by current font,  
     69      * Note, the size may not be supported by current font, 
    7070      * the closest supported font size will be selected.*/ 
    7171    void setFontResolution(unsigned int width, unsigned int height); 
     
    7373    unsigned int getFontWidth() const { return _fontSize.first; } 
    7474    unsigned int getFontHeight() const { return _fontSize.second; } 
    75      
    76      
     75 
     76 
    7777    /** Set the text using a osgText::String.*/ 
    7878    void setText(const String& text); 
    7979 
    80     /** Set the text using a std::string,  
     80    /** Set the text using a std::string, 
    8181      * which is converted to an internal TextString.*/ 
    8282    void setText(const std::string& text); 
     
    8686    void setText(const std::string& text,String::Encoding encoding); 
    8787 
    88     /** Set the text using a wchar_t string,  
     88    /** Set the text using a wchar_t string, 
    8989      * which is converted to an internal TextString.*/ 
    9090    void setText(const wchar_t* text); 
    91      
    92     /** Get the text string.  
     91 
     92    /** Get the text string. 
    9393      * Note, if you modify the string you must call Text::update() for 
    9494      * the internal glyph reprentation to be updated.*/ 
     
    9797    /** Get the const text string.*/ 
    9898    const String& getText() const { return _text; } 
    99      
    100     /** update internal glyph respresentation used for rendering,  
     99 
     100    /** update internal glyph respresentation used for rendering, 
    101101      * and bounding volume.*/ 
    102102    void update() { computeGlyphRepresentation(); } 
     
    121121    /** Set how the CharacterSize value relates to the final rendered character.*/ 
    122122    void setCharacterSizeMode(CharacterSizeMode mode) { _characterSizeMode = mode; } 
    123      
     123 
    124124    /** Get the CharacterSizeMode.*/ 
    125125    CharacterSizeMode getCharacterSizeMode() const { return _characterSizeMode; } 
     
    128128    /** Set the maximum width of the text box. 
    129129      * With horizontal layouts any characters which do not fit are wrapped around. 
    130       * 0 or negative values indicate that no maximum width is set, lines can be as long as  
     130      * 0 or negative values indicate that no maximum width is set, lines can be as long as 
    131131      * they need be to fit thre required text*/ 
    132132    void setMaximumWidth(float maximumWidth); 
    133      
     133 
    134134    /** Get the maximim width of the text box.*/ 
    135135    float getMaximumWidth() const { return _maximumWidth; } 
     
    137137    /** Set the maximum height of the text box. 
    138138      * With horizontal layouts any characters which do not fit are wrapped around. 
    139       * 0 or negative values indicate that no maximum height is set, lines can be as long as  
     139      * 0 or negative values indicate that no maximum height is set, lines can be as long as 
    140140      * they need be to fit the required text*/ 
    141141    void setMaximumHeight(float maximumHeight); 
    142      
     142 
    143143    /** Get the maximum height of the text box.*/ 
    144144    float getMaximumHeight() const { return _maximumHeight; } 
    145145 
    146146    /** Set the line spacing of the text box, given as a percentage of 
    147       * the character height. The default value is 0 for backward  
    148       * compatibility. For longer paragraphs of text, a value of at  
     147      * the character height. The default value is 0 for backward 
     148      * compatibility. For longer paragraphs of text, a value of at 
    149149      * least 25% (i.e. set line spacing to 0.25) is recommended. */ 
    150150    void setLineSpacing(float lineSpacing); 
     
    157157    /** Set the position of text.*/ 
    158158    void setPosition(const osg::Vec3& pos); 
    159      
     159 
    160160    /** Get the position of text.*/ 
    161161    const osg::Vec3& getPosition() const { return _position; } 
    162      
     162 
    163163 
    164164    enum AlignmentType 
     
    175175        RIGHT_CENTER, 
    176176        RIGHT_BOTTOM, 
    177          
     177 
    178178        LEFT_BASE_LINE, 
    179179        CENTER_BASE_LINE, 
    180180        RIGHT_BASE_LINE, 
    181      
     181 
    182182        LEFT_BOTTOM_BASE_LINE, 
    183183        CENTER_BOTTOM_BASE_LINE, 
    184184        RIGHT_BOTTOM_BASE_LINE, 
    185      
     185 
    186186        BASE_LINE = LEFT_BASE_LINE /// default. 
    187      
    188     }; 
    189      
     187 
     188    }; 
     189 
    190190    void setAlignment(AlignmentType alignment); 
    191191    AlignmentType getAlignment() const { return _alignment; } 
     
    206206    void setAxisAlignment(AxisAlignment axis); 
    207207    AxisAlignment getAxisAlignment() const { return _axisAlignment; } 
    208      
     208 
    209209    void setRotation(const osg::Quat& quat); 
    210210    const osg::Quat& getRotation() const { return _rotation; } 
     
    219219        VERTICAL 
    220220    }; 
    221      
     221 
    222222    void setLayout(Layout layout); 
    223      
     223 
    224224    Layout getLayout() const { return _layout; } 
    225225 
     
    234234 
    235235    void setDrawMode(unsigned int mode); 
    236      
     236 
    237237    unsigned int getDrawMode() const { return _drawMode; } 
    238238 
    239239    void setBoundingBoxMargin(float margin); 
    240      
     240 
    241241    float getBoundingBoxMargin() const { return _textBBMargin; } 
    242242 
    243243    void setBoundingBoxColor(const osg::Vec4& color){ _textBBColor = color; } 
    244      
     244 
    245245    const osg::Vec4& getBoundingBoxColor() const { return _textBBColor; } 
    246246 
    247      
     247 
    248248    void setKerningType(KerningType kerningType) { _kerningType = kerningType; } 
    249249 
     
    264264    virtual void releaseGLObjects(osg::State* state=0) const; 
    265265 
    266      
     266 
    267267    virtual osg::BoundingBox computeBound() const; 
    268268 
     
    278278    virtual void computePositions(unsigned int contextID) const = 0; 
    279279    virtual void computeGlyphRepresentation() = 0; 
    280      
    281      
     280 
     281 
    282282    // members which have public access. 
    283283    osg::Vec4                               _color; 
     
    304304    unsigned int                            _lineCount; 
    305305 
    306      
     306 
    307307 
    308308    // internal caches of the positioning of the text. 
    309      
     309 
    310310    struct AutoTransformCache 
    311     {     
     311    { 
    312312        AutoTransformCache(): 
    313313            _traversalNumber(-1), 
    314314            _width(0), 
    315315            _height(0) {} 
    316      
     316 
    317317        int         _traversalNumber; 
    318318        int         _width; 
     
    323323        osg::Matrix _matrix; 
    324324    }; 
    325      
     325 
    326326    mutable osg::buffered_object<AutoTransformCache>    _autoTransformCache; 
    327327    mutable osg::Vec3                                   _offset; 
     
    334334 
    335335#endif 
    336   
     336