Checked in Macro Jez's additions to osgText to support .osg IO make it

a fully functioning NodeKit.

Also reimplement notify() to try an prevent a crash which has been caused by
to objects in notify.cpp being initiliazed twice, the second time the auto_ptr
holding the dev/null ofstream was being initilized to 0.
This commit is contained in:
Robert Osfield
2002-06-11 18:41:57 +00:00
parent e1ba8a6292
commit 247cb3ff7e
21 changed files with 958 additions and 149 deletions

View File

@@ -77,7 +77,7 @@ Font()
_created=false;
_pointSize=14;
_textureSize=0;
_textureSize=0;
_res=72;
}
@@ -101,6 +101,27 @@ Font::
clear();
}
void Font::copyAndInvalidate(Font &dest)
{
// delete destination's font object
delete dest._font;
// copy local data to destination object
dest._init = _init;
dest._created = _created;
dest._font = _font;
dest._fontName = _fontName;
dest._pointSize = _pointSize;
dest._res = _res;
dest._textureSize = _textureSize;
// invalidate this object
_init = false;
_created = false;
_font = 0;
_fontName = std::string();
}
bool Font::
open(const std::string& font)
{
@@ -269,7 +290,7 @@ TextureFont(const std::string& font,
int point_size):
RasterFont(font)
{
_textureSize=0;
_textureSize=0;
if(init(font))
{
}
@@ -280,10 +301,10 @@ RasterFont(font)
TextureFont::
TextureFont(const std::string& font,
int point_size,
int textureSize ):
int textureSize ):
RasterFont(font)
{
_textureSize=textureSize;
_textureSize=textureSize;
if(init(font))
{
}