Ardour
9.0-pre0-582-g084a23a80d
framed_curve.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2016 Nick Mainsbridge <mainsbridge@gmail.com>
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License along
15
* with this program; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
*/
18
19
#ifndef __CANVAS_FRAMED_CURVE_H__
20
#define __CANVAS_FRAMED_CURVE_H__
21
22
#include "
canvas/visibility.h
"
23
24
#include "
canvas/interpolated_curve.h
"
25
#include "
canvas/poly_item.h
"
26
#include "
canvas/fill.h
"
27
28
/* similar to a Curve, with the first point being a height definition rather than a point to
29
interpolate.
30
*/
31
32
namespace
ArdourCanvas
{
33
34
class
LIBCANVAS_API
FramedCurve
:
public
PolyItem
,
public
InterpolatedCurve
35
{
36
public
:
37
FramedCurve
(
Canvas
*);
38
FramedCurve
(
Item
*);
39
40
enum
CurveFill
{
41
None
,
42
Inside
,
43
Outside
,
44
};
45
46
void
compute_bounding_box
()
const
;
47
void
render
(
Rect
const
& area, Cairo::RefPtr<Cairo::Context>)
const
;
48
void
set
(
Points
const
&);
49
50
void
set_points_per_segment
(uint32_t n);
51
52
void
set_fill_mode
(
CurveFill
cf) { curve_fill = cf; }
53
54
private
:
55
Points
samples
;
56
Points::size_type
n_samples
;
57
uint32_t
points_per_segment
;
58
CurveFill
curve_fill
;
59
60
void
interpolate
();
61
};
62
63
}
64
65
#endif
visibility.h
LIBCANVAS_API
#define LIBCANVAS_API
Definition:
canvas/canvas/visibility.h:39
ArdourCanvas::Canvas
Definition:
canvas/canvas/canvas.h:73
ArdourCanvas::FramedCurve
Definition:
framed_curve.h:35
ArdourCanvas::FramedCurve::interpolate
void interpolate()
ArdourCanvas::FramedCurve::set
void set(Points const &)
ArdourCanvas::FramedCurve::render
void render(Rect const &area, Cairo::RefPtr< Cairo::Context >) const
ArdourCanvas::FramedCurve::FramedCurve
FramedCurve(Canvas *)
ArdourCanvas::FramedCurve::samples
Points samples
Definition:
framed_curve.h:55
ArdourCanvas::FramedCurve::n_samples
Points::size_type n_samples
Definition:
framed_curve.h:56
ArdourCanvas::FramedCurve::curve_fill
CurveFill curve_fill
Definition:
framed_curve.h:58
ArdourCanvas::FramedCurve::CurveFill
CurveFill
Definition:
framed_curve.h:40
ArdourCanvas::FramedCurve::Inside
@ Inside
Definition:
framed_curve.h:42
ArdourCanvas::FramedCurve::Outside
@ Outside
Definition:
framed_curve.h:43
ArdourCanvas::FramedCurve::None
@ None
Definition:
framed_curve.h:41
ArdourCanvas::FramedCurve::set_points_per_segment
void set_points_per_segment(uint32_t n)
ArdourCanvas::FramedCurve::FramedCurve
FramedCurve(Item *)
ArdourCanvas::FramedCurve::points_per_segment
uint32_t points_per_segment
Definition:
framed_curve.h:57
ArdourCanvas::FramedCurve::compute_bounding_box
void compute_bounding_box() const
ArdourCanvas::FramedCurve::set_fill_mode
void set_fill_mode(CurveFill cf)
Definition:
framed_curve.h:52
ArdourCanvas::InterpolatedCurve
Definition:
interpolated_curve.h:28
ArdourCanvas::Item
Definition:
canvas/canvas/item.h:57
ArdourCanvas::PolyItem
Definition:
poly_item.h:31
fill.h
interpolated_curve.h
ArdourCanvas
Definition:
audio_clip_editor.h:56
ArdourCanvas::Points
std::vector< Duple > Points
Definition:
canvas/canvas/types.h:262
poly_item.h
ArdourCanvas::Rect
Definition:
canvas/canvas/types.h:112
libs
canvas
canvas
framed_curve.h
Generated on Wed Dec 25 2024 05:44:15 for Ardour by
1.9.1