[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pure accidental height
From: |
Han-Wen Nienhuys |
Subject: |
Re: pure accidental height |
Date: |
Tue, 02 Jan 2007 14:03:02 +0100 |
User-agent: |
Thunderbird 1.5.0.9 (X11/20061219) |
Joe Neeman escreveu:
> diff --git a/lily/grob.cc b/lily/grob.cc
> index 139a387..91f8ce5 100644
> --- a/lily/grob.cc
> +++ b/lily/grob.cc
> @@ -420,11 +420,21 @@ Grob::extent (Grob *refp, Axis a) const
> Interval
> Grob::pure_height (Grob *refp, int start, int end)
> {
> - SCM proc = get_property_data ( ly_symbol2scm ("Y-extent"));
> - Interval iv = robust_scm2interval (call_pure_function (proc,
> - scm_list_1 (self_scm
> ()),
> - start, end),
> - Interval (0, 0));
> + SCM proc = get_property_data (ly_symbol2scm ("Y-extent"));
> + SCM pure_proc = get_property_data (ly_symbol2scm ("pure-Y-extent"));
> + SCM iv_scm;
> +
> + if (ly_is_procedure (pure_proc))
> + iv_scm = scm_apply_3 (pure_proc,
> + self_scm (),
> + scm_from_int (start),
> + scm_from_int (end), SCM_EOL);
> + else
> + iv_scm = call_pure_function (proc,
> + scm_list_1 (self_scm ()),
> + start, end);
> +
> + Interval iv = robust_scm2interval (iv_scm, Interval (0, 0));
> Real offset = pure_relative_y_coordinate (refp, start, end);
>
> SCM min_ext = get_property ("minimum-Y-extent");
> @@ -626,6 +636,7 @@ ADD_INTERFACE (Grob,
> "outside-staff-horizontal-padding "
> "outside-staff-padding "
> "outside-staff-priority "
> + "pure-Y-extent "
I don't understand why this is necessary. I thought you did all
the substitutions in Scheme.
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen
LilyPond Software Design
-- Code for Music Notation
http://www.lilypond-design.com