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/src/osgText/Font.cpp

    r12407 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*/ 
     
    7676            s_FontFilePath.push_back(winFontPath); 
    7777        } 
    78     #elif defined(__APPLE__)  
    79       osgDB::convertStringPathIntoFilePathList(  
     78    #elif defined(__APPLE__) 
     79      osgDB::convertStringPathIntoFilePathList( 
    8080        ".:/usr/share/fonts/ttf:/usr/share/fonts/ttf/western:/usr/share/fonts/ttf/decoratives:/Library/Fonts:/System/Library/Fonts", 
    8181        s_FontFilePath); 
     
    104104 
    105105    // Not found, return empty string 
    106     OSG_INFO<<"Warning: font file \""<<str<<"\" not found."<<std::endl;     
     106    OSG_INFO<<"Warning: font file \""<<str<<"\" not found."<<std::endl; 
    107107    return std::string(); 
    108108} 
     
    115115    if (foundFile.empty()) 
    116116        foundFile = filename; 
    117      
     117 
    118118    OpenThreads::ScopedLock<OpenThreads::Mutex> lock(getFontFileMutex()); 
    119119 
     
    157157    } 
    158158    if (!rr.validObject()) return 0; 
    159      
     159 
    160160    osg::Object *object = rr.takeObject(); 
    161161 
     
    176176    if (foundFile.empty()) 
    177177        foundFile = filename; 
    178      
     178 
    179179    OpenThreads::ScopedLock<OpenThreads::Mutex> lock(getFontFileMutex()); 
    180180 
     
    216216    } 
    217217    if (!rr.validObject()) return 0; 
    218      
     218 
    219219    // if the object is a font then return it. 
    220220    osgText::Font* font = dynamic_cast<osgText::Font*>(rr.getObject()); 
     
    323323{ 
    324324    return _textureHeightHint; 
    325 }     
     325} 
    326326 
    327327 
     
    355355    FontResolution fontResUsed(0,0); 
    356356    if (_implementation->supportsMultipleFontResolutions()) fontResUsed = fontRes; 
    357          
     357 
    358358    { 
    359359        OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_glyphMapMutex); 
     
    397397{ 
    398398   osg::Object::setThreadSafeRefUnref(threadSafe); 
    399      
     399 
    400400    if (_texenv.valid()) _texenv->setThreadSafeRefUnref(threadSafe); 
    401401    if (_stateset.valid()) _stateset->setThreadSafeRefUnref(threadSafe); 
     
    406406    { 
    407407        (*itr)->setThreadSafeRefUnref(threadSafe); 
    408     }     
     408    } 
    409409} 
    410410 
     
    418418    { 
    419419        (*itr)->resizeGLObjectBuffers(maxSize); 
    420     }     
     420    } 
    421421} 
    422422 
     
    431431        (*itr)->releaseGLObjects(state); 
    432432    } 
    433      
     433 
    434434    // const_cast<Font*>(this)->_glyphTextureList.clear(); 
    435435    // const_cast<Font*>(this)->_sizeGlyphMap.clear(); 
     
    455455 
    456456    _sizeGlyphMap[fontRes][charcode]=glyph; 
    457      
     457 
    458458    int posX=0,posY=0; 
    459      
     459 
    460460    GlyphTexture* glyphTexture = 0; 
    461461    for(GlyphTextureList::iterator itr=_glyphTextureList.begin(); 
     
    465465        if ((*itr)->getSpaceForGlyph(glyph,posX,posY)) glyphTexture = itr->get(); 
    466466    } 
    467      
     467 
    468468    if (glyphTexture) 
    469469    { 
    470470        //cout << "    found space for texture "<<glyphTexture<<" posX="<<posX<<" posY="<<posY<<endl; 
    471471    } 
    472      
     472 
    473473    if (!glyphTexture) 
    474474    { 
    475          
     475 
    476476        glyphTexture = new GlyphTexture; 
    477          
     477 
    478478        static int numberOfTexturesAllocated = 0; 
    479479        ++numberOfTexturesAllocated; 
     
    488488        glyphTexture->setFilter(osg::Texture::MAG_FILTER,_magFilterHint); 
    489489        glyphTexture->setMaxAnisotropy(8); 
    490          
     490 
    491491        _glyphTextureList.push_back(glyphTexture); 
    492          
     492 
    493493        if (!glyphTexture->getSpaceForGlyph(glyph,posX,posY)) 
    494494        { 
     
    497497        } 
    498498 
    499     }     
    500      
     499    } 
     500 
    501501    // add the glyph into the texture. 
    502502    glyphTexture->addGlyph(glyph,posX,posY); 
    503      
    504 } 
     503 
     504}