#include "melodicstaff.hh"
#include "stem.hh"
-
+#include "notehead.hh"
#include "paper.hh"
#include "molecule.hh"
#include "linestaff.hh"
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);
}
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);
}
/*
}
}
+void
+Stem::postprocess()
+{
+ calculate();
+ brew_molecole();
+}
+
Interval
Stem::width()const
{
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){