]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.18
authorfred <fred>
Sun, 24 Mar 2002 19:26:46 +0000 (19:26 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:26:46 +0000 (19:26 +0000)
hdr/beam.hh
hdr/scoreline.hh
hdr/slur.hh
hdr/spanner.hh
src/beam.cc
src/scoreline.cc
src/slur.cc
src/staffline.cc

index be2cb8f94c01e1d6e79a6a5f683b963258ce7e3a..60b5dedd710d6ad412a499f05706fb8136d63203 100644 (file)
@@ -22,7 +22,7 @@ struct Beam: public Spanner {
     
     virtual Interval width()const;    
 
-    Spanner *broken_at(const PCol *, const PCol *) const;
+    Spanner *broken_at(PCol *,  PCol *) const;
     Beam();
     void add(Stem*);
     void process();
index e3997b5a3633d803d99225f54bd3871653d85e27..5734a7b4b458b4c396f242c661eac7f708686103 100644 (file)
@@ -13,7 +13,7 @@
 /// the columns of a score that form one line.
 struct
 Line_of_score {
-    PointerList<const PCol *> cols;
+    PointerList<PCol *> cols;
 
     // need to store height of each staff.
     IPointerList<Line_of_staff*> staffs;
@@ -21,7 +21,7 @@ Line_of_score {
 
     /****************/
     void process() ;
-    Line_of_score(svec<const PCol *> sv,  PScore *);
+    Line_of_score(svec<PCol *> sv,  PScore *);
 
     String TeXstring() const;
 
index 43359399e80a458b4f1210312f974104ff825ead..10b588457174d17beb4bf0acfd68ecb94d641ac7 100644 (file)
@@ -25,7 +25,7 @@ struct Slur : Spanner {
     void add(Notehead*);
     void set_default_dir();
     Interval height() const;
-    Spanner* broken_at(const PCol*, const PCol*) const;
+    Spanner* broken_at( PCol*, PCol*) const;
     void process();
 private:
     void brew_molecule();
index 3940cebf603efef754a3996dd96348139625fb02..8a22985819440508ac983b84b6330274e00a60b6 100644 (file)
@@ -31,7 +31,7 @@ struct Spanner {
 
 
     /// clone a piece of  this spanner.
-    virtual Spanner *broken_at(const PCol *c1, const PCol *c2) const=0; 
+    virtual Spanner *broken_at( PCol *c1,  PCol *c2) const=0; 
     /**
  
     PRE
index 3d43b4ed1dc6a1d42c09e9907d6174263914ee86..a2d58254af6bc57b13811bef0def138f814e35d5 100644 (file)
@@ -1,3 +1,4 @@
+#include "dimen.hh"
 #include "beam.hh"
 #include "misc.hh"
 #include "debug.hh"
@@ -141,7 +142,7 @@ Beam::process()
 
 // todo.
 Spanner *
-Beam::broken_at(const PCol *, const PCol *) const
+Beam::broken_at( PCol *, PCol *) const
 {
     return new Beam(*this);
 }
@@ -166,6 +167,7 @@ Beam::width() const
     return Interval( (*me->stems.top()) ->hpos(),
                     (*me->stems.bottom()) ->hpos() );
 }
+
 /*
   beams to go with one stem.
   */
@@ -177,6 +179,8 @@ Beam::stem_beams(Stem *here, Stem *next, Stem *prev)
     Real dy=paper()->internote()*2;
     Real stemdx = paper()->rule_thickness();
     Real sl = slope*paper()->internote();
+    paper()->lookup_->beam(sl, convert_dimen(20,"pt"));
+    slope = sl /paper()->internote();
     Molecule leftbeams;
     Molecule rightbeams;
 
@@ -227,10 +231,7 @@ Beam::brew_molecule()
 {
     assert(left->line == right->line);
     Real inter=paper()->internote();
-    Real sl = slope*inter;
-
     output = new Molecule;
-    slope = sl / inter;
     Real x0 = stems.top()->hpos();
     
     for (PCursor<Stem*> i(stems); i.ok(); i++) {
index bd21c32bbabdb3819b6ec393780a61d29e6cbd89..788efd5dabc97bcc0d56fae8800bd87cc6de8517 100644 (file)
@@ -22,7 +22,7 @@ Line_of_score::TeXstring() const
 }
 
 
-Line_of_score::Line_of_score(svec<const PCol *> sv,
+Line_of_score::Line_of_score(svec<PCol *> sv,
                             PScore *ps)
 {
     pscore_ = ps;
index 5d9eb0de44ba6fc95718b54aab88f76d76fa0026..f795dc82847a037200f1e30ddbea44528f1a89f7 100644 (file)
@@ -52,7 +52,7 @@ Slur::preprocess()
 }
 
 Spanner*
-Slur::broken_at(const PCol*l, const PCol*r) const
+Slur::broken_at(PCol*l, PCol*r) const
 {
     assert(l->line == r->line);
     Slur*ret = new Slur(*this);
index a51c669e1f515cb15180383664a47ec161d440cb..9fd5b1d5bf518c3af953039a2f9f229d8a8f4b16 100644 (file)
@@ -64,13 +64,13 @@ Line_of_staff::Line_of_staff(Line_of_score * sc, PStaff*st)
     pstaff_=st;
 
     
-    const PCol *linestart = sc->cols.top();
-    const PCol *linestop = sc->cols.bottom();
+    PCol *linestart = sc->cols.top();
+    PCol *linestop = sc->cols.bottom();
 
     
     for (PCursor<const Spanner*> sp(pstaff_->spans); sp.ok(); sp++) {
-       const PCol *brokenstart = &MAX(*linestart, *sp->left);
-       const PCol *brokenstop = &MIN(*linestop, *sp->right);
+       PCol *brokenstart = &MAX(*linestart, *sp->left);
+       PCol *brokenstop = &MIN(*linestop, *sp->right);
        if ( *brokenstart < *brokenstop) {
            line_of_score_->pscore_-> // higghl
                add_broken(sp->broken_at(brokenstart,brokenstop));