bug-lilypond
[Top][All Lists]
Advanced

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

Re: Something wrong/strange about flags?


From: Thomas Morley
Subject: Re: Something wrong/strange about flags?
Date: Mon, 26 Dec 2011 00:01:11 +0100

Hi Neil,

2011/12/25 Neil Puttock <address@hidden>:
>
> On 25 Dec 2011 22:27, "Thomas Morley" <address@hidden> wrote:
>
>> 1. IR 3.2.109 stem-interface states: "flag (graphical (layout) object)
>>  A pointer to a Flag object."
>>    I would have expected: () (there is no flag!)
>
> The unused flag is suicided.  A pointer to the suicided grob still exists.
>
>> 2. AFAIK a Grob "Item" doesn't exist. IR 3.2.49 item-interface states
>> only that there is a subtype of grobs called Item.
>
> The Item class includes all grobs which represent discrete graphical objects
> such as font glyphs or abstract objects which contain other grobs.  When a
> grob is suicided, most of its properties are cleared, including the name, so
> the scheme print function defaults to the class name (Item or Spanner in
> most cases).
>
> Cheers,
> Neil

thanks for the explication.

I think there could be some difficulties to find the correct
condition, when I create my own definitions/functions:

\version "2.15.20"

displayGrob =
       \once\override Stem #'after-line-breaking =
       #(lambda (grob)
         (let* ((beam (ly:grob-object grob 'beam))
                (flag (ly:grob-object grob 'flag)))

         (begin
           (if (ly:grob? beam)
               (display "Yes")
               (display "No"))
           (newline)
           (if (ly:grob? flag)
               (display "Yes")
               (display "No"))
           (newline))))

{ \displayGrob c'8[ d'] }

I retrieve "Yes" in both cases.


Cheers,
  Harm



reply via email to

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