#include "bezier.hh"
#include "lily-proto.hh"
-
+#include "lily-guile.hh"
/**
- Implement bow specific bezier curve
- */
+ Implement bow specific bezier curve. Calculate bezier curve for bow
+ from bow paratime_signatures. */
class Bezier_bow
{
-public:
- Bezier_bow (Paper_def* paper_l);
-
- /**
- Calculate bezier curve for bow from bow paratime_signatures.
- */
+ Bezier curve_;
+ Array<Offset> encompass_;
+
void blow_fit ();
- void calc ();
- Real calc_f (Real height);
- void calc_bezier ();
- bool calc_clipping ();
- void calc_controls ();
- void check_sanity () const;
- void calc_default (Real h);
- void calc_return (Real begin_alpha, Real end_alpha);
+ void de_uglyfy ();
+ void calc_default ();
+ void to_canonic_form ();
void calc_tangent_controls ();
- bool check_fit_b () const;
- Real check_fit_f () const;
- void set (Array<Offset> points, Direction dir);
- void transform ();
- void transform_back ();
+ Real calc_enclosed_area_f () const;
+ void minimise_enclosed_area ();
+ Array<Offset> area_gradient_offset_arr ();
+
+ Real fit_factor () const;
- Array<Offset> encompass_;
Paper_def* paper_l_;
Direction dir_;
Real alpha_;
Offset origin_;
+public:
+ Real rc_factor_;
+ Real height_limit_;
+ Real ratio_;
- Bezier curve_;
- Bezier return_;
+ Real vertical_offset_needed () const;
+
+ Bezier_bow (Array<Offset> points, Direction dir);
+ void calculate ();
+ Bezier get_curve () const;
};