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