From: Han-Wen Nienhuys Date: Wed, 3 Jan 2007 15:31:30 +0000 (+0100) Subject: add Rest::pure_height. X-Git-Tag: release/2.11.8-1~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d8ad05188d0b41933e722fab223f695416efc637;p=lilypond.git add Rest::pure_height. --- diff --git a/lily/include/rest.hh b/lily/include/rest.hh index 20107120b7..5399c203fd 100644 --- a/lily/include/rest.hh +++ b/lily/include/rest.hh @@ -25,5 +25,6 @@ public: DECLARE_SCHEME_CALLBACK (print, (SCM)); DECLARE_SCHEME_CALLBACK (width, (SCM)); DECLARE_SCHEME_CALLBACK (height, (SCM)); + DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM)); }; #endif // REST_HH diff --git a/lily/rest.cc b/lily/rest.cc index e3543e4cb9..64a3eb87cd 100644 --- a/lily/rest.cc +++ b/lily/rest.cc @@ -187,12 +187,25 @@ Rest::generic_extent_callback (Grob *me, Axis a) return ly_interval2scm (unsmob_stencil (m)->extent (a)); } +MAKE_SCHEME_CALLBACK (Rest, pure_height, 3); +SCM +Rest::pure_height (SCM smob, SCM start, SCM end) +{ + (void) start; + (void) end; + + Grob *me = unsmob_grob (smob); + SCM m = brew_internal_stencil (me, false); + return ly_interval2scm (unsmob_stencil (m)->extent (Y_AXIS)); +} + ADD_INTERFACE (Rest, "A rest symbol.", /* properties */ - "style " "direction " - "minimum-distance"); + "minimum-distance " + "style " + ); diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index d6265e851b..5e17ff84b9 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -665,13 +665,6 @@ (self-alignment-X . 0) (self-alignment-Y . 0) (script-priority . 100) - - (after-line-breaking . ,(lambda (grob) - (display (list - (ly:grob-extent grob (ly:grob-parent grob X) X) - " " - (ly:grob-relative-coordinate grob (ly:grob-parent grob X) X) "\n")))) - (stencil . ,ly:text-interface::print) (direction . ,ly:script-interface::calc-direction) (text . ,fingering::calc-text) @@ -2131,6 +2124,7 @@ (list `(,ly:slur::outside-slur-callback . ,ly:slur::pure-outside-slur-callback) `(,ly:stem::height . ,ly:stem::pure-height) + `(,ly:rest::height . ,ly:rest::pure-height) `(,ly:grob::stencil-height . ,pure-stencil-height) `(,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side) `(,ly:axis-group-interface::height . ,ly:axis-group-interface::pure-height) @@ -2140,7 +2134,6 @@ (define pure-functions (list - ly:rest::height ly:staff-symbol-referencer::callback ly:staff-symbol::height))