Added support for set/getColor to ShapeDrawable.

This commit is contained in:
Robert Osfield
2003-04-16 20:02:15 +00:00
parent cad160fbe6
commit 0b0c6c4e60
3 changed files with 73 additions and 35 deletions

View File

@@ -123,12 +123,19 @@ class SG_EXPORT ShapeDrawable : public Drawable
virtual const char* libraryName() const { return "osg"; }
virtual const char* className() const { return "ShapeDrawable"; }
/** set the color of the shape.*/
void setColor(const Vec4& color) { _color = color; }
/** get the color of the shape.*/
const Vec4& getColor() const { return _color; }
void setTessellationHints(TessellationHints* hints) { _tessellationHints = hints; }
TessellationHints* getTessellationHints() { return _tessellationHints.get(); }
const TessellationHints* getTessellationHints() const { return _tessellationHints.get(); }
/** draw ShapeDrawable directly ignoring an OpenGL display list which could be attached.
* This is the internal draw method which does the drawing itself,
* and is the method to override when deriving from ShapeDrawable for user-drawn objects.
@@ -158,6 +165,8 @@ class SG_EXPORT ShapeDrawable : public Drawable
virtual bool computeBound() const;
Vec4 _color;
ref_ptr<TessellationHints> _tessellationHints;
};