source file of the GNU LilyPond music typesetter
- (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1996, 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include "debug.hh"
#include "molecule.hh"
#include "paper-outputter.hh"
-IMPLEMENT_IS_TYPE_B1(Spanner,Score_element);
+
void
Spanner::do_print() const
{
#ifndef NPRINT
- DOUT << "Between " << spanned_drul_[LEFT]->name ()
- << " and " << spanned_drul_[RIGHT]->name() << '\n';
+ DOUT << "Between " << classname (spanned_drul_[LEFT])
+ << " and " << classname (spanned_drul_[RIGHT]) << '\n';
if (broken_into_l_arr_.size())
{
DOUT << "with broken pieces:\n";
if (spanned_drul_[Direction(-d)] == spanned_drul_[d]
&& i)
- warning (_f ("Spanner `%s\' with equal left and right spanpoints", name ()));
+ warning (_f ("Spanner `%s\' with equal left and right spanpoints", classname (this)));
}
void
}
}
-Spanner*
-Spanner::access_Spanner ()
-{
- return this;
-}
-
Spanner::Spanner ()
{
unbroken_original_l_ =0;
}
void
-Spanner::do_brew_molecule ()
+Spanner::output_processing ()
{
if (transparent_b_)
return ;
- Molecule *output= brew_molecule_p ();
+ output_p_ = do_brew_molecule_p ();
Offset left_off (spanned_drul_[LEFT]->absolute_coordinate(X_AXIS), 0);
Offset o = absolute_offset() + left_off;
- pscore_l_->outputter_l_->output_molecule (output, o, name ());
- delete output;
+ pscore_l_->outputter_l_->output_molecule (output_p_, o, classname (this));
}
Interval
{
Real l = spanned_drul_[LEFT]->absolute_coordinate (X_AXIS);
Real r = spanned_drul_[RIGHT]->absolute_coordinate (X_AXIS);
- assert (r>=l);
+
+ if (r< l)
+ warning ("Spanner with negative length");
return Interval (0, r-l);
}