TextSettings 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2014 Robert Osfield
  2. *
  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
  5. * (at your option) any later version. The full license is in LICENSE file
  6. * included with this distribution, and on the openscenegraph.org website.
  7. *
  8. * This library is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * OpenSceneGraph Public License for more details.
  12. */
  13. #ifndef OSGUI_TEXTSETTINGS
  14. #define OSGUI_TEXTSETTINGS
  15. #include <osg/Object>
  16. #include <osg/BoundingBox>
  17. #include <osg/Vec4>
  18. #include <osgUI/Export>
  19. namespace osgUI
  20. {
  21. class OSGUI_EXPORT TextSettings : public osg::Object
  22. {
  23. public:
  24. TextSettings();
  25. TextSettings(const TextSettings& textSettings, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
  26. META_Object(osgUI, TextSettings);
  27. void setFont(const std::string& font) { _font = font; }
  28. const std::string& getFont() const { return _font; }
  29. void setCharacterSize(float characterSize) { _characterSize = characterSize; }
  30. float getCharacterSize() const { return _characterSize; }
  31. protected:
  32. virtual ~TextSettings() {}
  33. std::string _font;
  34. float _characterSize;
  35. };
  36. }
  37. #endif