Implemented clipping of widget to the widgets extents.

This commit is contained in:
Robert Osfield
2014-05-23 18:59:16 +00:00
parent cca18e82e8
commit f50ec0fe8e
7 changed files with 78 additions and 49 deletions

View File

@@ -16,6 +16,7 @@
#include <osg/Object>
#include <osg/BoundingBox>
#include <osg/Texture2D>
#include <osg/Vec4>
#include <osgUI/AlignmentSettings>
@@ -48,10 +49,13 @@ public:
virtual osg::Node* createText(const osg::BoundingBox& extents, const AlignmentSettings* as, const TextSettings* textSettings, const std::string& text);
virtual osg::Node* createIcon(const osg::BoundingBox& extents, const std::string& filename);
virtual void setupDialogStateSet(osg::StateSet* stateset);
virtual void setupClipStateSet(const osg::BoundingBox& extents, osg::StateSet* stateset);
protected:
virtual ~Style() {}
osg::ref_ptr<osg::Texture2D> _clipTexture;
osg::Vec4 _backgroundColor;
osg::Vec4 _textColor;
osg::Vec4 _disabledTextColor;