mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
initial commit of hand merging, plus getting "ancient" waf script to work correctly
This commit is contained in:
parent
1d8bac08c0
commit
aaea166135
244 changed files with 131902 additions and 7357 deletions
61
libs/canvas/fill.cc
Normal file
61
libs/canvas/fill.cc
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
#include "ardour/utils.h"
|
||||
|
||||
#include "pbd/xml++.h"
|
||||
#include "pbd/compose.h"
|
||||
#include "pbd/convert.h"
|
||||
|
||||
#include "canvas/fill.h"
|
||||
#include "canvas/utils.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace ArdourCanvas;
|
||||
|
||||
Fill::Fill (Group* parent)
|
||||
: Item (parent)
|
||||
, _fill_color (0x000000ff)
|
||||
, _fill (true)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
Fill::set_fill_color (Color color)
|
||||
{
|
||||
begin_change ();
|
||||
|
||||
_fill_color = color;
|
||||
|
||||
end_change ();
|
||||
}
|
||||
|
||||
void
|
||||
Fill::set_fill (bool fill)
|
||||
{
|
||||
begin_change ();
|
||||
|
||||
_fill = fill;
|
||||
|
||||
end_change ();
|
||||
}
|
||||
|
||||
void
|
||||
Fill::setup_fill_context (Cairo::RefPtr<Cairo::Context> context) const
|
||||
{
|
||||
set_source_rgba (context, _fill_color);
|
||||
}
|
||||
|
||||
void
|
||||
Fill::add_fill_state (XMLNode* node) const
|
||||
{
|
||||
node->add_property ("fill-color", string_compose ("%1", _fill_color));
|
||||
node->add_property ("fill", _fill ? "yes" : "no");
|
||||
}
|
||||
|
||||
void
|
||||
Fill::set_fill_state (XMLNode const * node)
|
||||
{
|
||||
_fill_color = atoll (node->property("fill-color")->value().c_str());
|
||||
_fill = PBD::string_is_affirmative (node->property("fill")->value ().c_str());
|
||||
|
||||
_bounding_box_dirty = true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue