From: fred Date: Tue, 5 Nov 1996 20:09:27 +0000 (+0000) Subject: lilypond-0.0.8 X-Git-Tag: release/1.5.59~6885 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3df5bdb374f436719e940fd02cf109b9e20ffe20;p=lilypond.git lilypond-0.0.8 --- diff --git a/melodicstaff.cc b/melodicstaff.cc index 83e038652f..2937f45dfe 100644 --- a/melodicstaff.cc +++ b/melodicstaff.cc @@ -1,6 +1,6 @@ #include "melodicstaff.hh" #include "stem.hh" - +#include "notehead.hh" #include "paper.hh" #include "molecule.hh" #include "linestaff.hh" @@ -29,15 +29,18 @@ Melodic_column::typeset_command(Command *com, int breakst) void Melodic_column::typeset_req(Request *rq) { - Item *i =new Item; - Molecule*m=create_req_mol(rq); - + Item *i ; if (rq->note()) { - int h = rq->note()->height(); - Real dy = staff_->paper()->interline()/2; - m->translate(Offset(0,(h-BOTTOM_POSITION)*dy)); + Notehead *n =new Notehead((NO_LINES-1)*2); + n->balltype = rq->rhythmic()->balltype; + n->dots = rq->rhythmic()->dots; + n->position = rq->note()->height() - BOTTOM_POSITION; + i = n; + } else if (rq->rest()) { + i =new Item; + Molecule*m=create_req_mol(rq); + i->output=m; } - i->output = m; typeset_item(i); } @@ -49,10 +52,7 @@ Melodic_column::typeset_stem(Stem_req*rq) int n = the_note->note()->height()-BOTTOM_POSITION; s->minnote =s->maxnote=n; s->flag = rq->stem_number; - s->calculate(); - typeset_item(s); - - s->brew_molecole(); + typeset_item(s); } /* diff --git a/stem.cc b/stem.cc index 33198addde..fd6634c6bf 100644 --- a/stem.cc +++ b/stem.cc @@ -47,6 +47,13 @@ Stem::calculate() } } +void +Stem::postprocess() +{ + calculate(); + brew_molecole(); +} + Interval Stem::width()const { @@ -60,16 +67,18 @@ void Stem::brew_molecole() { assert(pstaff_); - Paperdef *p = pstaff_->pscore_->paper_; - Parametric_symbol *stem = p->lookup_->stem(); - assert(bot!=top); assert(!output); + Paperdef *p = pstaff_->pscore_->paper_; + Parametric_symbol *stem = p->lookup_->stem(); + Real dy = p->interline()/2; String y1 =print_dimen( dy * bot); String y2 = print_dimen(dy * top); Symbol ss =stem->eval(y1,y2); + delete stem; + output = new Molecule(Atom(ss)); if (ABS(flag) > 4){