From a31ffe7a0238af3affbeb3c604556689b45ab534 Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 31 Oct 1996 20:37:19 +0000 Subject: [PATCH] lilypond-0.0.6 --- break.cc | 4 ++-- line.cc | 5 +++-- pscore.cc | 11 +++++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/break.cc b/break.cc index b8dc1827bc..7d5a02a10e 100644 --- a/break.cc +++ b/break.cc @@ -2,7 +2,7 @@ do calculations for breaking problem */ - +#include "paper.hh" #include "linespace.hh" #include "debug.hh" #include "line.hh" @@ -17,7 +17,7 @@ PScore::solve_line(svec curline) const sp.add_column(curline[0], true, 0.0); for (int i=1; i< curline.sz()-1; i++) sp.add_column(curline[i]); - sp.add_column(curline.last(), true, linewidth); + sp.add_column(curline.last(), true, paper_->linewidth); // misschien moeven uit Spacing_problem? for (PCursor i(suz); i.ok(); i++) { diff --git a/line.cc b/line.cc index ebe9595d3b..a6e0f7c68a 100644 --- a/line.cc +++ b/line.cc @@ -1,6 +1,7 @@ #include "line.hh" #include "dimen.hh" #include "symbol.hh" +#include "paper.hh" #include "pcol.hh" #include "pscore.hh" @@ -16,7 +17,7 @@ Line_of_staff::TeXstring() const // the staff itself: eg lines, accolades s += "\\hbox{"; { - Symbol sym = pstaff_->get_stafsym(scor->score->linewidth); + Symbol sym = pstaff_->get_stafsym(scor->score->paper_->linewidth); s+=sym.tex; PCursor cc(scor->cols); Real lastpos=cc->hpos; @@ -105,7 +106,7 @@ Line_of_staff::maxheight() const { Interval y; { - Symbol s = pstaff_->stafsym->eval(scor->score->linewidth); + Symbol s = pstaff_->stafsym->eval(scor->score->paper_->linewidth); y = s.dim.y; } PCursor cc(scor->cols); diff --git a/pscore.cc b/pscore.cc index 773554375c..e1c8a7204a 100644 --- a/pscore.cc +++ b/pscore.cc @@ -1,5 +1,6 @@ // utility functions for PScore #include "debug.hh" +#include "paper.hh" #include "molecule.hh" #include "dimen.hh" #include "line.hh" @@ -95,16 +96,16 @@ PScore::add(PCol *p) cols.bottom().add(p); } -PScore::PScore() +PScore::PScore( Paperdef*p) { - linewidth = convert_dimen(15,"cm"); // default + paper_ = p; } void PScore::output(Tex_stream &ts) { int l=1; - ts << "% linewidth " << print_dimen(linewidth )+"\n"; + for (PCursor lic(lines); lic.ok(); lic++) { ts << "% line of score no. " << l++ <<"\n"; ts << lic->TeXstring(); @@ -135,11 +136,13 @@ PScore::OK()const ic->OK(); #endif } + void PScore::print() const { #ifndef NPRINT - mtor << "PScore { width "<print(); mtor << "\ncolumns: "; for (PCursor cc(cols); cc.ok(); cc++) cc->print(); -- 2.39.5