mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-14 18:46:34 +01:00
initial implementation of a more specialized canvas item for (sustained) notes
This commit is contained in:
parent
5102d8fae1
commit
ed24e01658
2 changed files with 129 additions and 0 deletions
44
libs/canvas/canvas/note.h
Normal file
44
libs/canvas/canvas/note.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
Copyright (C) 2018 Paul Davis
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __CANVAS_NOTE_H__
|
||||
#define __CANVAS_NOTE_H__
|
||||
|
||||
#include "canvas/visibility.h"
|
||||
#include "canvas/rectangle.h"
|
||||
|
||||
namespace ArdourCanvas
|
||||
{
|
||||
|
||||
class LIBCANVAS_API Note : public Rectangle
|
||||
{
|
||||
public:
|
||||
Note (Canvas*);
|
||||
Note (Item*);
|
||||
|
||||
void render (Rect const &, Cairo::RefPtr<Cairo::Context>) const;
|
||||
void set_velocity (double fract);
|
||||
|
||||
private:
|
||||
static bool _show_velocity_bars;
|
||||
double _velocity;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* __CANVAS_NOTE_H__ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue