]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/bezier-bow.hh
2997fa52e356f32708f7c022bc8bbebbb4785667
[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 #include "lily-guile.hh"
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 ();
27   void to_canonic_form ();
28   void calc_tangent_controls ();
29   Real calc_enclosed_area_f () const;
30   void minimise_enclosed_area ();
31
32   Real fit_factor () const;
33
34
35   Paper_def* paper_l_;
36   Direction dir_;
37   Real alpha_;
38   Offset origin_;
39 public:
40   Real  rc_factor_;
41   Real height_limit_;
42   Real ratio_;
43
44
45   Real vertical_offset_needed () const;
46   
47   Bezier_bow (Array<Offset> points, Direction dir);
48   void calculate ();
49   Bezier get_curve () const;
50 };
51
52
53 #endif /* BEZIER_BOW_HH */
54