]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/beam.cc
Store scoring info in 'annotation, and always print debug info if
[lilypond.git] / lily / beam.cc
index 26404ce8836078d8bd1c0bea886c137e959858c5..58ac5d44d276d61fa98ec69eeada4a68feb71003 100644 (file)
@@ -74,6 +74,12 @@ Beam_stem_segment::Beam_stem_segment ()
   dir_ = CENTER;
 }
 
+bool
+beam_segment_less (Beam_segment const& a, Beam_segment const& b)
+{
+  return a.horizontal_[LEFT] < b.horizontal_[LEFT];
+}
+
 Beam_segment::Beam_segment ()
 {
   vertical_count_ = 0;
@@ -330,6 +336,7 @@ operator <(Beam_stem_segment const &a,
 
 typedef map<int, vector<Beam_stem_segment> >  Position_stem_segments_map;
 
+// TODO - should store result in a property?
 vector<Beam_segment>
 Beam::get_beam_segments (Grob *me_grob, Grob **common)
 {
@@ -603,13 +610,6 @@ Beam::print (SCM grob)
 
 #if (DEBUG_BEAM_SCORING)
   SCM annotation = me->get_property ("annotation");
-  if (!scm_is_string (annotation))
-    {
-      SCM debug = me->layout ()->lookup_variable (ly_symbol2scm ("debug-beam-scoring"));
-      if (to_boolean (debug))
-       annotation = me->get_property ("quant-score");
-    }
-
   if (scm_is_string (annotation))
     {
       extract_grob_set (me, "stems", stems);
@@ -622,7 +622,7 @@ Beam::print (SCM grob)
       string str;
       SCM properties = Font_interface::text_font_alist_chain (me);
 
-      properties = scm_cons(scm_acons (ly_symbol2scm ("font-size"), scm_from_int (-3), SCM_EOL),
+      properties = scm_cons(scm_acons (ly_symbol2scm ("font-size"), scm_from_int (-5), SCM_EOL),
                             properties);
       
       Direction stem_dir = stems.size () ? to_dir (stems[0]->get_property ("direction")) : UP;
@@ -1639,7 +1639,6 @@ ADD_INTERFACE (Beam,
               "neutral-direction "
               "normal-stems "
               "positions "
-              "quant-score "
               "quantized-positions "
               "shorten "
               "stems "