]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/staff-sym.cc
release: 1.1.28
[lilypond.git] / lily / staff-sym.cc
index d4b5f35eafcd64b0b6699c037ca86c48d000056c..6ac749eb3f993108a437bea8f497e9c1ddc27b78 100644 (file)
@@ -3,14 +3,15 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 #include "staff-sym.hh"
 #include "lookup.hh"
+#include "dimensions.hh"
 #include "paper-def.hh"
 #include "molecule.hh"
 #include "debug.hh"
-#include "dimen.hh"
+#include "item.hh"
 
 
 Staff_symbol::Staff_symbol ()
@@ -20,7 +21,7 @@ Staff_symbol::Staff_symbol ()
 }
 
 
-IMPLEMENT_IS_TYPE_B1(Staff_symbol,Spanner);
+
 
 void
 Staff_symbol::do_print() const
@@ -40,18 +41,19 @@ Staff_symbol::do_height() const
 }
 
 Molecule*
-Staff_symbol::brew_molecule_p() const
+Staff_symbol::do_brew_molecule_p() const
 {
+  Real w = extent (X_AXIS).length ();
   Paper_def * p = paper();
-  Atom rule  = p->lookup_l ()->rule_symbol (p->get_var ("rulethickness"), 
-                                           width ().length ());
+  Molecule rule  = lookup_l ()->rule_symbol (p->get_var ("rulethickness"),
+                                            w);
   Real height = (no_lines_i_-1) * inter_note_f();
   Molecule * m = new Molecule;
   for (int i=0; i < no_lines_i_; i++)
     {
-      Atom a (rule);
+      Molecule a (rule);
       a.translate_axis (height - i * inter_note_f()*2, Y_AXIS);
-      m->add (a);
+      m->add_molecule (a);
     }
 
   return m;