[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PATCH: Lyrics break estimation of vertical spacing
From: |
Joe Neeman |
Subject: |
Re: PATCH: Lyrics break estimation of vertical spacing |
Date: |
Thu, 08 Apr 2010 23:45:25 -0700 |
On Fri, 2010-04-09 at 02:30 -0400, Boris Shingarov wrote:
> What I am stuck on now, is the function
> Align_interface::get_minimum_translations().
> Could you explain the high-level design of what this is doing?
The function builds a skyline for each staff/lyrics/etc, then compares
the skylines to find the minimum amounts that each staff must be moved
down so that no collisions occur.
> In all cases in the book I am trying to typeset, everything appears
> to work A-ok, but on the "hara-kiri-pianostaff" regtest, this now returns
> an empty vector of offsets when called from
> System::part_of_line_pure_height(),
> but the corresponding vector of staves is non-empty, which causes
> a segfault when trying to translate the 0th staff.
get_skylines modifies its elems argument, removing all staves that are
empty. If every staff is empty (which happens in hara-kiri-pianostaff,
IIRC) then get_skylines doesn't return any skylines and hence
get_minimum_translations (see align-interface.cc:226) returns an empty
vector. I'm not actually sure why it does this (instead of returning,
say, a vector of zeros) so if the regression tests pass, I'd be ok with
changing this. Alternatively, you could just check explicitly for an
empty result in System::part_of_line_pure_height.
Cheers,
Joe
- Re: PATCH: Lyrics break estimation of vertical spacing, Joe Neeman, 2010/04/04
- Re: PATCH: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/04/05
- Re: PATCH: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/04/09
- Re: PATCH: Lyrics break estimation of vertical spacing,
Joe Neeman <=
- Re: PATCH: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/04/09
- Re: PATCH: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/04/09
- Re: PATCH: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/04/12
- Re: PATCH: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/04/12
- Re: PATCH: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/04/12