From c8c0de8af8eaeb60ac559207dfe953997552adc2 Mon Sep 17 00:00:00 2001 From: Joe Neeman Date: Wed, 15 Nov 2006 21:19:24 +0200 Subject: [PATCH] add skyline debugging --- lily/program-option.cc | 6 ++++++ lily/system.cc | 7 +++++++ scm/lily.scm | 1 + 3 files changed, 14 insertions(+) diff --git a/lily/program-option.cc b/lily/program-option.cc index be81de380b..02213e4c71 100644 --- a/lily/program-option.cc +++ b/lily/program-option.cc @@ -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; diff --git a/lily/system.cc b/lily/system.cc index 3337a77146..7c1828cabd 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -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"); diff --git a/scm/lily.scm b/scm/lily.scm index e7d6e8d0ce..4c17236b1a 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -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") -- 2.39.2