- Bezier ();
-
- /**
- Calculate bezier curve into Offset (x,y) array.
- */
- void calc (int steps);
- void print () const;
-
- void set (Array<Offset> points);
-
- /**
- Return y that goes with x by interpolation.
- */
- Real y (Real x);
-
- Curve curve_;
- Curve control_;
+ void assert_sanity () const;
+ void scale (Real x, Real y);
+ void reverse ();
+ void rotate (Real);
+ void translate (Offset);
+ void subdivide (Real, Bezier *, Bezier *) const;
+ Bezier extract (Real, Real) const;
+
+ Real get_other_coordinate (Axis a, Real x) const;
+ vector<Real> solve_point (Axis, Real coordinate) const;
+ vector<Real> solve_derivative (Offset) const;
+ Interval extent (Axis) const;
+ Interval control_point_extent (Axis) const;
+
+ Polynomial polynomial (Axis)const;
+ Offset curve_point (Real t) const;
+ Real curve_coordinate (Real t, Axis) const;
+
+ static const int CONTROL_COUNT = 4;
+
+ /*
+ Bezier curves always have 4 control points. Making this into an
+ vector<> gives unnecessary overhead, and makes debugging a royal
+ pain. */
+
+ Offset control_[4];