From ffb200e4f417e1f0dc4d08e3f5b6037f9beb2704 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 12 Dec 2002 11:36:08 +0000 Subject: [PATCH] Added the axis alignment into the Outline and Texture fonts drawing. --- src/osgText/Text.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/osgText/Text.cpp b/src/osgText/Text.cpp index ea8e295db..0c0ca4952 100644 --- a/src/osgText/Text.cpp +++ b/src/osgText/Text.cpp @@ -238,6 +238,8 @@ void Text::drawImplementation(State& state) const break; case OUTLINE: glTranslatef(drawPos.x(),drawPos.y(),drawPos.z()); + if(_axisAlignment==XZ_PLANE) glRotatef(90.0f,1.0f,0.0f,0.0f); + else if (_axisAlignment==YZ_PLANE) { glRotatef(90.0f,0.0f,0.0f,1.0f); glRotatef(90.0f,1.0f,0.0f,0.0f);} _font->output(state,_text.c_str()); break; case BITMAP: @@ -250,6 +252,8 @@ void Text::drawImplementation(State& state) const break; case TEXTURE: glTranslatef(drawPos.x(),drawPos.y(),drawPos.z()); + if(_axisAlignment==XZ_PLANE) glRotatef(90.0f,1.0f,0.0f,0.0f); + else if (_axisAlignment==YZ_PLANE) { glRotatef(90.0f,0.0f,0.0f,1.0f); glRotatef(90.0f,1.0f,0.0f,0.0f);} _font->output(state,_text.c_str()); break;