]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.6
authorfred <fred>
Thu, 31 Oct 1996 20:37:19 +0000 (20:37 +0000)
committerfred <fred>
Thu, 31 Oct 1996 20:37:19 +0000 (20:37 +0000)
break.cc
line.cc
pscore.cc

index b8dc1827bc79b4af4e50bb828ec29f59bccac0c0..7d5a02a10e16f54435d4d5f1c5f96b8efffd8925 100644 (file)
--- 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<const PCol *> 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<Idealspacing *> i(suz); i.ok(); i++) {
diff --git a/line.cc b/line.cc
index ebe9595d3b78b1a94e534d9559cff414c56b3557..a6e0f7c68a711764e84a67074f1207e27a7b5761 100644 (file)
--- 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<const PCol *> 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<const PCol *> cc(scor->cols);
index 773554375c8e2d280f1337c07575352531a58d68..e1c8a7204a542a8843da392e7a650d6af35bee9a 100644 (file)
--- 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<Line_of_score*> 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_dimen(linewidth);
+    mtor << "PScore { paper ";
+    paper_->print();
     mtor << "\ncolumns: ";
     for (PCursor<PCol*> cc(cols); cc.ok(); cc++)
        cc->print();