13
0

use modified Canvas::LineSet API

This commit is contained in:
Paul Davis 2020-05-22 08:44:26 -06:00
parent b90332b439
commit b54c9b6a30
2 changed files with 6 additions and 7 deletions

View File

@ -56,7 +56,7 @@ void
GridLines::draw (std::vector<Ruler::Mark> marks)
{
lines.clear();
const uint32_t major_color = UIConfiguration::instance().color_mod("grid line major", "grid line");
const uint32_t minor_color = UIConfiguration::instance().color_mod("grid line minor", "grid line");
const uint32_t micro_color = UIConfiguration::instance().color_mod("grid line micro", "grid line");
@ -66,12 +66,11 @@ GridLines::draw (std::vector<Ruler::Mark> marks)
samplepos_t s = m->position;
if ((*m).style == ArdourCanvas::Ruler::Mark::Major) {
lines.add (PublicEditor::instance().sample_to_pixel_unrounded (s), 1.0, major_color);
lines.add_line (PublicEditor::instance().sample_to_pixel_unrounded (s), 1.0, major_color);
} else if ((*m).style == ArdourCanvas::Ruler::Mark::Minor) {
lines.add (PublicEditor::instance().sample_to_pixel_unrounded (s), 1.0, minor_color);
lines.add_line (PublicEditor::instance().sample_to_pixel_unrounded (s), 1.0, minor_color);
} else {
lines.add (PublicEditor::instance().sample_to_pixel_unrounded (s), 1.0, micro_color);
lines.add_line (PublicEditor::instance().sample_to_pixel_unrounded (s), 1.0, micro_color);
}
}
}

View File

@ -342,7 +342,7 @@ MidiStreamView::draw_note_lines()
*/
if (i <= highest_note()) {
_note_lines->add (y, 1.0, UIConfiguration::instance().color ("piano roll black outline"));
_note_lines->add_line (y, 1.0, UIConfiguration::instance().color ("piano roll black outline"));
}
/* now add a thicker line/bar which covers the entire vertical
@ -366,7 +366,7 @@ MidiStreamView::draw_note_lines()
double mid = y + (h/2.0);
if (mid >= 0 && h > 1.0) {
_note_lines->add (mid, h, color);
_note_lines->add_line (mid, h, color);
}
prev_y = y;