From: fred Date: Sun, 24 Mar 2002 19:39:37 +0000 (+0000) Subject: lilypond-0.0.52 X-Git-Tag: release/1.5.59~4939 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=bbdefaa3b7b16e24d301fbc755422da670b0d6ac;p=lilypond.git lilypond-0.0.52 --- diff --git a/lily/include/staff-elem.hh b/lily/include/staff-elem.hh index c47cd024dc..edb770d41e 100644 --- a/lily/include/staff-elem.hh +++ b/lily/include/staff-elem.hh @@ -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(); diff --git a/lily/item.cc b/lily/item.cc index f9adbba73c..e35ab29446 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -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 +*/ + +#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; +} diff --git a/lily/staff-elem.cc b/lily/staff-elem.cc index 14a4f63ef4..191f072de2 100644 --- a/lily/staff-elem.cc +++ b/lily/staff-elem.cc @@ -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_; +} diff --git a/lily/stem.cc b/lily/stem.cc index 01d33597d6..5e26f05618 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -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; }