From Tree, support for encoded text added into osgText.

This commit is contained in:
Robert Osfield
2003-01-08 15:22:17 +00:00
parent ba34880464
commit c5d3c860d8
14 changed files with 495 additions and 98 deletions

View File

@@ -26,6 +26,7 @@
#include <osg/Vec2>
#include <osgText/Font>
#include <osgText/EncodedText>
#include <string>
@@ -107,8 +108,8 @@ class OSGTEXT_EXPORT Text : public osg::Drawable
Font* getFont() { return _font.get(); }
const Font* getFont() const { return _font.get(); }
void setText(const char* text) { _text=text; _initAlignment=false; }
void setText(const std::string& text) { _text=text; _initAlignment=false; }
void setText(const char* text);
void setText(const std::string& text);
const std::string& getText() const { return _text; }
virtual bool supports(PrimitiveFunctor& pf) const;
@@ -120,6 +121,8 @@ class OSGTEXT_EXPORT Text : public osg::Drawable
const osg::Vec3& getAlignmentPos() const { return _alignmentPos; };
void setEncodedText(EncodedText* encodedText) { _encodedText = encodedText; }
const EncodedText* getEncodedText() const { return _encodedText.get(); }
protected:
@@ -152,6 +155,8 @@ class OSGTEXT_EXPORT Text : public osg::Drawable
int _boundingBoxType;
AxisAlignment _axisAlignment;
osg::ref_ptr<EncodedText> _encodedText;
osg::Vec3 _pos;
osg::Vec3 _alignmentPos;
osg::Vec4 _color;