From Eric Sokolowski, added support for the new Text line spacing parameter to the .osg and .ive formats.
This commit is contained in:
@@ -28,8 +28,9 @@
|
||||
#define VERSION_0017 17
|
||||
#define VERSION_0018 18
|
||||
#define VERSION_0019 19
|
||||
#define VERSION_0020 20
|
||||
|
||||
#define VERSION VERSION_0019
|
||||
#define VERSION VERSION_0020
|
||||
|
||||
/* The BYTE_SEX tag is used to check the endian
|
||||
of the IVE file being read in. The IVE format
|
||||
|
||||
@@ -62,6 +62,9 @@ void Text::write(DataOutputStream* out){
|
||||
out->writeUInt(getCharacterSizeMode());
|
||||
out->writeFloat(getMaximumWidth());
|
||||
out->writeFloat(getMaximumHeight());
|
||||
|
||||
out->writeFloat(getLineSpacing());
|
||||
|
||||
out->writeUInt(getAlignment());
|
||||
|
||||
out->writeQuat(getRotation()); //FIXME: controllare che ci sia
|
||||
@@ -151,6 +154,11 @@ void Text::read(DataInputStream* in){
|
||||
setMaximumWidth(in->readFloat());
|
||||
setMaximumHeight(in->readFloat());
|
||||
|
||||
if ( in->getVersion() >= VERSION_0020 )
|
||||
{
|
||||
setLineSpacing(in->readFloat());
|
||||
}
|
||||
|
||||
setAlignment((osgText::Text::AlignmentType) in->readUInt());
|
||||
|
||||
//Nothing to do...
|
||||
|
||||
Reference in New Issue
Block a user