Knut Petersen <knut_peter...@t-online.de> 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

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to