2 Copyright (C) 2007 Paul Davis
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
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include "evoral/Note.hpp"
21 #include "canvas/polygon.h"
22 #include "midi_region_view.h"
23 #include "public_editor.h"
27 using namespace ARDOUR;
28 using namespace ArdourCanvas;
31 MidiRegionView& region,
34 const boost::shared_ptr<NoteType> note,
36 : NoteBase (region, with_events, note)
38 _polygon = new ArdourCanvas::Polygon (group);
43 Hit::move_event (double dx, double dy)
45 _polygon->move (Duple (dx, dy));
51 boost::optional<ArdourCanvas::Rect> bbox = _polygon->bounding_box ();
59 boost::optional<ArdourCanvas::Rect> bbox = _polygon->bounding_box ();
67 boost::optional<ArdourCanvas::Rect> bbox = _polygon->bounding_box ();
75 boost::optional<ArdourCanvas::Rect> bbox = _polygon->bounding_box ();
81 Hit::set_outline_color (uint32_t color)
83 _polygon->set_outline_color (color);
87 Hit::set_fill_color (uint32_t color)
89 _polygon->set_fill_color (color);
105 Hit::set_height (Distance /*height*/)
111 Hit::set_position (Duple position)
113 _polygon->set_position (position);