2 * Copyright (C) 2013-2018 Paul Davis <paul@linuxaudiosystems.com>
3 * Copyright (C) 2013 John Emmas <john@creativepost.co.uk>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #include "evoral/Note.h"
22 #include "canvas/note.h"
23 #include "canvas/debug.h"
26 #include "public_editor.h"
28 using namespace ARDOUR;
29 using ArdourCanvas::Coord;
30 using ArdourCanvas::Duple;
33 MidiRegionView& region, ArdourCanvas::Item* parent, const boost::shared_ptr<NoteType> note, bool with_events)
34 : NoteBase (region, with_events, note)
35 , _note (new ArdourCanvas::Note (parent))
37 CANVAS_DEBUG_NAME (_note, "note");
47 Note::move_event (double dx, double dy)
49 _note->set (_note->get().translate (Duple (dx, dy)));
77 Note::set_outline_color (uint32_t color)
79 _note->set_outline_color (color);
83 Note::set_fill_color (uint32_t color)
85 _note->set_fill_color (color);
101 Note::set (ArdourCanvas::Rect rect)
107 Note::set_x0 (Coord x0)
113 Note::set_y0 (Coord y0)
119 Note::set_x1 (Coord x1)
125 Note::set_y1 (Coord y1)
131 Note::set_outline_what (ArdourCanvas::Rectangle::What what)
133 _note->set_outline_what (what);
137 Note::set_outline_all ()
139 _note->set_outline_all ();
143 Note::set_ignore_events (bool ignore)
145 _note->set_ignore_events (ignore);
149 Note::set_velocity (double fract)
151 _note->set_velocity (fract);