X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fcanvas%2Fcanvas%2Ffill.h;h=9eddeec6b606984e990048cc4776f561fae695b2;hb=c4c7598adbc9e5eca5fe04a23bb7e88fc0989f34;hp=ae87edb2dc1c6899618d115f1ce18dc3432167f9;hpb=e1b0f1bd0b03c071d2b5987e4ab75ef059e32111;p=ardour.git diff --git a/libs/canvas/canvas/fill.h b/libs/canvas/canvas/fill.h index ae87edb2dc..9eddeec6b6 100644 --- a/libs/canvas/canvas/fill.h +++ b/libs/canvas/canvas/fill.h @@ -22,14 +22,21 @@ #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); @@ -44,14 +51,22 @@ public: typedef std::vector > StopList; - void set_gradient (StopList const & stops, double height); + 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; - Cairo::RefPtr _gradient; + bool _transparent; + StopList _stops; + bool _vertical_gradient; + Cairo::RefPtr _pattern; + }; }