2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1998--2011 Jan Nieuwenhuizen <janneke@gnu.org>
6 LilyPond 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 3 of the License, or
9 (at your option) any later version.
11 LilyPond 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 LilyPond. If not, see <http://www.gnu.org/licenses/>.
23 #include "interval.hh"
25 #include "polynomial.hh"
33 void assert_sanity () const;
34 void scale (Real x, Real y);
37 void translate (Offset);
38 void subdivide (Real, Bezier *, Bezier *) const;
39 Bezier extract (Real, Real) const;
41 Real get_other_coordinate (Axis a, Real x) const;
42 vector<Real> solve_point (Axis, Real coordinate) const;
43 vector<Real> solve_derivative (Offset) const;
44 Interval extent (Axis) const;
45 Interval control_point_extent (Axis) const;
47 Polynomial polynomial (Axis)const;
48 Offset curve_point (Real t) const;
49 Real curve_coordinate (Real t, Axis) const;
51 static const int CONTROL_COUNT = 4;
54 Bezier curves always have 4 control points. Making this into an
55 vector<> gives unnecessary overhead, and makes debugging a royal
61 void scale (vector<Offset> *array, Real xscale, Real yscale);
62 void rotate (vector<Offset> *array, Real phi);
63 void translate (vector<Offset> *array, Offset o);
65 Bezier slur_shape (Real width, Real height_limit,
66 Real height_proportion);
67 Real slur_height (Real width, Real height_limit, Real height_proportion);
68 void get_slur_indent_height (Real *indent, Real *height, Real width, Real h_inf, Real r_0);