lilypond-user
[Top][All Lists]
Advanced

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

Re: a proper whiteout function


From: Pierre Perol-Schneider
Subject: Re: a proper whiteout function
Date: Wed, 29 Apr 2015 12:23:55 +0200

Just thinking...
Here's a rough path drawing that could do the job:

\version "2.19.19"

\markup {
  \combine
  \with-color #magenta
  \path #0.3 #'(
     (moveto   1.17   -0.50)
     (curveto   1.24   -0.53   1.33  -0.43   1.24  -0.36)
     (curveto   0.76   -0.07   0.82   0.57   1.49   0.62)
     (curveto   2.50    0.60   2.54  -0.65   1.77  -0.84)
     (curveto   0.89   -1.02   0.50  -0.54   0.35  -0.20)
     (curveto   0.26    0.00   0.07   0.63   1.18   1.77)
     (curveto   2.04    2.70   2.19   3.28   1.81   4.20)
     (curveto   1.63    4.62   1.52   4.71   1.49   4.76)
     (curveto   1.47    4.79   1.43   4.79   1.40   4.76)
     (curveto   1.09    4.51   0.84   4.15   0.82   3.70)
     (curveto   0.80    3.00   0.88   2.70   1.03   2.15)
     (curveto   1.35    1.00   1.48   0.51   1.69  -0.90)
     (curveto   1.93   -2.80   0.68  -2.44   0.57  -2.09)
     (curveto   1.30   -2.34   1.25  -1.07   0.49  -1.39)
     (curveto   0.32   -1.48   0.23  -1.61   0.28  -1.90)
     (curveto   0.39   -2.72   2.12  -3.04   1.85  -0.95)
     (curveto   1.62    0.70   1.52   0.90   1.21   2.10)
     (curveto   0.75    3.46   1.14   3.90   1.64   4.20)
     (curveto   1.86    3.49   1.70   3.05   1.10   2.31)
     (curveto   0.08    1.24   0.00   0.80   0.00   0.45)
     (curveto   0.00   -0.51   0.73  -1.20   1.72  -1.00)
     (curveto   2.98   -0.72   2.80   1.15   1.45   1.04)
     (curveto   0.50    0.95   0.52  -0.25   1.17  -0.50)
     )
  \translate #'(0.015 . 0)
  \musicglyph #"clefs.G"
}

Note: X translation is 0.5 * 'line thickness'

The "only" problem is to find a way to get all glyphs coordinates automagically ...

Cheers,
Pierre


2015-04-29 12:04 GMT+02:00 Pierre Perol-Schneider <address@hidden>:
Hi Kieren, Hi Carl,

I don't think that a standard scaling will help in this case.
Here's an illustration of what could happened :

\markup {
  \combine
  \with-color #magenta
  \scale #'(1.2 . 1.2)
  \musicglyph #"clefs.G"
  \musicglyph #"clefs.G"
}

Whatever glyph re-centering, you'll never get a proper whiteout.
One has to define a specific scaling function that can "blows" the glyph in order to get a bold one.

Cheers,
Pierre



2015-04-29 2:26 GMT+02:00 Kieren MacMillan <address@hidden>:
Hi Carl,

>> 1. follow exactly the grob/glyph outline (i.e., not just a rectangle/box,
>> as currently implemented);
>> 2. include a parameter to set the thickness of the outline; and
>> 3. include a parameter to determine whether the whiteout was filled
>> throughout, or allowed ³holes² inside (as per the grob/glyph outline).
>
> I think that doing all 3 things is virtually impossible, given my
> understanding of the current state of stencil handling.

Okay. Thanks for the information.

> I think that a stencil whiteout for simple stencils could be created by
> combining two stencils:
> 1) the original stencil
> 2) a scaled version of the original stencil, colored white, and placed on
> a lower layer
> The amount of scaling would determine the thickness of the outline.
> There would be no way of dealing properly with holes.

That might be sufficient for the vast majority of cases I’ve seen.
I’ll see if I can work out a quick Scheme function to accomplish what you’ve suggested here.

Thanks,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: address@hidden


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user



reply via email to

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