lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue 3330: redo much of the stencil stacking/spacing/empty-check (i


From: dak
Subject: Re: Issue 3330: redo much of the stencil stacking/spacing/empty-check (issue 8869044)
Date: Fri, 03 May 2013 07:37:52 +0000

On 2013/05/03 05:18:26, Keith wrote:
Shucks.  It gets difficult to space a list of stencils if all you have
to work
with are the refpoint and extents of the next stencil, and the
composite of
those accumulated so far.

What we would like is :
\line {a b c ... } places the left extent of each markup in the list
against the
right extent of the previous markup, plus padding specified by the
property
'word-space.  The result is a markup with extent that encloses the
extents of
all the individual markups, and overall reference point at the
reference point
of the first markup 'a'.

We just need to keep track of one variable: the right extent of the
most-recently placed markup.  Too bad Scheme doesn't provide a way to
keep a
running variable as you walk the list.  I guess that is why procedural
languages
are so much better than functional languages.

Uh what?  Named lets are pretty fine for doing that sort of thing.  I
don't keep additional state variables in order to make the behavior more
predictable and become less dependent on assembly order.

Come to think of it: stack-stencil-lines should be doable without
additional state variables by going backwards in the list.

https://codereview.appspot.com/8869044/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]