]> git.donarmstrong.com Git - lilypond.git/blob - lily/time-signature.cc
release: 1.0.12
[lilypond.git] / lily / time-signature.cc
1 /*   
2   time-signature.cc --  implement Time_signature
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1996--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #include "scalar.hh"
11 #include "molecule.hh"
12 #include "time-signature.hh"
13 #include "paper-def.hh"
14 #include "lookup.hh"
15
16 Time_signature::Time_signature ()
17 {
18   breakable_b_ = true;
19 }
20
21 Molecule*
22 Time_signature::brew_molecule_p() const
23 {
24   Atom s;
25   if (time_sig_type_str_.length_i ())
26     {
27       s = lookup_l ()-> special_time_signature (time_sig_type_str_);
28     }
29   else
30     s = lookup_l ()->time_signature (args_);
31   s.translate_axis (-s.extent()[Y_AXIS].center (), Y_AXIS);
32   return new Molecule (Atom (s));
33 }
34
35
36
37 IMPLEMENT_IS_TYPE_B1(Time_signature,Item);