mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
33 lines
550 B
C++
33 lines
550 B
C++
#include "pbd/xml++.h"
|
|
#include "canvas/polygon.h"
|
|
|
|
using namespace ArdourCanvas;
|
|
|
|
Polygon::Polygon (Group* parent)
|
|
: Item (parent)
|
|
, PolyItem (parent)
|
|
, Fill (parent)
|
|
{
|
|
|
|
}
|
|
|
|
void
|
|
Polygon::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
|
{
|
|
if (_outline) {
|
|
setup_outline_context (context);
|
|
render_path (area, context);
|
|
|
|
if (!_points.empty ()) {
|
|
context->move_to (_points.front().x, _points.front().y);
|
|
}
|
|
|
|
context->stroke_preserve ();
|
|
}
|
|
|
|
if (_fill) {
|
|
setup_fill_context (context);
|
|
context->fill ();
|
|
}
|
|
}
|
|
|