]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/hairpin.cc
* scm/output-tex.scm (text): remove debugging code.
[lilypond.git] / lily / hairpin.cc
index fcb3c621da2a87e69ad6eab9dcc94b398f64b673..629f8254609f5042453d3f2167c36f01d0f03cfe 100644 (file)
@@ -26,7 +26,7 @@ Hairpin::print (SCM smob)
   Grob *me= unsmob_grob (smob);
   Spanner *spanner = dynamic_cast<Spanner*> (me);
 
-  SCM s = me->get_grob_property ("grow-direction");
+  SCM s = me->get_property ("grow-direction");
   if (!is_direction (s))
     {
       me->suicide ();
@@ -41,14 +41,14 @@ Hairpin::print (SCM smob)
   /*
     Ugh. property name is not general.
    */
-  Real padding = gh_scm2double (me->get_grob_property ("if-text-padding"));
+  Real padding = gh_scm2double (me->get_property ("if-text-padding"));
  
   Drul_array<bool> broken;
   Drul_array<Item*> bounds ;
   Direction d = LEFT;
   do
     {
-      bounds[d] =spanner->get_bound (d);
+      bounds[d] = spanner->get_bound (d);
       broken[d] = bounds[d]->break_status_dir () != CENTER;
     }
   while (flip (&d) != LEFT);
@@ -59,7 +59,7 @@ Hairpin::print (SCM smob)
   do
     {
       Item *b = bounds[d];
-      x_points[d]  = b->relative_coordinate (common, X_AXIS);
+      x_points[d] = b->relative_coordinate (common, X_AXIS);
       if (broken [d])
        {
          if (d == LEFT)
@@ -74,15 +74,15 @@ Hairpin::print (SCM smob)
                adjacent to a text-dynamic, and we may move closer. We
                make the padding a little smaller, here.
              */
-             Interval e =b->extent (common, X_AXIS);
+             Interval e = b->extent (common, X_AXIS);
              if (e.is_empty ())
                e = Interval (0,0) + b->relative_coordinate (common, X_AXIS);
              
-             x_points[d] = e.center () - d  * padding /3; // ugh.
+             x_points[d] = e.center () - d  * padding / 3; // ugh.
            }
          else
            {
-             Interval e =b->extent (common, X_AXIS);
+             Interval e = b->extent (common, X_AXIS);
              if (!e.is_empty ())
                x_points[d] = e[-d] - d*padding;
            }
@@ -101,7 +101,7 @@ Hairpin::print (SCM smob)
     }
 
   bool continued = broken[Direction (-grow_dir)];
-  Real height = robust_scm2double (me->get_grob_property ("height"), 0.2) *
+  Real height = robust_scm2double (me->get_property ("height"), 0.2) *
     Staff_symbol_referencer::staff_space (me);
 
   Real starth, endh;
@@ -118,13 +118,13 @@ Hairpin::print (SCM smob)
 
   /*
     should do relative to staff-symbol staff-space?
-   */
+  */
 
   Stencil mol;
   mol  = Line_interface::line (me, Offset (0, starth), Offset (width, endh));
   mol.add_stencil (Line_interface::line (me,
-                                                Offset (0, -starth),
-                                                Offset (width, -endh)));
+                                        Offset (0, -starth),
+                                        Offset (width, -endh)));
 
   mol.translate_axis (x_points[LEFT]
                      - bounds[LEFT]->relative_coordinate (common, X_AXIS),
@@ -135,6 +135,6 @@ Hairpin::print (SCM smob)
 
 
 ADD_INTERFACE (Hairpin, "hairpin-interface",
-  "hairpin crescendo.",
+  "A hairpin (de)crescendo.",
   "grow-direction height if-text-padding");