Re: Spacing with empty contexts; issue 1669 (issue 4515158)

2013-02-10 Thread m...@mikesolomon.org
On 11 févr. 2013, at 06:41, k-ohara5...@oco.net wrote:

> 
> https://codereview.appspot.com/4515158/diff/2009/lily/align-interface.cc
> File lily/align-interface.cc (right):
> 
> https://codereview.appspot.com/4515158/diff/2009/lily/align-interface.cc#newcode222
> lily/align-interface.cc:222: dy = max (dy, min_distance);
> On 2013/02/11 05:01:28, MikeSol wrote:
> 
>> Couldn't there just be a vector ignore_me that contains the
> result
>> request_suicide for all elements (when pure)?  Then, the for loop
> would be
>> continued for these elements and they wouldn't have to be removed in
>> get_skylines.
> 
> I think yes. ('removed_as_empty' would be a good name)
> That array could be built by get_skylines(), since it already calls
> pure_height(), which in turn calls request_suicide(..., start, end).
> 
> To truly distinguish the concepts of 'empty' versus 'removed', we could,
> in get_skylines line 98
> else if ( !(removed_as_empty[i] = request_suicide(elements[i], start,
> end)))
> but that results in an additional call to request_suicide() per
> VertAxisGroup per pass through the line-breaking

Ok - I'll be able to work on this once the assertion error clears up from 
annotate-spacing (reported to the bug list a few minutes ago).

Cheers,
MS
___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: Spacing with empty contexts; issue 1669 (issue 4515158)

2013-02-10 Thread k-ohara5a5a


https://codereview.appspot.com/4515158/diff/2009/lily/align-interface.cc
File lily/align-interface.cc (right):

https://codereview.appspot.com/4515158/diff/2009/lily/align-interface.cc#newcode222
lily/align-interface.cc:222: dy = max (dy, min_distance);
On 2013/02/11 05:01:28, MikeSol wrote:


Couldn't there just be a vector ignore_me that contains the

result

request_suicide for all elements (when pure)?  Then, the for loop

would be

continued for these elements and they wouldn't have to be removed in
get_skylines.


I think yes. ('removed_as_empty' would be a good name)
That array could be built by get_skylines(), since it already calls
pure_height(), which in turn calls request_suicide(..., start, end).

To truly distinguish the concepts of 'empty' versus 'removed', we could,
in get_skylines line 98
else if ( !(removed_as_empty[i] = request_suicide(elements[i], start,
end)))
but that results in an additional call to request_suicide() per
VertAxisGroup per pass through the line-breaking

https://codereview.appspot.com/4515158/diff/2009/lily/align-interface.cc#newcode229
lily/align-interface.cc:229: // So if stretchability=0, treat
basic-distance as a minimum-distance.
On 2011/06/07 04:48:01, joeneeman wrote:

This is no longer needed, right?


This chunk is now no longer needed.

https://codereview.appspot.com/4515158/

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


Re: Spacing with empty contexts; issue 1669 (issue 4515158)

2013-02-10 Thread mtsolo


https://codereview.appspot.com/4515158/diff/2009/lily/align-interface.cc
File lily/align-interface.cc (right):

https://codereview.appspot.com/4515158/diff/2009/lily/align-interface.cc#newcode222
lily/align-interface.cc:222: dy = max (dy, min_distance);
On 2011/06/09 02:55:55, Keith wrote:

On 2011/06/07 04:48:01, joeneeman wrote:
> If pure is true, there may be some staves that are going to be

removed.

However,
> these staves won't be removed until after line-breaking.



... and, as you say, these staves are not yet removed when

Y-extent-estimates

for the page breaker are calculated, so this patch messes up the page

breaker.


If the page breaker depends on empty, but living, staves disappearing

for

vertical spacing purposes, then maybe empty staves should be treated

that way

consistently. That would be tantamount to giving all empty-able

contexts the

hara-kiri engraver, as you suggested much earlier.



The obvious alternative would be to have the empty staves decide

whether to

suicide before page breaking, but my suspicion is that is awkward, or

it would

have been done that way at first.



Having minimum_distances() change behavior based on whether 'pure' is

true is

too tricky for me. (how do we know that any staff that is empty we are

pure will

suicide later)



I'll think on it, but mark the patch as abandoned for now.


Couldn't there just be a vector ignore_me that contains the result
request_suicide for all elements (when pure)?  Then, the for loop would
be continued for these elements and they wouldn't have to be removed in
get_skylines.

https://codereview.appspot.com/4515158/

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