]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/molecule.cc
release: 0.0.68pre
[lilypond.git] / lily / molecule.cc
index c39082ab929cf7d8ddbf4c15ffc0fe594f7bcba7..2c946484c8657eb2279f7ef623025d7e7ebe7f21 100644 (file)
@@ -42,6 +42,18 @@ Molecule::translate(Offset o)
        c->translate(o);
 }
 
+void
+Molecule::translate_x(Real x)
+{
+    translate(Offset(x,0));
+}
+
+void
+Molecule::translate_y(Real y)
+{
+    translate(Offset(0,y));
+}
+
 void
 Molecule::add(Molecule const &m)
 {
@@ -86,7 +98,7 @@ Molecule::add_top(Molecule const &m)
     }
   Real yof=extent().y.right - m.extent().y.left;
     Molecule toadd(m);
-    toadd.translate(Offset(0,yof));
+    toadd.translate_y(yof);
     add(toadd);
 }
 
@@ -99,7 +111,7 @@ Molecule::add_bottom(Molecule const &m)
     }
     Real yof=extent().y.left- m.extent().y.right;
     Molecule toadd(m);
-    toadd.translate(Offset(0,yof));
+    toadd.translate_y(yof);
     add(toadd);
 }