From Terry Welsh, .osg and .ive support for new Text boxes

This commit is contained in:
Robert Osfield
2009-07-28 06:00:03 +00:00
parent fcaec80dc9
commit 91f53369a3
3 changed files with 43 additions and 1 deletions

View File

@@ -75,6 +75,12 @@ void Text::write(DataOutputStream* out){
out->writeVec4(getColor());
out->writeUInt(getDrawMode());
if ( out->getVersion() >= VERSION_0041 )
{
out->writeFloat(getBoundingBoxMargin());
out->writeVec4(getBoundingBoxColor());
}
if ( out->getVersion() >= VERSION_0028 )
{
out->writeUInt(getBackdropType());
@@ -189,6 +195,12 @@ void Text::read(DataInputStream* in){
setColor(in->readVec4());
setDrawMode(in->readUInt());
if ( in->getVersion() >= VERSION_0041 )
{
setBoundingBoxMargin(in->readFloat());
setBoundingBoxColor(in->readVec4());
}
if ( in->getVersion() >= VERSION_0028 )
{
setBackdropType((osgText::Text::BackdropType) in->readUInt());