Added setPosition and setWidth methods into ScalarBar and changed the

implementation to use these values to position and set the size of the
scalar bar.  Also made the characterSize value a float rather than
the previous int.
This commit is contained in:
Robert Osfield
2004-06-02 12:37:14 +00:00
parent 673244a60c
commit 7f94839e94
3 changed files with 73 additions and 117 deletions

View File

@@ -55,7 +55,7 @@ osg::Node* createScalarBar()
};
ColorRange* cr = new ColorRange(0.0f,1.0f,cs);
ScalarBar* sb = new ScalarBar(20, 11, cr, "ScalarBar", ScalarBar::VERTICAL, 4.0f, new MyScalarPrinter);
ScalarBar* sb = new ScalarBar(20, 11, cr, "ScalarBar", ScalarBar::VERTICAL, 0.1f, new MyScalarPrinter);
sb->setScalarPrinter(new MyScalarPrinter);
return sb;