On 1 avr. 2013, at 14:13, Janek Warchoł <janek.lilyp...@gmail.com> wrote:
> Hi all, > > On Mon, Apr 1, 2013 at 7:52 AM, <mts...@gmail.com> wrote: >> I'd recommend adding a sort of padding property to the >> self-alignment-interface to get it completely there. >> That is, imagine that we right align to a grob and we want >> to be padded by 0.1 We should be able to do that. >> That'd allow self-alignment-interface to be used >> for grobs like InstrumentName. > > I think that this should be done by manipulating extents: > if i want an InstrumentName to be "horizontally-aligned- > with-padding", i add desired padding value to its X-extent, > and voilà! LilyPond thinks that InstrumentName is slightly bigger, > aligns it as if it was slightly bigger, and thus it ends up padded. > What do you think? X-extent is used in many things other than self alignment positioning, so u don't want to change extents. Every positioning in LilyPond has some notion of padding save this interface. It would be a good addition, but could easily be in a follow-up patch. > > As for chain_offset_callback, i've tried it (see attached patch), but > i get a strange error: > > Processing `input/regression/add-stem-support.ly' > Parsing... > Interpreting music... > Preprocessing graphical objects...ERROR: > In procedure ly:self-alignment-interface::x-align-grob: > ERROR: Wrong number of arguments to > #<primitive-procedure ly:self-alignment-interface::x-align-grob> > > quite frankly, i don't know what's wrong. > I've looked at other uses of chain_offset_callback > and it seems that i've written my code correctly. > I'll look into it when I get home. > PS i'll look into Ambitus extent later - right now i'm getting some > unexpected regressions after doing some additional modifications. > <0001-use-chain-offsets-instead-of-setting-properties.patch> _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel