[Top][All Lists]

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

Re: Duplication of pages with slight changes to color of grobs?

From: David Kastrup
Subject: Re: Duplication of pages with slight changes to color of grobs?
Date: Sun, 23 Jul 2017 11:31:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Knut Petersen <address@hidden> writes:

> Hi Paul!
>>> B) Is there a practical way to redefine color? within a .ly file in
>>> a way that it is recognized
>>> by lilyponds code?
>> I take it you have tried this?
>> #(define (color? ...) ...)
> ;-)  Also "#(set! ...." does not help ...

Well, the problem is that the signature looks something like

(list color? ...)

and is stored with the functions.  That is, the symbol resolution has
already been done.

Things would be different if the stored value were

(lambda () (list color? ...))

in which case the signature would notice the change of color? (in newer
LilyPond versions at least).

>> Would it help to define your own custom properties (grob or context)
>> to avoid overloading the color property.  I have this in my include
>> file for Clairnote:
> Interesting approach ... I think it would only shift the problem to
> other places in the code.

Well, but they might be less surprising.  I am also not sure that our
color? definition is the knee's bees: it does not appear suitable for
CMYK or RGBA or other possibly backend-specific definitions.

Still, a color that is not actually fixed at the time a grob is put to
"paper" seems strange, to say the least.

David Kastrup

reply via email to

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