]> git.donarmstrong.com Git - lilypond.git/commitdiff
add skyline debugging
authorJoe Neeman <joeneeman@gmail.com>
Wed, 15 Nov 2006 19:19:24 +0000 (21:19 +0200)
committerJoe Neeman <joeneeman@gmail.com>
Wed, 15 Nov 2006 19:19:24 +0000 (21:19 +0200)
lily/program-option.cc
lily/system.cc
scm/lily.scm

index be81de380bf49ec1d5fea180d445db17d7be7d49..02213e4c71a68d1cfdddc2276e7e1b35580f36bd 100644 (file)
@@ -21,6 +21,7 @@ using namespace std;
 /* Write midi as formatted ascii stream? */
 bool do_midi_debugging_global;
 bool use_object_keys;
+bool debug_skylines;
 
 /*
   Backwards compatibility.
@@ -89,6 +90,11 @@ void internal_set_option (SCM var, SCM val)
       strict_infinity_checking = to_boolean (val);
       val = scm_from_bool (to_boolean (val));
     }
+  else if (var == ly_symbol2scm ("debug-skylines"))
+    {
+      debug_skylines = to_boolean (val);
+      val = scm_from_bool (to_boolean (val));
+    }
 }
 
 ssize const HELP_INDENT = 30;
index 3337a77146d4e193682f38a2ba60f6807d39f131..7c1828cabde793c1c963595846bdb66da598811e 100644 (file)
@@ -24,6 +24,8 @@
 #include "tweak-registration.hh"
 #include "warn.hh"
 
+extern bool debug_skylines;
+
 System::System (System const &src, int count)
   : Spanner (src, count)
 {
@@ -398,6 +400,11 @@ System::get_paper_system ()
   Stencil sys_stencil (Box (x, y),
                       scm_cons (ly_symbol2scm ("combine-stencil"),
                                 exprs));
+  if (debug_skylines)
+    {
+      sys_stencil.add_stencil (skylines_[UP].stencil ().in_color (255, 0, 0));
+      sys_stencil.add_stencil (skylines_[DOWN].stencil ().in_color (0, 255, 0));
+    }
 
   Grob *left_bound = this->get_bound (LEFT);
   SCM prop_init = left_bound->get_property ("line-break-system-details");
index e7d6e8d0ce2226554a9bc05a5b201c32cd8c5cdf..4c17236b1abf4089f0a2d56724a237393e1d6fab 100644 (file)
@@ -26,6 +26,7 @@
              (debug-lexer #f "debug the flex lexer")
              (debug-midi #f "generate human readable MIDI")
              (debug-parser #f "debug the bison parser")
+             (debug-skylines #f "debug skylines")
              (delete-intermediate-files #f
                                         "delete unusable PostScript files")
              (dump-signatures #f "dump output signatures of each system")