2 staffsym.cc -- implement Staff_symbol
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 #include "staff-symbol.hh"
10 #include "dimensions.hh"
11 #include "paper-def.hh"
12 #include "molecule.hh"
17 Staff_symbol::Staff_symbol ()
20 staff_line_leading_f_ = 5.0 PT;
24 Staff_symbol::do_print() const
28 DOUT << "lines: " << no_lines_i_;
33 Staff_symbol::do_height() const
35 Interval i =Interval (0, staff_line_leading_f_ * (no_lines_i_-1));
41 Staff_symbol::do_brew_molecule_p() const
43 Real w = extent (X_AXIS).length ();
44 Paper_def * p = paper_l ();
45 Real t = p->get_var ("rulethickness");
46 Molecule rule = lookup_l ()->filledbox (Box (Interval (0,w),
47 Interval (-t/2, t/2)));
49 Real height = (no_lines_i_-1) * staff_line_leading_f_ /2;
50 Molecule * m = new Molecule;
51 for (int i=0; i < no_lines_i_; i++)
54 a.translate_axis (height - i * staff_line_leading_f_, Y_AXIS);
63 Staff_symbol::steps_i() const