lilypond-user
[Top][All Lists]
Advanced

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

Re: How to color objects that cause collision


From: Thomas Morley
Subject: Re: How to color objects that cause collision
Date: Fri, 15 Nov 2019 20:49:32 +0100



Am Fr., 15. Nov. 2019 um 01:51 Uhr schrieb Paolo Prete <address@hidden>:
Hello,

I think that a very useful function would be a way to highlight or change the color for all the objects that are causing a collision.
Is there already some code for that? 

Well, you would need to define what exactly _is_a collision?
Printing one grob above the other?
No, can't be a sufficient condition.

Look at this code:
{
  \override Stem.color = #red
  \override Stem.layer = -1000
  b8[
  \override Stem.layer = 1000
  b8]
}

Obviously the Clef collides with StaffSymbol, as well as the TimeSignature.
The NoteHeadcollides with the LedgerLine and Stem.
The Stem collides with the Beam, which collides with the StaffSymbol.

Ofcourse all this is wished.

How to limit to unwished things?
And if unwished things happens, then because Grobs are not aware of each other. Making it difficult to get something like a "collision yes/no"-info out of LilyPond....

I don't see how to solve.


Cheers,
  Harm

reply via email to

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