Added new setFont(ref_ptr<>) variants to Text and Text3D

This commit is contained in:
Robert Osfield
2007-12-12 17:48:20 +00:00
parent 256391c3b4
commit 213a370c25
6 changed files with 108 additions and 11 deletions

View File

@@ -40,7 +40,10 @@ public:
/** Set the Font to use to render the text.
* setFont(0) sets the use of the default font.*/
void setFont(Font* font=0);
inline void setFont(Font* font=0) { setFont(osg::ref_ptr<Font>(font)); };
/** Set the Font to use to render the text.*/
void setFont(osg::ref_ptr<Font> font);
/** Set the font, loaded from the specified front file, to use to render the text,
* setFont("") sets the use of the default font.

View File

@@ -75,7 +75,11 @@ public:
/** Set the Font to use to render the text.
* setFont(0) sets the use of the default font.*/
void setFont(Font3D* font=0);
inline void setFont(Font3D* font=0) { setFont(osg::ref_ptr<Font3D>(font)); };
/** Set the Font to use to render the text.*/
void setFont(osg::ref_ptr<Font3D> font);
/** Set the font, loaded from the specified front file, to use to render the text,
* setFont("") sets the use of the default font.