lilypond-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] no-outline-stencil backend property


From: Knut Petersen
Subject: Re: [PATCH] no-outline-stencil backend property
Date: Tue, 24 Jan 2017 18:10:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

Am 24.01.2017 um 14:49 schrieb David Kastrup:

What a steaming heap of something. So your code would likely have
worked in LilyPond 2.16. I think it would make sense to create a new
type of stencil expression explicitly intended to bypass
outlining. Probably by just containing _two_ stencils: one for
typesetting, one for outlining. That would make for a much more
transparent manner of programming things like that.
There's no need for two stencils.
That's what you claim.  And then you use no-outline on your stencil,
yes, here only expr_ is extended, it's still one stencil
and
use \with-dimension in order to stack this with another stencil that has
just a box outline (one that survives into both dimensions as well as
outline).  I still count two.
Why should I use with-dimension? The original stencil and its dimensions
are unchanged and will be used in the stencil interpreter. no-outline() hides
the dimensions from the code in stencil-integral.cc, but they are still present
and the stencil interpreter uses them.

I propose to include the attached code.
Which completely _drops_ any outline.  So if you want a different
outline, you need to combine this with some stencil that has an outline
but no ink.  How do you remove the ink from arbitrary stencils?  You
can't.  So you are tied down to use this trick in connection with
stencils that insist on having an outline but no ink.

David, this is NO-outline code. It' not a fake-some-arbitrary-outline-stencil.

The code is useful for e.g. whiteout, watermarks etc. Define a stencil as usual,
color it, scale it, whatever else. Just mark a stencil x with x.no_outline();

The result is:
        -> the outline is completely ignored in stencil_traverser(), so no 
collisions are detected.
        -> the stencil is drawn in interpret_stencil_expression() as it would 
be drawn without the no_outline layer.

That's the intended use. It's probably much faster than the current solution 
with a transparent
stencil, dimensions forced to zero and delayed evaluation. It is short, 
therefore easy to understand,
and it is elegant.

Really, that makes little sense.
Think again.

Knut



reply via email to

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