Moved text color into TextBase, added support for colour into Text3D

This commit is contained in:
Robert Osfield
2010-11-18 17:59:55 +00:00
parent a5b83edc76
commit 5849634082
5 changed files with 13 additions and 14 deletions

View File

@@ -31,6 +31,7 @@ using namespace osgText;
//#define TREES_CODE_FOR_MAKING_SPACES_EDITABLE
TextBase::TextBase():
_color(1.0f,1.0f,1.0f,1.0f),
_fontSize(32,32),
_characterHeight(32),
_characterSizeMode(OBJECT_COORDS),
@@ -54,6 +55,7 @@ TextBase::TextBase():
TextBase::TextBase(const TextBase& textBase,const osg::CopyOp& copyop):
osg::Drawable(textBase,copyop),
_color(textBase._color),
_font(textBase._font),
_style(textBase._style),
_fontSize(textBase._fontSize),
@@ -81,6 +83,12 @@ TextBase::~TextBase()
{
}
void TextBase::setColor(const osg::Vec4& color)
{
_color = color;
}
void TextBase::setFont(osg::ref_ptr<Font> font)
{
if (_font==font) return;