]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/bezier-bow.hh
8734471e5eb702d7fa6464bd39ac16f6cd9125b0
[lilypond.git] / lily / include / bezier-bow.hh
1 /*   
2   bezier-bow.hh -- declare Bezier_bow
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #ifndef BEZIER_BOW_HH
11 #define BEZIER_BOW_HH
12
13 #include "bezier.hh"
14 #include "lily-proto.hh"
15
16
17 /**
18   Implement bow specific bezier curve. Calculate bezier curve for bow
19   from bow paratime_signatures.  */
20 class Bezier_bow
21 {
22   Bezier curve_;
23   Array<Offset> encompass_;
24
25   void blow_fit ();
26   void calc_default (Real h);
27   void to_canonic_form ();
28   void calc_tangent_controls ();
29   Real fit_factor () const;
30
31
32   Paper_def* paper_l_;
33   Direction dir_;
34   Real alpha_;
35   Offset origin_;
36 public:
37   Real  rc_factor_,
38     height_limit_,
39     ratio_;
40
41
42   Bezier_bow (Array<Offset> points, Direction dir);
43   void calculate ();
44   Bezier get_curve () const;
45 };
46
47
48 #endif /* BEZIER_BOW_HH */
49