From 5849634082d0faa7f3540bd1b176086398cbc0d2 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 18 Nov 2010 17:59:55 +0000 Subject: [PATCH] Moved text color into TextBase, added support for colour into Text3D --- include/osgText/Text | 5 ----- include/osgText/TextBase | 4 +++- src/osgText/Text.cpp | 8 -------- src/osgText/Text3D.cpp | 2 ++ src/osgText/TextBase.cpp | 8 ++++++++ 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/include/osgText/Text b/include/osgText/Text index e9f141f7e..1f29019b7 100644 --- a/include/osgText/Text +++ b/include/osgText/Text @@ -38,10 +38,6 @@ public: virtual const char* libraryName() const { return "osgText"; } - void setColor(const osg::Vec4& color); - const osg::Vec4& getColor() const { return _color; } - - /** * Turns off writing to the depth buffer when rendering text. This only affects text * with no backdrop or text using the DELAYED_DEPTH_WRITES implementation, since @@ -351,7 +347,6 @@ protected: String::iterator computeLastCharacterOnLine(osg::Vec2& cursor, String::iterator first,String::iterator last); // members which have public access. - osg::Vec4 _color; // iternal map used for rendering. Set up by the computeGlyphRepresentation() method. mutable TextureGlyphQuadMap _textureGlyphQuadMap; diff --git a/include/osgText/TextBase b/include/osgText/TextBase index 4aef20479..3e4ad6566 100644 --- a/include/osgText/TextBase +++ b/include/osgText/TextBase @@ -36,7 +36,8 @@ public: virtual const char* className() const { return "TextBase"; } virtual const char* libraryName() const { return "osgText"; } - + void setColor(const osg::Vec4& color); + const osg::Vec4& getColor() const { return _color; } /** Set the Font to use to render the text. * setFont(0) sets the use of the default font.*/ @@ -279,6 +280,7 @@ protected: // members which have public access. + osg::Vec4 _color; osg::ref_ptr _font; osg::ref_ptr