if (li != _lines.end())
++li;
- line->property_color_rgba() = color;
+ line->set_outline_color (color);
- inserted_last_time = false; // don't search next time
++
// Use existing line, moving if necessary
} else if (!exhausted) {
Lines::iterator steal = _lines.end();
double const x = steal->first;
line = steal->second;
_lines.erase(steal);
- line->property_x1() = xpos;
- line->property_x2() = xpos;
- line->property_color_rgba() = color;
+ line->set_x0 (xpos);
+ line->set_x1 (xpos);
+ line->set_outline_color (color);
_lines.insert(make_pair(xpos, line));
- inserted_last_time = true; // search next time
invalidated = true;
// Shift clean range left
if (existing != _lines.end()) {
//cout << "*** EXISTING LINE" << endl;
li = existing;
- li->second->property_color_rgba() = color;
+ li->second->set_outline_color (color);
- inserted_last_time = false; // don't search next time
} else {
//cout << "*** MOVING LINE" << endl;
- const double x1 = line->property_x1();
+ const double x1 = line->x0();
const bool was_clean = x1 >= _clean_left && x1 <= _clean_right;
invalidated = invalidated || was_clean;
// Invalidate clean portion (XXX: too harsh?)
_clean_left = needed_left;
_clean_right = needed_right;
_lines.erase(li);
- line->property_color_rgba() = color;
- line->property_x1() = xpos;
- line->property_x2() = xpos;
+ line->set_outline_color (color);
+ line->set_x0 (xpos);
+ line->set_x1 (xpos);
_lines.insert(make_pair(xpos, line));
- inserted_last_time = true; // search next time
}
}
//cout << "*** CREATING LINE" << endl;
/* if we already have a line there ... don't sweat it */
if (_lines.find (xpos) == _lines.end()) {
- line = new ArdourCanvas::SimpleLine (*_group);
- line->property_x1() = xpos;
- line->property_x2() = xpos;
- line->property_y1() = 0.0;
- line->property_y2() = _height;
- line->property_color_rgba() = color;
+ line = new ArdourCanvas::Line (_group);
+ line->set_x0 (xpos);
+ line->set_x1 (xpos);
+ line->set_y0 (0.0);
+ line->set_y1 (_height);
+ line->set_outline_color (color);
_lines.insert(make_pair(xpos, line));
- inserted_last_time = true;
}
// Steal from the left
double const x = steal->first;
line = steal->second;
_lines.erase(steal);
- line->property_color_rgba() = color;
- line->property_x1() = xpos;
- line->property_x2() = xpos;
+ line->set_outline_color (color);
+ line->set_x0 (xpos);
+ line->set_x1 (xpos);
_lines.insert(make_pair(xpos, line));
- inserted_last_time = true; // search next time
invalidated = true;
// Shift clean range right