remove all xml++.h inclusion by canvas implementations
[ardour.git] / libs / canvas / polygon.cc
1 #include "canvas/polygon.h"
2
3 using namespace ArdourCanvas;
4
5 Polygon::Polygon (Group* parent)
6         : Item (parent)
7         , PolyItem (parent)
8         , Fill (parent)
9 {
10
11 }
12
13 void
14 Polygon::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
15 {
16         if (_outline) {
17                 setup_outline_context (context);
18                 render_path (area, context);
19                 
20                 if (!_points.empty ()) {
21                         context->move_to (_points.front().x, _points.front().y);
22                 }
23
24                 context->stroke_preserve ();
25         }
26
27         if (_fill) {
28                 setup_fill_context (context);
29                 context->fill ();
30         }
31 }
32