lilypond-devel
[Top][All Lists]
Advanced

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

Re: Add scheme procedure that gets paper column rank (issue 281020043 by


From: paulwmorris
Subject: Re: Add scheme procedure that gets paper column rank (issue 281020043 by address@hidden)
Date: Tue, 15 Dec 2015 23:04:55 +0000

On 2015/12/15 22:26:01, dak wrote:
Not sure what you need it for.

I was working on a Scheme rewrite of ly:ledger-line-spanner::print,
to allow for some local customizations.  It uses the rank of paper
columns,
namely, around line 210 in ledger-line-spanner.cc

          Direction vdir = Direction (sign (pos));
          int rank = h->get_column ()->get_rank ();

          reqs[rank][vdir].ledger_extent_.unite (ledger_extent);
          reqs[rank][vdir].head_extent_.unite (head_extent);
          reqs[rank][vdir].position_
            = vdir * max (vdir * reqs[rank][vdir].position_, vdir *
pos);

For each note head the code gets the rank of the note head's paper
column as a way to effectively associate the note heads that belong
to the same column... and thus calculate, for each column, the furthest
note head position, how wide the ledger lines need to be, etc.

Would it be more generic to provide
spanned_rank_interval ()?  That should be defined for every grob.
Probably also
for paper columns?

I don't know enough about spanned_rank_interval to say for sure.  (I
looked
it up in grob.cc)  If it could be used to group note heads by paper
column
(as with paper column rank) then it should work and be more generic.


https://codereview.appspot.com/281020043/



reply via email to

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