2 Copyright (C) 2007 Paul Davis
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include "evoral/Note.hpp"
23 #include "canvas/note.h"
24 #include "canvas/debug.h"
27 #include "public_editor.h"
29 using namespace ARDOUR;
30 using ArdourCanvas::Coord;
31 using ArdourCanvas::Duple;
34 MidiRegionView& region, ArdourCanvas::Item* parent, const boost::shared_ptr<NoteType> note, bool with_events)
35 : NoteBase (region, with_events, note)
36 , _note (new ArdourCanvas::Note (parent))
38 CANVAS_DEBUG_NAME (_note, "note");
48 Note::move_event (double dx, double dy)
50 _note->set (_note->get().translate (Duple (dx, dy)));
78 Note::set_outline_color (uint32_t color)
80 _note->set_outline_color (color);
84 Note::set_fill_color (uint32_t color)
86 _note->set_fill_color (color);
102 Note::set (ArdourCanvas::Rect rect)
108 Note::set_x0 (Coord x0)
114 Note::set_y0 (Coord y0)
120 Note::set_x1 (Coord x1)
126 Note::set_y1 (Coord y1)
132 Note::set_outline_what (ArdourCanvas::Rectangle::What what)
134 _note->set_outline_what (what);
138 Note::set_outline_all ()
140 _note->set_outline_all ();
144 Note::set_ignore_events (bool ignore)
146 _note->set_ignore_events (ignore);
150 Note::set_velocity (double fract)
152 _note->set_velocity (fract);