From 595818135c68757a7ac3111af5597c9dee5a0b23 Mon Sep 17 00:00:00 2001 From: fred Date: Fri, 29 Nov 1996 00:43:19 +0000 Subject: [PATCH] lilypond-0.0.13 --- hdr/scoreline.hh | 2 +- hdr/staffline.hh | 4 ++-- src/pscore.cc | 2 ++ src/scoreline.cc | 8 ++++++++ src/staffline.cc | 22 ++++++++++++++-------- 5 files changed, 27 insertions(+), 11 deletions(-) diff --git a/hdr/scoreline.hh b/hdr/scoreline.hh index 5ebb936b1e..e3997b5a36 100644 --- a/hdr/scoreline.hh +++ b/hdr/scoreline.hh @@ -20,7 +20,7 @@ Line_of_score { PScore * pscore_; // needed to generate staffs /****************/ - + void process() ; Line_of_score(svec sv, PScore *); String TeXstring() const; diff --git a/hdr/staffline.hh b/hdr/staffline.hh index 868198b013..12d30c3764 100644 --- a/hdr/staffline.hh +++ b/hdr/staffline.hh @@ -17,14 +17,14 @@ struct Line_of_staff { Line_of_score * line_of_score_; - const PStaff *pstaff_; + PStaff *pstaff_; /****************/ String TeXstring() const; Line_of_staff(Line_of_score*, PStaff *); Interval height() const; - + void process(); }; #endif diff --git a/src/pscore.cc b/src/pscore.cc index ba1113aa1a..c12f6ddce6 100644 --- a/src/pscore.cc +++ b/src/pscore.cc @@ -215,6 +215,8 @@ PScore::postprocess() for (PCursor ic(its); ic.ok(); ic++){ ic->postprocess(); } + for (PCursor i(lines); i.ok(); i++) + i->process(); } PCursor diff --git a/src/scoreline.cc b/src/scoreline.cc index 03d0c8482f..bd21c32bba 100644 --- a/src/scoreline.cc +++ b/src/scoreline.cc @@ -41,3 +41,11 @@ Line_of_score::Line_of_score(svec sv, #sv# isn't really const!! */ + +void +Line_of_score::process() +{ + for (PCursor i(staffs); i.ok(); i++) + i->process(); +} + diff --git a/src/staffline.cc b/src/staffline.cc index f0f00f1a83..a51c669e1f 100644 --- a/src/staffline.cc +++ b/src/staffline.cc @@ -4,6 +4,7 @@ #include "spanner.hh" #include "symbol.hh" #include "paper.hh" +#include "molecule.hh" #include "pcol.hh" #include "pscore.hh" @@ -24,10 +25,11 @@ Line_of_staff::TeXstring() const s+=make_vbox(height()); // the staff itself: eg lines, accolades s += "\\hbox{"; - { - Symbol sym = pstaff_->get_stafsym(line_of_score_->pscore_-> // ugh - paper_->linewidth); - s+=sym.tex; + { + ((PStaff*)pstaff_)-> + brew_molecule(line_of_score_->pscore_->paper_->linewidth); + + s+=pstaff_->stafsym->TeXstring(); PCursor cc(line_of_score_->cols); Real lastpos=cc->hpos; @@ -82,9 +84,7 @@ Line_of_staff::height() const { Interval y; { - Symbol s = pstaff_->stafsym->eval(line_of_score_->pscore_-> - paper_->linewidth); - y = s.dim.y; + y = pstaff_->stafsym->extent().y; } PCursor cc(line_of_score_->cols); @@ -105,4 +105,10 @@ Line_of_staff::height() const return y; } - +void +Line_of_staff::process() +{ + if (!pstaff_->stafsym) + pstaff_->brew_molecule(line_of_score_->pscore_-> + paper_->linewidth); +} -- 2.39.5