]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/breathing-sign.cc
* scripts/lilypond-book.py (Lilypond_snippet.is_outdated): require
[lilypond.git] / lily / breathing-sign.cc
index 0935effb824856dbb249680f384af54bb845f7a9..489a32296f089e5bb2265430b9aab79f5ce7156c 100644 (file)
@@ -1,20 +1,20 @@
 /*
   breathing_sign.cc -- implement Breathing_sign
 
-  (c)  1999--2003 Michael Krause
+  (c) 1999--2004 Michael Krause
 
   written for the GNU LilyPond music typesetter
 
   TODO: --> see breathing-sign-engraver.cc
 
-  Extensions for ancient notation (c)  2003 by Juergen Reuter
+  Extensions for ancient notation (c) 2003 by Juergen Reuter
 */
 
 #include "staff-symbol-referencer.hh"
 #include "directional-element-interface.hh"
 #include "breathing-sign.hh"
 #include "string.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
 
@@ -24,7 +24,7 @@
 #include "font-interface.hh"
 
 /*
-  TODO: thickness should be a grob property (unit: stafflinethickness)
+  TODO: thickness should be a grob property (unit: linethickness)
  rather than hardwired to (staff_space / 6).
  */
 
@@ -47,7 +47,7 @@ Breathing_sign::divisio_minima (SCM smob)
   Real staff_size;
 
   Real thickness = Staff_symbol_referencer::line_thickness (me);
-  thickness *= robust_scm2double (me->get_grob_property ("thickness"), 1.0);
+  thickness *= robust_scm2double (me->get_property ("thickness"), 1.0);
   if (Staff_symbol_referencer::get_staff_symbol (me))
     {
       staff_size = (Staff_symbol_referencer::line_count (me) - 1) * staff_space;
@@ -64,7 +64,7 @@ Breathing_sign::divisio_minima (SCM smob)
   Interval xdim (0, thickness);
   Interval ydim (-0.5 * staff_space, +0.5 * staff_space);
   Box b (xdim, ydim);
-  Molecule out = Lookup::round_filled_box (b, blotdiameter);
+  Stencil out = Lookup::round_filled_box (b, blotdiameter);
   return out.smobbed_copy ();
 }
 
@@ -79,7 +79,7 @@ Breathing_sign::divisio_maior (SCM smob)
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Real staff_size;
   Real thickness = Staff_symbol_referencer::line_thickness (me);
-  thickness *= robust_scm2double (me->get_grob_property ("thickness"), 1.0);
+  thickness *= robust_scm2double (me->get_property ("thickness"), 1.0);
 
   if (Staff_symbol_referencer::get_staff_symbol (me))
     {
@@ -104,7 +104,7 @@ Breathing_sign::divisio_maior (SCM smob)
   Interval xdim (0, thickness);
   Interval ydim (-0.5 * height, +0.5 * height);
   Box b (xdim, ydim);
-  Molecule out = Lookup::round_filled_box (b, blotdiameter);
+  Stencil out = Lookup::round_filled_box (b, blotdiameter);
   return out.smobbed_copy ();
 }
 
@@ -119,7 +119,7 @@ Breathing_sign::divisio_maxima (SCM smob)
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Real staff_size;
   Real thickness = Staff_symbol_referencer::line_thickness (me);
-  thickness *= robust_scm2double (me->get_grob_property ("thickness"), 1.0);
+  thickness *= robust_scm2double (me->get_property ("thickness"), 1.0);
 
   if (Staff_symbol_referencer::get_staff_symbol (me))
     {
@@ -134,7 +134,7 @@ Breathing_sign::divisio_maxima (SCM smob)
   Interval xdim (0, thickness);
   Interval ydim (-0.5 * staff_size, +0.5 * staff_size);
   Box b (xdim, ydim);
-  Molecule out = Lookup::round_filled_box (b, blotdiameter);
+  Stencil out = Lookup::round_filled_box (b, blotdiameter);
   return out.smobbed_copy ();
 }
 
@@ -149,7 +149,7 @@ Breathing_sign::finalis (SCM smob)
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Real staff_size;
   Real thickness = Staff_symbol_referencer::line_thickness (me);
-  thickness *= robust_scm2double (me->get_grob_property ("thickness"), 1.0);
+  thickness *= robust_scm2double (me->get_property ("thickness"), 1.0);
 
   if (Staff_symbol_referencer::get_staff_symbol (me))
     {
@@ -164,10 +164,10 @@ Breathing_sign::finalis (SCM smob)
   Interval xdim (0, thickness);
   Interval ydim (-0.5 * staff_size, +0.5 * staff_size);
   Box b (xdim, ydim);
-  Molecule line1 = Lookup::round_filled_box (b, blotdiameter);
-  Molecule line2 (line1);
+  Stencil line1 = Lookup::round_filled_box (b, blotdiameter);
+  Stencil line2 (line1);
   line2.translate_axis (0.5 * staff_space, X_AXIS);
-  line1.add_molecule (line2);
+  line1.add_stencil (line2);
 
   return line1.smobbed_copy ();
 }
@@ -190,6 +190,6 @@ Breathing_sign::offset_callback (SCM element_smob, SCM)
   return gh_double2scm (inter_f * sz * d);
 }
 
-ADD_INTERFACE(Breathing_sign, "breathing-sign-interface",
+ADD_INTERFACE (Breathing_sign, "breathing-sign-interface",
              "A breathing sign.",
              "direction");