]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/bezier.hh
release: 1.0.1
[lilypond.git] / lily / include / bezier.hh
index 5f5c59d7b43864ff3b18faa5386babbc1c19ff02..80140377009c23682c838a9772dbb6d79991301d 100644 (file)
@@ -1,14 +1,18 @@
 /*
   bezier.hh -- declare Bezier and Bezier_bow
 
-  (c) 1998 Jan Nieuwenhuizen <jan@digicash.com>
+  (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #ifndef BEZIER_HH
 #define BEZIER_HH
 
+#ifndef STANDALONE
 #include "lily-proto.hh"
+#endif
+
 #include "real.hh"
+#include "curve.hh"
 
 /**
   Simple bezier curve
 class Bezier
 {
 public:
-  Bezier (int steps_i);
-  virtual ~Bezier ();
+  Bezier ();
 
   /**
   Calculate bezier curve into Offset (x,y) array.
   */
-  void calc (Offset control[4]);
+  void calc (int steps);
+
+  void set (Array<Offset> points);
 
   /**
   Return y that goes with x by interpolation.
   */
   Real y (Real x);
 
-  int steps_i_;
-  Offset* curve_;
+  Curve curve_;
+  Curve control_;
 };
 
 /**
@@ -42,11 +47,31 @@ public:
   Bezier_bow (Paper_def* paper_l);
 
   /**
-   Calculate bezier curve for bow from bow parameters.
+   Calculate bezier curve for bow from bow paratime_signatures.
    */
-  void calc (Real dx, Real dy, Real h, Real d);
+  void blow_fit ();
+  void calc ();
+  Real calc_f (Real height);
+  void calc_bezier ();
+  bool calc_clipping ();
+  void calc_controls ();
+  void calc_default (Real h);
+  void calc_return (Real begin_alpha, Real end_alpha);
+  void calc_tangent_controls ();
+  bool check_fit_bo ();
+  Real check_fit_f ();
+  void set (Array<Offset> points, int dir);
+  void transform ();
+  void transform_back ();
+
   Paper_def* paper_l_;
+  Curve encompass_;
+  int dir_;
+  Real alpha_;
+  Offset origin_;
+  Curve return_;
 };
 
 
 #endif // BEZIER_HH
+