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