From Eric Sokolowski, added support for the new Text line spacing parameter to the .osg and .ive formats.
This commit is contained in:
@@ -94,6 +94,17 @@ bool Text_readLocalData(osg::Object &obj, osgDB::Input &fr)
|
||||
}
|
||||
}
|
||||
|
||||
if (fr[0].matchWord("lineSpacing"))
|
||||
{
|
||||
float height;
|
||||
if (fr[1].getFloat(height))
|
||||
{
|
||||
text.setLineSpacing(height);
|
||||
fr += 2;
|
||||
itAdvanced = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (fr.matchSequence("alignment %w"))
|
||||
{
|
||||
std::string str = fr[1].getStr();
|
||||
@@ -278,6 +289,11 @@ bool Text_writeLocalData(const osg::Object &obj, osgDB::Output &fw)
|
||||
{
|
||||
fw.indent() << "maximumHeight " << text.getMaximumHeight() << std::endl;
|
||||
}
|
||||
|
||||
if (text.getLineSpacing()>0.0f)
|
||||
{
|
||||
fw.indent() << "lineSpacing " << text.getLineSpacing() << std::endl;
|
||||
}
|
||||
|
||||
// alignment
|
||||
fw.indent() << "alignment ";
|
||||
|
||||
Reference in New Issue
Block a user