[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Creates a glissando stem grob that uses stems' functionality. (issue
From: |
Han-Wen Nienhuys |
Subject: |
Re: Creates a glissando stem grob that uses stems' functionality. (issue4777044) |
Date: |
Wed, 20 Jul 2011 23:35:51 -0300 |
On Wed, Jul 20, 2011 at 11:30 PM, Han-Wen Nienhuys <address@hidden> wrote:
>>> http://codereview.appspot.com/4777044/diff/7001/lily/beam.cc#newcode706
>>> lily/beam.cc:706: Interval positions = robust_scm2interval
>>> ((*s)->get_property ("head-positions"), Interval (0,0));
>>> rather than changing all callers, why don't you put the get_property in
>>> Stem::head_positions() ?
>>>
>>
>> Whatever is more LilyPondish I'll do - your suggestion would require
>> creating another callback for the property, which seems like it may create
>> confusion for future programmers (i.e. why is head_positions called in place
>> X but the property head-positions called in place Y?). That's the reason I
>> swapped out the function with property calls. But, again, I'm a relative
>> newb - whatever you think is best I'll do.
>
> You'd move the current code for head_positions() into a
> calc_head_positions callback.
Oh, you already did that.
In order to have as little moving pieces as possible, put the
get_property() and the conversion in head_positions(), and leave the
callers alone. We can later decide to drop head_positions(), but it's
not really necessary. There are many such C++ functions that are
shortcuts for a get_property, eg., Beam::get_beam_thickness
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen
- Creates a glissando stem grob that uses stems' functionality. (issue4777044), mtsolo, 2011/07/20
- Re: Creates a glissando stem grob that uses stems' functionality. (issue4777044), n . puttock, 2011/07/20
- Re: Creates a glissando stem grob that uses stems' functionality. (issue4777044), address@hidden, 2011/07/20
- Music functions with pitch and duration arguments (was: Creates a glissando stem grob that uses stems' functionality. (issue4777044)), David Kastrup, 2011/07/21
- Re: Music functions with pitch and duration arguments (was: Creates a glissando stem grob that uses stems' functionality. (issue4777044)), Han-Wen Nienhuys, 2011/07/21
- Re: Music functions with pitch and duration arguments, David Kastrup, 2011/07/22
- Re: Music functions with pitch and duration arguments, Han-Wen Nienhuys, 2011/07/22
- Re: Music functions with pitch and duration arguments, David Kastrup, 2011/07/22
- Review music functions with pitch and duration arguments (was: Music functions with pitch and duration arguments), David Kastrup, 2011/07/22
- Re: Review music functions with pitch and duration arguments, David Kastrup, 2011/07/23
- Re: Review music functions with pitch and duration arguments, David Kastrup, 2011/07/24