#include "ardour/session.h"
#include "ardour/value_as_string.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace std;
using namespace ARDOUR;
, _parent_group (parent)
, _offset (0)
, _maximum_time (max_framepos)
+ , _fill (false)
, _desc (desc)
{
if (converter) {
(*i)->set_size (bsz);
}
+ if (_fill) {
+ line->set_fill_y1 (_height);
+ } else {
+ line->set_fill_y1 (0);
+ }
reset ();
}
}
{
_line_color = color;
line->set_outline_color (color);
+
+ ArdourCanvas::SVAModifier mod = UIConfiguration::instance().modifier ("automation line fill");
+
+ line->set_fill_color ((color & 0xffffff00) + mod.a()*255);
}
void
/* TODO: This should be more generic (use ParameterDescriptor)
* or better yet: Controllable -> set_interface();
*/
+
if ( alist->parameter().type() == GainAutomation
|| alist->parameter().type() == EnvelopeAutomation
|| (_desc.logarithmic && _desc.lower == 0. && _desc.upper > _desc.lower)) {
} else if (alist->parameter().type() == PanAzimuthAutomation ||
alist->parameter().type() == PanElevationAutomation) {
y = 1.0 - y;
+ y = max ((double) _desc.lower, y);
+ y = min ((double) _desc.upper, y);
} else if (alist->parameter().type() == PanWidthAutomation) {
y = 2.0 * y - 1.0;
+ y = max ((double) _desc.lower, y);
+ y = min ((double) _desc.upper, y);
} else {
y = y * (double)(alist->get_max_y() - alist->get_min_y()) + alist->get_min_y();
if (_desc.integer_step) {
} else if (_desc.toggled) {
y = (y > 0.5) ? 1.0 : 0.0;
}
+ y = max ((double) _desc.lower, y);
+ y = min ((double) _desc.upper, y);
}
}