libcanvas: reapply LineSet::add_line -> add_coord change after rebase conflicts with master

This commit is contained in:
Paul Davis 2021-05-10 15:12:38 -06:00
parent 19768953bf
commit 82bad0725a
5 changed files with 10 additions and 11 deletions

View File

@ -66,11 +66,11 @@ GridLines::draw (std::vector<Ruler::Mark> marks)
samplepos_t s = m->position;
if ((*m).style == ArdourCanvas::Ruler::Mark::Major) {
lines.add_line (PublicEditor::instance().sample_to_pixel_unrounded (s), 1.0, major_color);
lines.add_coord (PublicEditor::instance().sample_to_pixel_unrounded (s), 1.0, major_color);
} else if ((*m).style == ArdourCanvas::Ruler::Mark::Minor) {
lines.add_line (PublicEditor::instance().sample_to_pixel_unrounded (s), 1.0, minor_color);
lines.add_coord (PublicEditor::instance().sample_to_pixel_unrounded (s), 1.0, minor_color);
} else {
lines.add_line (PublicEditor::instance().sample_to_pixel_unrounded (s), 1.0, micro_color);
lines.add_coord (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_line (y, 1.0, UIConfiguration::instance().color ("piano roll black outline"));
_note_lines->add_coord (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_line (mid, h, color);
_note_lines->add_coord (mid, h, color);
}
prev_y = y;

View File

@ -21,7 +21,7 @@
#ifndef __CANVAS_BOX_H__
#define __CANVAS_BOX_H__
#include "canvas/item.h"
#include "canvas/rectangle.h"
namespace ArdourCanvas
{
@ -39,7 +39,7 @@ class Rectangle;
*
* Other?
*/
class LIBCANVAS_API Box : public Item
class LIBCANVAS_API Box : public Rectangle
{
public:
enum Orientation {
@ -77,11 +77,10 @@ public:
void child_changed (bool bbox_changed);
private:
Rectangle *self;
bool collapse_on_hide;
bool homogenous;
bool ignore_child_changes;
void reset_self ();
void reposition_children ();
};

View File

@ -47,7 +47,7 @@ public:
void set_extent (Distance);
Distance extent() const { return _extent; }
void add_line (Coord, Distance, Gtkmm2ext::Color);
void add_coord (Coord, Distance, Gtkmm2ext::Color);
void clear ();
struct Line {

View File

@ -131,7 +131,7 @@ LineSet::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
}
void
LineSet::add_line (Coord y, Distance width, Gtkmm2ext::Color color)
LineSet::add_coord (Coord y, Distance width, Gtkmm2ext::Color color)
{
begin_change ();