]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.52
authorfred <fred>
Sun, 24 Mar 2002 19:39:37 +0000 (19:39 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:39:37 +0000 (19:39 +0000)
lily/include/staff-elem.hh
lily/item.cc
lily/staff-elem.cc
lily/stem.cc

index c47cd024dc528709c0cf2f6a410cc216738c5447..edb770d41eb652ea534852b106ee977f2471770a 100644 (file)
@@ -62,6 +62,7 @@ public:
       Overridable, since this staff-elem might act as a pseudo-list.
      */
     virtual void translate(Offset);
+    Offset offset()const;
     void add_processing();
     void pre_processing();
     void post_processing();
index f9adbba73c7d47c8cf4f19415d7eca87c209d34a..e35ab294463451bdbe5dde17530f961744a6c3ff 100644 (file)
@@ -1,7 +1,14 @@
-#include "debug.hh"
-#include "item.hh"
+/*
+  item.cc -- implement Item
 
+  source file of the LilyPond music typesetter
 
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "debug.hh"
+#include "item.hh"
+#include "p-col.hh"
 
 Item::Item()
 {
@@ -18,3 +25,9 @@ Item::do_print() const
 #endif
 }
 
+
+Real 
+Item::hpos_f()const
+{
+    return pcol_l_->hpos + offset().x;
+}
index 14a4f63ef40d7591d88352baec7908fca809763e..191f072de227b0bba4840f630ea9ed4fd4773e35 100644 (file)
@@ -226,3 +226,8 @@ Staff_elem::brew_molecule_p()const
     Atom a(paper()->lookup_l()->fill(Box(Interval(0,0), Interval(0,0))));
     return new Molecule (a);
 }
+Offset
+Staff_elem::offset() const
+{
+    return offset_; 
+}
index 01d33597d6401dc1df3168be1518fab061335516..5e26f0561870ecd2d5f8183a77c353610e1e47ea 100644 (file)
@@ -176,7 +176,6 @@ Stem::brew_molecule_p()const return out;
     Real dy = p->internote();
     Symbol ss =p->lookup_l()->stem(bot*dy,top*dy);
 
-    
     out = new Molecule(Atom(ss));
 
     if (print_flag&&abs(flag) > 4){
@@ -196,7 +195,7 @@ Stem::brew_molecule_p()const return out;
 Real
 Stem::hindex()const
 {
-    return pcol_l_->hpos + stem_xoffset; // hmm.  + offset_.x;
+    return hpos_f() + stem_xoffset;
 }