]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.19
authorfred <fred>
Fri, 20 Dec 1996 13:27:26 +0000 (13:27 +0000)
committerfred <fred>
Fri, 20 Dec 1996 13:27:26 +0000 (13:27 +0000)
hdr/notehead.hh
src/notehead.cc

index 3137a1e5585c55cd1f7c2d1619a7ae4e03f95474..317d74cc3e3363760429cbc8cef12c1560feef0b 100644 (file)
@@ -17,7 +17,8 @@ struct Notehead : public Item
     int staff_size;
     int dots;
     int balltype;
-
+    int x_dir;
+    
     /****************/
     
     void preprocess();
@@ -28,7 +29,7 @@ struct Notehead : public Item
       */
     
     void print()const;
-
+    static int compare(Notehead*&a, Notehead*&b) ;
 private:
     void brew_molecole();
 };
index fcbd6745ebaf48b96f7f644c6eda8bfa970195d4..88cb621181307e9f3f328d39a465af37218363cd 100644 (file)
@@ -8,6 +8,7 @@
 
 Notehead::Notehead(int ss)
 {
+    x_dir = 0;
     staff_size=ss;
     position = 0;
     balltype = 0;
@@ -18,7 +19,8 @@ void
 Notehead::print()const
 {
 #ifndef NPRINT
-    mtor << "Head "<<balltype<<", position = "<< position << "dots " << dots;
+    mtor << "Head "<< balltype << ", position = "<< position
+        << "dots " << dots;
     Item::print();
 #endif
 }
@@ -29,6 +31,12 @@ Notehead::preprocess()
     brew_molecole();
 }
 
+int
+Notehead::compare(Notehead*&a, Notehead*&b)
+{
+    return a->position - b->position;
+}
+
 void
 Notehead::brew_molecole()
 {
@@ -49,6 +57,7 @@ Notehead::brew_molecole()
            dm.translate(Offset(0,dy));
        output->add_right(dm);
     }
+    output->translate(Offset(x_dir * p->note_width(),0));
     bool streepjes = (position<-1)||(position > staff_size+1);
     if (streepjes) {
        int dir = sgn(position);