X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fbezier.cc;h=d516ff1c8d28d35aa5744749fdf663f99f1b8f3b;hb=5f42fe18c41237a73d99fd76b34e434a33598704;hp=e851e74f031b72e8274bbbcdf8c761dbb587d07f;hpb=1cf3d59c1559fb9774c4c1c8cae155cfe54a927c;p=lilypond.git diff --git a/lily/bezier.cc b/lily/bezier.cc index e851e74f03..d516ff1c8d 100644 --- a/lily/bezier.cc +++ b/lily/bezier.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998 Jan Nieuwenhuizen + (c) 1998--1999 Jan Nieuwenhuizen */ #include @@ -11,8 +11,8 @@ #include "misc.hh" #ifndef STANDALONE +#include "dimensions.hh" #include "direction.hh" -#include "dimension.hh" #include "paper-def.hh" #include "debug.hh" #include "main.hh" @@ -85,6 +85,24 @@ Bezier::calc (int steps) } } +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 points) { @@ -212,11 +230,33 @@ Bezier_bow::calc_f (Real height) 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 } /* @@ -474,6 +514,22 @@ Bezier_bow::check_fit_f () 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 points, int dir) { @@ -541,20 +597,11 @@ Bezier_bow::calc_default (Real h) Real indent = alpha * atan (beta * b); Real height = indent + h; -#define RESIZE_ICE -#ifndef RESIZE_ICE Array control; control.push (Offset (0, 0)); control.push (Offset (indent, height)); control.push (Offset (b - indent, height)); control.push (Offset (b, 0)); -#else - Array 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); }