2 bar.cc -- implement Bar
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
11 #include "molecule.hh"
12 #include "paper-def.hh"
25 IMPLEMENT_IS_TYPE_B1(Bar,Item);
36 Bar::brew_molecule_p() const
38 Paper_def *p = paper();
39 Atom s = p->lookup_l()->bar (type_str_,
40 p->get_var ("bar_size"));
41 s.translate_axis (-s.extent()[Y_AXIS].center (), Y_AXIS);
43 Molecule*output = new Molecule (Atom (s));
48 Prescriptions for splitting bars.
49 TODO: parametrise this (input-settable)
51 static char const *bar_breaks[][3] ={
61 Bar::do_pre_processing()
63 for (int i=0; bar_breaks[i][0]; i++)
65 if (bar_breaks[i][1] == type_str_)
66 type_str_ = bar_breaks[i][break_status_i()+1];
70 span_score_bar needs dims, so don't do
72 transparent_b_ = empty_b_ = (!type_str_);