for (PortGroup::BundleList::const_iterator j = bundles.begin (); j != bundles.end(); ++j) {
Gdk::Color c = j->has_colour ? j->colour : get_a_bundle_colour (N);
- render_bundle_name (cr, c, x, 0, j->bundle);
+ render_bundle_name (cr, background_colour (), c, x, 0, j->bundle);
if (_matrix->show_only_bundles()) {
x += grid_spacing();
for (uint32_t k = 0; k < j->bundle->nchannels(); ++k) {
Gdk::Color c = j->has_colour ? j->colour : get_a_bundle_colour (N);
- render_channel_name (cr, c, x, 0, ARDOUR::BundleChannel (j->bundle, k));
+ render_channel_name (cr, background_colour (), c, x, 0, ARDOUR::BundleChannel (j->bundle, k));
x += grid_spacing();
}
void
PortMatrixColumnLabels::render_bundle_name (
- cairo_t* cr, Gdk::Color colour, double xoff, double yoff, boost::shared_ptr<ARDOUR::Bundle> b
+ cairo_t* cr, Gdk::Color fg_colour, Gdk::Color bg_colour, double xoff, double yoff, boost::shared_ptr<ARDOUR::Bundle> b
)
{
- set_source_rgb (cr, colour);
+ set_source_rgb (cr, bg_colour);
double w = 0;
if (_matrix->show_only_bundles()) {
cairo_line_to (cr, x_, y_);
cairo_line_to (cr, xoff, y);
cairo_fill_preserve (cr);
- set_source_rgb (cr, background_colour());
+ set_source_rgb (cr, fg_colour);
cairo_set_line_width (cr, label_border_width());
cairo_stroke (cr);
void
PortMatrixColumnLabels::render_channel_name (
- cairo_t* cr, Gdk::Color colour, double xoff, double yoff, ARDOUR::BundleChannel const &bc
+ cairo_t* cr, Gdk::Color fg_colour, Gdk::Color bg_colour, double xoff, double yoff, ARDOUR::BundleChannel const &bc
)
{
vector<pair<double, double> > const shape = port_name_shape (xoff, yoff);
}
cairo_line_to (cr, shape[0].first, shape[0].second);
- set_source_rgb (cr, colour);
+ set_source_rgb (cr, bg_colour);
cairo_fill_preserve (cr);
- set_source_rgb (cr, background_colour());
+ set_source_rgb (cr, fg_colour);
cairo_set_line_width (cr, label_border_width());
cairo_stroke (cr);
if (_matrix->show_only_bundles()) {
_body->queue_draw_area (
- component_to_parent_x (channel_x (bc)),
- component_to_parent_y (0),
- grid_spacing() + _height * tan (angle()),
- _height
+ component_to_parent_x (channel_x (bc)) - 1,
+ component_to_parent_y (0) - 1,
+ grid_spacing() + _height * tan (angle()) + 2,
+ _height + 2
);
} else {
if (_matrix->arrangement() == PortMatrix::TOP_TO_RIGHT) {
_body->queue_draw_area (
- component_to_parent_x (x),
- component_to_parent_y (_height - h),
- grid_spacing() + lc * cos (angle()),
- h
+ component_to_parent_x (x) - 1,
+ component_to_parent_y (_height - h) - 1,
+ grid_spacing() + lc * cos (angle()) + 2,
+ h + 2
);
} else if (_matrix->arrangement() == PortMatrix::LEFT_TO_BOTTOM) {
double const x_ = x + slanted_height() / tan (angle()) - lc * cos (angle());
_body->queue_draw_area (
- component_to_parent_x (x_),
- component_to_parent_y (0),
- grid_spacing() + lc * cos (angle()),
- h
+ component_to_parent_x (x_) - 1,
+ component_to_parent_y (0) - 1,
+ grid_spacing() + lc * cos (angle()) + 2,
+ h + 2
);
}
}
private:
- void render_bundle_name (cairo_t *, Gdk::Color, double, double, boost::shared_ptr<ARDOUR::Bundle>);
- void render_channel_name (cairo_t *, Gdk::Color, double, double, ARDOUR::BundleChannel const &);
+ void render_bundle_name (cairo_t *, Gdk::Color, Gdk::Color, double, double, boost::shared_ptr<ARDOUR::Bundle>);
+ void render_channel_name (cairo_t *, Gdk::Color, Gdk::Color, double, double, ARDOUR::BundleChannel const &);
double channel_x (ARDOUR::BundleChannel const &) const;
double channel_y (ARDOUR::BundleChannel const &) const;
void queue_draw_for (ARDOUR::BundleChannel const &);
if (_matrix->show_only_bundles()) {
render_bundle_name (
cr,
+ mouseover_line_colour(),
highlighted_channel_colour(),
component_to_parent_x (channel_x (*i)),
component_to_parent_y (channel_y (*i)),
} else {
render_channel_name (
cr,
+ mouseover_line_colour(),
highlighted_channel_colour(),
component_to_parent_x (channel_x (*i)),
component_to_parent_y (channel_y (*i)),
void add_channel_highlight (ARDOUR::BundleChannel const &);
private:
- virtual void render_channel_name (cairo_t *, Gdk::Color, double, double, ARDOUR::BundleChannel const &) = 0;
- virtual void render_bundle_name (cairo_t *, Gdk::Color, double, double, boost::shared_ptr<ARDOUR::Bundle>) = 0;
+ virtual void render_channel_name (cairo_t *, Gdk::Color, Gdk::Color, double, double, ARDOUR::BundleChannel const &) = 0;
+ virtual void render_bundle_name (cairo_t *, Gdk::Color, Gdk::Color, double, double, boost::shared_ptr<ARDOUR::Bundle>) = 0;
virtual double channel_x (ARDOUR::BundleChannel const &) const = 0;
virtual double channel_y (ARDOUR::BundleChannel const &) const = 0;
virtual void queue_draw_for (ARDOUR::BundleChannel const &) = 0;
PortGroup::BundleList const & bundles = (*i)->bundles ();
for (PortGroup::BundleList::const_iterator j = bundles.begin(); j != bundles.end(); ++j) {
- render_bundle_name (cr, j->has_colour ? j->colour : get_a_bundle_colour (N), 0, y, j->bundle);
+ render_bundle_name (cr, background_colour (), j->has_colour ? j->colour : get_a_bundle_colour (N), 0, y, j->bundle);
if (!_matrix->show_only_bundles()) {
for (uint32_t k = 0; k < j->bundle->nchannels(); ++k) {
Gdk::Color c = j->has_colour ? j->colour : get_a_bundle_colour (M);
- render_channel_name (cr, c, 0, y, ARDOUR::BundleChannel (j->bundle, k));
+ render_channel_name (cr, background_colour (), c, 0, y, ARDOUR::BundleChannel (j->bundle, k));
y += grid_spacing();
++M;
}
void
PortMatrixRowLabels::render_bundle_name (
- cairo_t* cr, Gdk::Color colour, double xoff, double yoff, boost::shared_ptr<ARDOUR::Bundle> b
+ cairo_t* cr, Gdk::Color fg_colour, Gdk::Color bg_colour, double xoff, double yoff, boost::shared_ptr<ARDOUR::Bundle> b
)
{
double const x = bundle_name_x ();
int const n = _matrix->show_only_bundles() ? 1 : b->nchannels();
- set_source_rgb (cr, colour);
+ set_source_rgb (cr, bg_colour);
cairo_rectangle (cr, xoff + x, yoff, _longest_bundle_name + name_pad() * 2, grid_spacing() * n);
cairo_fill_preserve (cr);
- set_source_rgb (cr, background_colour());
+ set_source_rgb (cr, fg_colour);
cairo_set_line_width (cr, label_border_width ());
cairo_stroke (cr);
void
PortMatrixRowLabels::render_channel_name (
- cairo_t* cr, Gdk::Color colour, double xoff, double yoff, ARDOUR::BundleChannel const& bc
+ cairo_t* cr, Gdk::Color fg_colour, Gdk::Color bg_colour, double xoff, double yoff, ARDOUR::BundleChannel const& bc
)
{
- set_source_rgb (cr, colour);
+ set_source_rgb (cr, bg_colour);
cairo_rectangle (cr, port_name_x() + xoff, yoff, _longest_port_name + name_pad() * 2, grid_spacing());
cairo_fill_preserve (cr);
- set_source_rgb (cr, background_colour());
+ set_source_rgb (cr, fg_colour);
cairo_set_line_width (cr, label_border_width ());
cairo_stroke (cr);
if (_matrix->show_only_bundles()) {
_body->queue_draw_area (
- component_to_parent_x (bundle_name_x()),
- component_to_parent_y (channel_y (bc)),
- _longest_bundle_name + name_pad() * 2,
- grid_spacing()
+ component_to_parent_x (bundle_name_x()) - 1,
+ component_to_parent_y (channel_y (bc)) - 1,
+ _longest_bundle_name + name_pad() * 2 + 2,
+ grid_spacing() + 2
);
} else {
_body->queue_draw_area (
- component_to_parent_x (port_name_x()),
- component_to_parent_y (channel_y (bc)),
- _longest_port_name + name_pad() * 2,
- grid_spacing()
+ component_to_parent_x (port_name_x()) - 1,
+ component_to_parent_y (channel_y (bc)) - 1,
+ _longest_port_name + name_pad() * 2 + 2,
+ grid_spacing() + 2
);
}
}
void mouseover_changed (PortMatrixNode const &);
private:
- void render_channel_name (cairo_t *, Gdk::Color, double, double, ARDOUR::BundleChannel const &);
- void render_bundle_name (cairo_t *, Gdk::Color, double, double, boost::shared_ptr<ARDOUR::Bundle>);
+ void render_channel_name (cairo_t *, Gdk::Color, Gdk::Color, double, double, ARDOUR::BundleChannel const &);
+ void render_bundle_name (cairo_t *, Gdk::Color, Gdk::Color, double, double, boost::shared_ptr<ARDOUR::Bundle>);
double channel_x (ARDOUR::BundleChannel const &) const;
double channel_y (ARDOUR::BundleChannel const &) const;