drop use of bounding box to determine whether an item covers a point; add Item::cover...
[ardour.git] / libs / canvas / canvas / fill.h
index fa6b12e9f8d5d3ddfece8e5407c19cbf6685c76b..f52260c571367c689cf5a97a0353a40d6805a5ad 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef __CANVAS_FILL_H__
 #define __CANVAS_FILL_H__
 
+#include <vector>
 #include <stdint.h>
 #include "canvas/item.h"
 
@@ -40,12 +41,19 @@ public:
        bool fill () const {
                return _fill;
        }
+
+        typedef std::vector<std::pair<double,Color> > StopList;
        
+        void set_gradient (StopList const & stops, bool is_vertical);
+
 protected:
        void setup_fill_context (Cairo::RefPtr<Cairo::Context>) const;
-       
+        void setup_gradient_context (Cairo::RefPtr<Cairo::Context>, Rect const &, Duple const &) const;
+               
        Color _fill_color;
        bool _fill;
+        StopList _stops;
+        bool _vertical_gradient;
 };
 
 }