From: Joe Neeman Date: Sun, 20 Dec 2009 18:03:32 +0000 (-0800) Subject: Fix 932. X-Git-Tag: release/2.13.10-1~128 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e7bfdb66d1a528469ae6992d254c14789b7f0378;p=lilypond.git Fix 932. Add a more generic mechanism for dealing with non-pure stencil callbacks. (The previous mechanism required adding dummy height callbacks, since we could only convert from height callbacks to pure-height callbacks and not from print callbacks to pure-height callbacks.) --- diff --git a/lily/arpeggio.cc b/lily/arpeggio.cc index fe5ed02dcd..a78d150e53 100644 --- a/lily/arpeggio.cc +++ b/lily/arpeggio.cc @@ -196,13 +196,6 @@ Arpeggio::width (SCM smob) return ly_interval2scm (arpeggio.extent (X_AXIS)); } -MAKE_SCHEME_CALLBACK (Arpeggio, height, 1); -SCM -Arpeggio::height (SCM smob) -{ - return Grob::stencil_height (smob); -} - MAKE_SCHEME_CALLBACK (Arpeggio, pure_height, 3); SCM Arpeggio::pure_height (SCM smob, SCM, SCM) @@ -211,7 +204,7 @@ Arpeggio::pure_height (SCM smob, SCM, SCM) if (to_boolean (me->get_property ("cross-staff"))) return ly_interval2scm (Interval ()); - return height (smob); + return Grob::stencil_height (smob); } ADD_INTERFACE (Arpeggio, diff --git a/lily/hairpin.cc b/lily/hairpin.cc index e707655188..af35653629 100644 --- a/lily/hairpin.cc +++ b/lily/hairpin.cc @@ -31,13 +31,6 @@ #include "note-column.hh" #include "warn.hh" -MAKE_SCHEME_CALLBACK (Hairpin, height, 1); -SCM -Hairpin::height (SCM smob) -{ - return Grob::stencil_height (smob); -} - MAKE_SCHEME_CALLBACK (Hairpin, pure_height, 3); SCM Hairpin::pure_height (SCM smob, SCM, SCM) diff --git a/lily/include/arpeggio.hh b/lily/include/arpeggio.hh index eab5a7db25..a492e08edf 100644 --- a/lily/include/arpeggio.hh +++ b/lily/include/arpeggio.hh @@ -33,7 +33,6 @@ public: DECLARE_SCHEME_CALLBACK (brew_chord_bracket, (SCM)); DECLARE_SCHEME_CALLBACK (brew_chord_slur, (SCM)); DECLARE_SCHEME_CALLBACK (width, (SCM)); - DECLARE_SCHEME_CALLBACK (height, (SCM)); DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM)); DECLARE_GROB_INTERFACE(); }; diff --git a/lily/include/hairpin.hh b/lily/include/hairpin.hh index 61d22f4d83..5aecefed7c 100644 --- a/lily/include/hairpin.hh +++ b/lily/include/hairpin.hh @@ -27,7 +27,6 @@ struct Hairpin { public: DECLARE_SCHEME_CALLBACK (print, (SCM)); - DECLARE_SCHEME_CALLBACK (height, (SCM)); DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM)); DECLARE_GROB_INTERFACE(); }; diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 802774e3f2..3e8b65908a 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -165,7 +165,6 @@ (stencil . ,ly:arpeggio::print) (X-extent . ,ly:arpeggio::width) (X-offset . ,ly:side-position-interface::x-aligned-side) - (Y-extent . ,ly:arpeggio::height) (Y-offset . ,ly:staff-symbol-referencer::callback) (meta . ((class . Item) (interfaces . (arpeggio-interface @@ -828,7 +827,6 @@ (stencil . ,ly:hairpin::print) (thickness . 1.0) (to-barline . #t) - (Y-extent . ,ly:hairpin::height) (Y-offset . ,ly:self-alignment-interface::y-aligned-on-self) (meta . ((class . Spanner) (interfaces . (dynamic-interface @@ -2323,13 +2321,20 @@ (set! all-grob-descriptions (sort all-grob-descriptions alist