]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.13
authorfred <fred>
Fri, 29 Nov 1996 00:43:19 +0000 (00:43 +0000)
committerfred <fred>
Fri, 29 Nov 1996 00:43:19 +0000 (00:43 +0000)
hdr/scoreline.hh
hdr/staffline.hh
src/pscore.cc
src/scoreline.cc
src/staffline.cc

index 5ebb936b1e1fec0a3fa71bd06852cd1076fd0188..e3997b5a3633d803d99225f54bd3871653d85e27 100644 (file)
@@ -20,7 +20,7 @@ Line_of_score {
     PScore * pscore_;  // needed to generate staffs
 
     /****************/
-    
+    void process() ;
     Line_of_score(svec<const PCol *> sv,  PScore *);
 
     String TeXstring() const;
index 868198b01337728fd745408a66bc611c4b8770f6..12d30c376430a74429a83de88391c315c6b7cd85 100644 (file)
 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
index ba1113aa1ac0dc0f7bf0cf11bfea8a6d3d7b7437..c12f6ddce65dabec67f7fecedf0465293158c4d0 100644 (file)
@@ -215,6 +215,8 @@ PScore::postprocess()
     for (PCursor<Item*> ic(its); ic.ok(); ic++){
        ic->postprocess();
     }
+    for (PCursor<Line_of_score*> i(lines); i.ok(); i++)
+       i->process();
 }
 
 PCursor<PCol *>
index 03d0c8482fe8b02606496e258b06325a789d1af2..bd21c32bbabdb3819b6ec393780a61d29e6cbd89 100644 (file)
@@ -41,3 +41,11 @@ Line_of_score::Line_of_score(svec<const PCol *> sv,
     #sv# isn't really const!!
     */
 
+
+void
+Line_of_score::process()
+{
+    for (PCursor<Line_of_staff*> i(staffs); i.ok(); i++)
+       i->process();
+}
+       
index f0f00f1a835037dbb943d01ffc2141b0b348c992..a51c669e1f515cb15180383664a47ec161d440cb 100644 (file)
@@ -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<const PCol *> 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<const PCol *> 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);
+}