]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/bezier-bow.hh
release: 1.3.13
[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
19  */
20 class Bezier_bow
21 {
22 public:
23   Bezier_bow (Paper_def* paper_l);
24
25   /**
26    Calculate bezier curve for bow from bow paratime_signatures.
27    */
28   void blow_fit ();
29   void calc ();
30   Real calc_f (Real height);
31   void calc_bezier ();
32   bool calc_clipping ();
33   void calc_controls ();
34   void check_sanity () const;
35   void calc_default (Real h);
36   void calc_return (Real begin_alpha, Real end_alpha);
37   void calc_tangent_controls ();
38   bool check_fit_b () const;
39   Real check_fit_f () const;
40   void set (Array<Offset> points, Direction dir);
41   void transform ();
42   void transform_back ();
43
44   Array<Offset> encompass_;
45
46   Paper_def* paper_l_;
47   Direction dir_;
48   Real alpha_;
49   Offset origin_;
50
51
52   Bezier curve_;
53   Bezier return_;
54 };
55
56
57 #endif /* BEZIER_BOW_HH */
58