/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield * * This library is open source and may be redistributed and/or modified under * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or * (at your option) any later version. The full license is in LICENSE file * included with this distribution, and on the openscenegraph.org website. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * OpenSceneGraph Public License for more details. */ #ifndef OSGTEXT_STYLE #define OSGTEXT_STYLE 1 #include #include #include #include namespace osgText { class OSGTEXT_EXPORT Bevel : public osg::Object { public: Bevel(); Bevel(const Bevel& bevel, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); META_Object(osgText, Bevel) bool operator == (const Bevel& rhs) const { if (_thickness != rhs._thickness) return false; return _vertices==rhs._vertices; } void setBevelThickness(float thickness) { _thickness = thickness; } float getBevelThickness() const { return _thickness; } void flatBevel(float width=0.25f); void roundedBevel(float width=0.5f, unsigned int numSteps=10); void roundedBevel2(float width=0.5f, unsigned int numSteps=10); typedef std::vector Vertices; void setVertices(const Vertices& vertices) { _vertices = vertices; } Vertices& getVertices() { return _vertices; } const Vertices& getVertices() const { return _vertices; } void print(std::ostream& fout); protected: float _thickness; Vertices _vertices; }; class OSGTEXT_EXPORT Style : public osg::Object { public: Style(); Style(const Style& style, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); META_Object(osgText, Style) /// default Layout implementation used if no other is specified on TextNode static osg::ref_ptr