lilypond-devel
[Top][All Lists]
Advanced

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

Re: Adds dimension stencil command to correct with-dimension (issue 1295


From: dak
Subject: Re: Adds dimension stencil command to correct with-dimension (issue 12957047)
Date: Sun, 25 Aug 2013 13:04:14 +0000

On 2013/08/25 08:22:01, mike7 wrote:
On 25 août 2013, at 09:15, mailto:address@hidden wrote:

> A second stencil is not a very good data structure for reserving
space.
> Skylines are better at this, and we can \once\override 'padding and
> 'horizon-padding to get padding that follows the outlines of the
> stencil.
[...]
If
we're going to do that, then we should think of the general problem
we're trying
to solve.  To me, the general problem seems to be "how can we replace
the
outline of one shape with that of another?"

No, that is _absolutely_ not the general problem here.  The general
problem is: "how can we replace the outline/skylines of one stencil with
a different outline/skyline?"

Requiring the replacement to be the outline/skyline of an actually
existing stencil is _not_ the general problem.  Why should we need to
create a stencil in the first place if what we want is a horizontal and
a vertical skyline pair?

You create a "filled box" here for \with-dimensions.  That's absurd.
Worse: if you want to compute a skyline _from_ an existing skyline,
there is no way.  You first have to figure out what _stencil_ would have
the kind of skyline you want.

So far, this question is only ever
asked in the specific form "how can we replace the outline of one
shape with a
box?"

No.  With regard to \with-dimensions, the question is how to replace the
outline of one shape with two specified extents.  For pad-x, the
question is how to replace the _horizontal_ (?) skylines with _one_
specified extent calculated from box extents.  Actually, I'd argue that
it would make more sense to shift the horizontal skylines rather than
place an extent.

But I think if we hardcode the "box" in that question (as both of our
initial patch sets do), we will lead to the proliferation of multiple
stencil
primitives for different shapes if the need comes up.

You need a primitive for replacing a subset of four skylines.  And it is
not a primitive but a derived operation, so the backends do not need to
know about it.

The necessity that comes to mind for the more general solution is the
work I did
on line spanners, where we often want different skyline padding for
the word in
the spanner and the line.

"Different skyline padding" is not the same as "skyline of an existing
different stencil".

https://codereview.appspot.com/12957047/

reply via email to

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