]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/slur.cc
* make/lilypond.fedora.spec.in (Requires): scrap kpathsea/tex
[lilypond.git] / lily / slur.cc
index cde26695784ce002592e4a4630ece622ab41c044..5d8138b36ec2d78df30e820c8fc210d9bd6a01b0 100644 (file)
@@ -3,10 +3,11 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1996--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
+#include "slur.hh"
 
 #include <math.h>
 
 #include "directional-element-interface.hh"
 #include "font-interface.hh"
 #include "group-interface.hh"
-#include "lily-guile.hh"
 #include "lookup.hh"
 #include "main.hh"             // DEBUG_SLUR_SCORING
 #include "note-column.hh"
 #include "output-def.hh"
-#include "rod.hh"
-#include "slur.hh"
 #include "spanner.hh"
 #include "staff-symbol-referencer.hh"
 #include "staff-symbol.hh"
 #include "stem.hh"
-#include "stencil.hh"
 #include "text-item.hh"
 #include "warn.hh"
 #include "slur-scoring.hh"
@@ -49,7 +46,7 @@ Slur::height (SCM smob, SCM ax)
 /*
   Ugh should have dash-length + dash-period
 */
-MAKE_SCHEME_CALLBACK (Slur, print,1);
+MAKE_SCHEME_CALLBACK (Slur, print, 1);
 SCM
 Slur::print (SCM smob)
 {
@@ -71,9 +68,11 @@ Slur::print (SCM smob)
   /*
     TODO: replace dashed with generic property.
   */
-  SCM d =  me->get_property ("dashed");
-  if (scm_is_number (d))
-    a = Lookup::dashed_slur (one, thick, thick * robust_scm2double (d, 0));
+  SCM p =  me->get_property ("dash-period");
+  SCM f =  me->get_property ("dash-fraction");
+  if (scm_is_number (p) && scm_is_number (f))
+    a = Lookup::dashed_slur (one, thick, robust_scm2double (p, 1.0), 
+            robust_scm2double(f,0));
   else
     a = Lookup::slur (one, get_grob_direction (me) * base_thick * ss / 10.0,
                      thick);
@@ -207,7 +206,7 @@ get_default_dir (Grob*me)
     = Pointer_group_interface__extract_grobs (me, (Grob*) 0, "note-columns");
 
   Direction d = DOWN;
-  for (int i= 0; i < encompasses.size (); i ++)
+  for (int i = 0; i < encompasses.size (); i ++)
     {
       if (Note_column::dir (encompasses[i]) < 0)
        {
@@ -219,7 +218,7 @@ get_default_dir (Grob*me)
 }
 
 
-MAKE_SCHEME_CALLBACK (Slur, after_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Slur, after_line_breaking, 1);
 SCM
 Slur::after_line_breaking (SCM smob)
 {
@@ -241,6 +240,6 @@ Slur::after_line_breaking (SCM smob)
 
 ADD_INTERFACE (Slur, "slur-interface",
               "A slur",
-              "quant-score excentricity encompass-objects control-points dashed slur-details direction height-limit note-columns ratio thickness");
+              "positions quant-score excentricity encompass-objects control-points dash-period dash-fraction slur-details direction height-limit note-columns ratio thickness");