[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lyrics break estimation of vertical spacing
From: |
Joe Neeman |
Subject: |
Re: Lyrics break estimation of vertical spacing |
Date: |
Mon, 29 Mar 2010 12:04:42 -0700 |
On Wed, 2010-03-24 at 22:01 -0400, Boris Shingarov wrote:
> First of all, thank you Joe for all the explanations -- now that it
> has dawned on me what the source of confusion was, it all
> makes sense. Thanks!!
>
> > I am now thinking about how to implement this TODO best.
> > One idea that immediately comes to mind, is to replace the
> > unified heights with begin- and rest-of-line pairs, dragging them
>
> Looking at Page_breaking::min_page_count(), I am thinking
> about the correct generalization of the concept of "rod_height",
> so that we would still have one "current position", but two
> "current bottom edges" (so the next current position is calculated
> by juxtaposing the next system's two top edges against these
> current bottom edges).
> The spring length, will also remain one.
>
> Do you agree with this line of thinking, or am I way off with my idea?
I don't think you're way off, but I think you don't need to store an
extra version of rod-height. Just define rod-height to measure the
bottom of the last staff (whether that bottom comes from
begin_of_line_extent or rest_of_line_extent). Each time you add a staff,
you just need to see how far it needs to be from the last staff (this is
where the two separate extents come in) and then you increment
rod_height by
rod_height += distance_between_staves
- min(cur_staff.begin_extent_[DOWN], cur_staff.rest_of_extent_[DOWN])
+ min(last_staff.begin_extent_[DOWN], last_staff.rest_of_extent_[DOWN]);
The minimums and subtraction looks a bit confusing, but you need to
remember that the [DOWN] part of an interval is the smaller number, so
the distance from the middle of a staff to the bottom of the staff is
-min(begin_extent_[DOWN], rest_of_extent_[DOWN])
Cheers,
Joe
- Re: Lyrics break estimation of vertical spacing, (continued)
- Re: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/03/23
- Re: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/03/24
- Re: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/03/24
- Re: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/03/24
- Re: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/03/24
- Re: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/03/24
- Re: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/03/24
- Re: Lyrics break estimation of vertical spacing,
Joe Neeman <=
- Re: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/03/24
- Re: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/03/29
- Re: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/03/29
- Re: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/03/29
- Re: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/03/29
- Re: Lyrics break estimation of vertical spacing, Boris Shingarov, 2010/03/29