X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=libs%2Fcanvas%2Fcanvas%2Ffill.h;h=42160a61907bbe09a803fff5062a9a4bef9e64cb;hb=fcad5a337fd4a7119fdd213ddb1df8eeb6a42bf4;hp=fa6b12e9f8d5d3ddfece8e5407c19cbf6685c76b;hpb=c1df3295c179b040a1d703d610e0f5a8b8dedb37;p=ardour.git diff --git a/libs/canvas/canvas/fill.h b/libs/canvas/canvas/fill.h index fa6b12e9f8..42160a6190 100644 --- a/libs/canvas/canvas/fill.h +++ b/libs/canvas/canvas/fill.h @@ -20,15 +20,23 @@ #ifndef __CANVAS_FILL_H__ #define __CANVAS_FILL_H__ +#include #include -#include "canvas/item.h" + +#include + +#include "canvas/visibility.h" +#include "canvas/types.h" namespace ArdourCanvas { -class Fill : virtual public Item +class Item; + +class LIBCANVAS_API Fill : public boost::noncopyable { public: - Fill (Group *); + Fill (Item& self); + virtual ~Fill() {} virtual void set_fill_color (Color); virtual void set_fill (bool); @@ -40,12 +48,25 @@ public: bool fill () const { return _fill; } - + + typedef std::vector > StopList; + + void set_gradient (StopList const & stops, bool is_vertical); + + void set_pattern (Cairo::RefPtr); + protected: void setup_fill_context (Cairo::RefPtr) const; - + void setup_gradient_context (Cairo::RefPtr, Rect const &, Duple const &) const; + + Item& _self; Color _fill_color; bool _fill; + bool _transparent; + StopList _stops; + bool _vertical_gradient; + Cairo::RefPtr _pattern; + }; }