From dab1c791276c4e6a29686d5888fffef2c106b6f2 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 29 Sep 2010 12:45:35 +0000 Subject: [PATCH] Moved handling of character aspect ratio into osgText::Style. --- examples/osgtext3D/osgtext3D_orig.cpp | 1 + include/osgText/Text3D | 9 --------- include/osgText/TextBase | 24 ++++++++++++++++++++---- src/osgText/Text.cpp | 10 +++++----- src/osgText/Text3D.cpp | 9 +++------ src/osgText/TextBase.cpp | 16 +++++++++++----- 6 files changed, 40 insertions(+), 29 deletions(-) diff --git a/examples/osgtext3D/osgtext3D_orig.cpp b/examples/osgtext3D/osgtext3D_orig.cpp index 7ff252775..6fbc2f7f4 100644 --- a/examples/osgtext3D/osgtext3D_orig.cpp +++ b/examples/osgtext3D/osgtext3D_orig.cpp @@ -86,6 +86,7 @@ osg::Group* create3DText(const osg::Vec3& center,float radius) osg::ref_ptr bevel = new osgText::Bevel; bevel->roundedBevel2(0.25); style->setBevel(bevel.get()); + style->setWidthRatio(0.4f); osgText::Text3D* text7 = new osgText::Text3D; text7->setFont("fonts/times.ttf"); diff --git a/include/osgText/Text3D b/include/osgText/Text3D index 08e82ee21..eb5a59df3 100644 --- a/include/osgText/Text3D +++ b/include/osgText/Text3D @@ -43,14 +43,6 @@ public: META_Object(osgText,Text3D) - - /** Set the text style.*/ - void setStyle(Style* style) { _style = style; } - /** Get the text style.*/ - Style* getStyle() { return _style.get(); } - /** Get the const text style.*/ - const Style* getStyle() const { return _style.get(); } - /** Get the Charactere Depth of text. */ float getCharacterDepth() const; @@ -148,7 +140,6 @@ protected: TextRenderInfo _textRenderInfo; - osg::ref_ptr