]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/atom.cc
release: 0.1.22
[lilypond.git] / lily / atom.cc
index 0f1f2052891710a10d25883ab588aa3e53a12580..870c6bece91c6b8fdc9da8884c84366b7dc40083 100644 (file)
@@ -18,6 +18,12 @@ Atom::print() const
 {
 #ifndef NPRINT
   DOUT << "texstring: " <<tex_<<"\n";    
+  
+  DOUT << "dim:";
+    for (Axis i=X_AXIS; i < NO_AXES; incr(i))
+      DOUT << axis_name_str(i) << " = " << dim_[i].str();
+
+  DOUT << "\noffset: " << off_.str ();
 #endif
 }
 
@@ -57,7 +63,7 @@ Atom::TeX_string() const
   Offset off = off_;
 
   /* infinity checks. */
-  for (int a =X_AXIS; a < NO_AXES; a++)
+  for (int a = X_AXIS; a < NO_AXES; a++)
     {
       Axis ax = (Axis)a;
       if (abs (off[ax]) >= 100 CM)
@@ -75,3 +81,15 @@ Atom::TeX_string() const
   s += tex_str + "}";
   return s;
 }
+
+void
+Atom::translate_axis (Real r, Axis a)
+{
+  off_[a] += r; 
+}
+
+void
+Atom::translate (Offset o)
+{
+  off_ += o;
+}