source file of the GNU LilyPond music typesetter
- (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 1998--1999 Jan Nieuwenhuizen <janneke@gnu.org>
*/
#include <math.h>
#include "misc.hh"
#ifndef STANDALONE
+#include "dimensions.hh"
#include "direction.hh"
-#include "dimension.hh"
#include "paper-def.hh"
#include "debug.hh"
#include "main.hh"
}
}
+void
+Bezier::print () const
+{
+#ifndef NPRINT
+ if (check_debug && !monitor->silent_b ("Bezier_controls"))
+ {
+ if (control_[1].length ())
+ {
+ cout << "Bezier\n";
+ cout << "Controls: ";
+ for (int i=0; i < control_.size (); i++)
+ cout << control_[i].str () << ", ";
+// cout << "\n";
+ }
+ }
+#endif
+}
+
void
Bezier::set (Array<Offset> points)
{
void
Bezier_bow::calc ()
{
+#ifndef NPRINT
+// if (check_debug && !monitor->silent_b ("Bezier_bow_controls"))
+ if (check_debug && !(monitor->silent_b ("Bezier_controls")
+ && monitor->silent_b ("Bezier_bow_controls")))
+ {
+ cout << "Before transform*********\n";
+ print ();
+ cout << "************************\n";
+ }
+#endif
transform ();
+ print ();
calc_controls ();
+ print ();
transform_back ();
+#ifndef NPRINT
+// if (check_debug && !monitor->silent_b ("Bezier_bow_controls"))
+ if (check_debug && !(monitor->silent_b ("Bezier_controls")
+ && monitor->silent_b ("Bezier_bow_controls")))
+ {
+ cout << "After transform*********\n";
+ print ();
+ cout << "************************\n";
+ }
+#endif
}
/*
return dy;
}
+void
+Bezier_bow::print () const
+{
+#ifndef NPRINT
+ Bezier::print ();
+ if (check_debug && !monitor->silent_b ("Bezier_bow_controls"))
+ {
+ cout << "Bezier_bow\n";
+ cout << "Encompass: ";
+ for (int i=0; i < encompass_.size (); i++)
+ cout << encompass_[i].str () << ", ";
+// cout << "\n";
+ }
+#endif
+}
+
void
Bezier_bow::set (Array<Offset> points, int dir)
{
Real indent = alpha * atan (beta * b);
Real height = indent + h;
-#define RESIZE_ICE
-#ifndef RESIZE_ICE
Array<Offset> control;
control.push (Offset (0, 0));
control.push (Offset (indent, height));
control.push (Offset (b - indent, height));
control.push (Offset (b, 0));
-#else
- Array<Offset> control (4);
- control[0] = Offset (0, 0);
- control[1] = Offset (indent, height);
- control[2] = Offset (b - indent, height);
- control[3] = Offset (b, 0);
-#endif
Bezier::set (control);
}