lilypond-devel
[Top][All Lists]
Advanced

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

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)


From: mtsolo
Subject: Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)
Date: Wed, 02 Mar 2011 00:10:37 +0000

Hey all,

I'm having a lot of difficulty with the problem Neil pointed out.  If
anyone has any suggestions on how to solve it, please let me know!  I
believe that this problem will rear its ugly head for all grobs at a
line break with a break-visibility setting.

Thank you very much Neil for your input!

Cheers,
MS


http://codereview.appspot.com/4213042/diff/24025/lily/balloon-engraver.cc
File lily/balloon-engraver.cc (right):

http://codereview.appspot.com/4213042/diff/24025/lily/balloon-engraver.cc#newcode65
lily/balloon-engraver.cc:65: Pointer_group_interface::add_grob (g,
ly_symbol2scm ("annotations"), b);
On 2011/03/01 22:15:37, Neil Puttock wrote:
remove (and all related code)

Done.

http://codereview.appspot.com/4213042/diff/24025/lily/grob.cc
File lily/grob.cc (right):

http://codereview.appspot.com/4213042/diff/24025/lily/grob.cc#newcode257
lily/grob.cc:257: extract_grob_set (this, "annotations", annotations);
On 2011/03/01 22:15:37, Neil Puttock wrote:
I'm not sure what you were thinking here, but this would never get
called anyway
since object_alist_ is empty :)

Sometimes I miss these things...I'm still getting to know the source.  I
see that now - thanks!!

http://codereview.appspot.com/4213042/diff/24025/lily/page-spacing.cc
File lily/page-spacing.cc (right):

http://codereview.appspot.com/4213042/diff/24025/lily/page-spacing.cc#newcode87
lily/page-spacing.cc:87: return footnote_height;
On 2011/03/01 22:15:37, Neil Puttock wrote:
This produces incorrect results in some cases, since footnotes_ is
initialized
before line breaking has taken place.  For example, compare the return
values
for the following snippets:

\relative c' {
   \repeat unfold 3 \footnoteGrob #'NoteHead #'(0 . 2) "foo" "bar"
   c1
}

\new Staff \with { \consists "Footnote_engraver" }
\relative c' {
   \footnoteGrob #'TimeSignature #'(0 . 2) "foo" "bar"
   c1
}

This is proving to be really, really hard to fix (either that or I'm not
creative enough...probably a combination of both).  Where exactly does
the line breaking take place?  I don't mind re-populating the footnotes_
vector after the line breaking and/or populating it at a later time, but
I'm not sure when that time would be.

http://codereview.appspot.com/4213042/



reply via email to

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