lilypond-user
[Top][All Lists]
Advanced

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

Re: [PATCH] Re: Duration dots and Bar lines on custom Staves.


From: Neil Puttock
Subject: Re: [PATCH] Re: Duration dots and Bar lines on custom Staves.
Date: Wed, 6 Aug 2008 22:39:17 +0100

2008/7/27 Han-Wen Nienhuys <address@hidden>:

> I don't understand the original code. 'me' should already be the
> staff-symbol

That's only true for Staff_symbol_referencer::on_line () before the patch.

The revised version, Staff_symbol::on_line (), deals with two separate
cases, i.e., standard staves with 'line-count and exotic staves with
'line-positions. It doesn't return the correct boolean value when
called for ties and dots, since in these cases 'me' isn't the
staff-symbol and line_count (me) will be zero here:

return ((abs (pos + line_count (me)) % 2) == 1);

You can see the result in the regtest example below (based on current
git); as it stands, on_line () only works properly when
'line-positions is set.

As a better solution than the quick fix I posted previously, I propose
moving on_line () back to staff-symbol-referencer.cc and creating a
new method get_line_positions () to retrieve 'line-positions safely.

Is this patch OK?

Regards,
Neil

Attachment: 0001-Revised-fix-for-Staff_symbol_referencer-on_line.patch
Description: Text Data

Attachment: lily-88ca2c79.compare.jpeg
Description: JPEG image


reply via email to

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