]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/vaticana-ligature.cc
doc string.
[lilypond.git] / lily / vaticana-ligature.cc
index d683aec1cf5dc761fe2c96fda3e30c43a05d5f02..169be2404ae27c36a2ce1a4927731b59f6b10c46 100644 (file)
@@ -75,7 +75,7 @@ vaticana_brew_flexa (Grob *me,
   Real right_height = 0.6 * staff_space;
 
   Real interval;
-  SCM flexa_height_scm = me->get_grob_property ("flexa-height");
+  SCM flexa_height_scm = me->get_property ("flexa-height");
   if (flexa_height_scm != SCM_EOL)
     {
       interval = gh_scm2int (flexa_height_scm);
@@ -92,7 +92,7 @@ vaticana_brew_flexa (Grob *me,
       me->warning (_ ("ascending vaticana style flexa"));
     }
 
-  Real width = robust_scm2double ( me->get_grob_property ("flexa-width"), 2);
+  Real width = robust_scm2double ( me->get_property ("flexa-width"), 2);
 
   /*
    * Compensate curve thickness that appears to be smaller in steep
@@ -100,14 +100,14 @@ vaticana_brew_flexa (Grob *me,
    */
   Real left_height =
     right_height +
-    min (0.12 * abs(interval), 0.3) * staff_space;
+    min (0.12 * abs (interval), 0.3) * staff_space;
 
   /*
    * Compensate optical illusion regarding vertical position of left
    * and right endings due to curved shape.
    */
-  Real ypos_correction = -0.1*staff_space * sign(interval);
-  Real interval_correction = 0.2*staff_space * sign(interval);
+  Real ypos_correction = -0.1*staff_space * sign (interval);
+  Real interval_correction = 0.2*staff_space * sign (interval);
   Real corrected_interval = interval*staff_space + interval_correction;
 
   /*
@@ -139,13 +139,13 @@ vaticana_brew_flexa (Grob *me,
       inner_top_curve.translate (Offset (0.0, -line_thickness));
       Stencil top_edge =
        Lookup::bezier_sandwich (top_curve, inner_top_curve);
-      stencil.add_stencil(top_edge);
+      stencil.add_stencil (top_edge);
 
       Bezier inner_bottom_curve = bottom_curve;
       inner_bottom_curve.translate (Offset (0.0, +line_thickness));
       Stencil bottom_edge =
        Lookup::bezier_sandwich (bottom_curve, inner_bottom_curve);
-      stencil.add_stencil(bottom_edge);
+      stencil.add_stencil (bottom_edge);
 
       /*
        * TODO: Use horizontal slope with proper slope value rather
@@ -158,14 +158,14 @@ vaticana_brew_flexa (Grob *me,
       Box left_edge_box (Interval (0, line_thickness),
                         Interval (-0.5*left_height, +0.5*left_height));
       Stencil left_edge = Lookup::filled_box (left_edge_box);
-      stencil.add_stencil(left_edge);
+      stencil.add_stencil (left_edge);
 
       Box right_edge_box (Interval (-line_thickness, 0),
                          Interval (-0.5*right_height, +0.5*right_height));
       Stencil right_edge = Lookup::filled_box (right_edge_box);
       right_edge.translate_axis (width, X_AXIS);
       right_edge.translate_axis (corrected_interval / 2.0, Y_AXIS);
-      stencil.add_stencil(right_edge);
+      stencil.add_stencil (right_edge);
     }
   stencil.translate_axis (ypos_correction, Y_AXIS);
   return stencil;
@@ -215,7 +215,7 @@ vaticana_add_ledger_lines (Grob *me, Stencil *out, int pos, Real offs,
 Stencil
 vaticana_brew_primitive (Grob *me, bool ledger_take_space)
 {
-  SCM glyph_name_scm = me->get_grob_property ("glyph-name");
+  SCM glyph_name_scm = me->get_property ("glyph-name");
   if (glyph_name_scm == SCM_EOL)
     {
       me->programming_error ("Vaticana_ligature: "
@@ -227,7 +227,7 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space)
 
   Stencil out;
   int flexa_height = 0;
-  Real thickness = robust_scm2double ( me->get_grob_property ("thickness"), 1);
+  Real thickness = robust_scm2double ( me->get_property ("thickness"), 1);
 
   Real line_thickness =
     thickness * me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
@@ -235,20 +235,20 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space)
   Real blotdiameter =
     (me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter")));
 
-  int pos = (int)rint (Staff_symbol_referencer::get_position (me));
+  int pos = Staff_symbol_referencer::get_rounded_position (me);
 
-  SCM delta_pitch_scm = me->get_grob_property ("delta-pitch");
+  SCM delta_pitch_scm = me->get_property ("delta-pitch");
   int delta_pitch;
   if (delta_pitch_scm != SCM_EOL)
     delta_pitch = gh_scm2int (delta_pitch_scm);
   else
     delta_pitch = 0;
 
-  Real x_offset = robust_scm2double ( me->get_grob_property ("x-offset"), 0);
+  Real x_offset = robust_scm2double ( me->get_property ("x-offset"), 0);
 
-  bool add_stem = to_boolean (me->get_grob_property ("add-stem"));
-  bool add_cauda = to_boolean (me->get_grob_property ("add-cauda"));
-  bool add_join = to_boolean (me->get_grob_property ("add-join"));
+  bool add_stem = to_boolean (me->get_property ("add-stem"));
+  bool add_cauda = to_boolean (me->get_property ("add-cauda"));
+  bool add_join = to_boolean (me->get_property ("add-join"));
 
   if (!String::compare (glyph_name, ""))
     {
@@ -260,7 +260,7 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space)
        * flexa_width.)
        */
       Real staff_space = Staff_symbol_referencer::staff_space (me);
-      Real flexa_width  = robust_scm2double ( me->get_grob_property ("flexa-width"), 2)  *staff_space;
+      Real flexa_width  = robust_scm2double ( me->get_property ("flexa-width"), 2)  *staff_space;
       out =
        Lookup::blank (Box (Interval (0, 0.5*flexa_width), Interval (0,0)));
     }
@@ -302,11 +302,11 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space)
       out.add_stencil (join);
     }
 
-  vaticana_add_ledger_lines(me, &out, pos, 0, ledger_take_space);
+  vaticana_add_ledger_lines (me, &out, pos, 0, ledger_take_space);
   if (!String::compare (glyph_name, "flexa"))
     {
       pos += flexa_height;
-      vaticana_add_ledger_lines(me, &out, pos, 0.5*flexa_height,
+      vaticana_add_ledger_lines (me, &out, pos, 0.5*flexa_height,
                                ledger_take_space);
     }