A pure callback is one that has no side-effects. In define-grobs.scm, you will find a list of pure callbacks, along with an associative list that allows you to substitute a non-pure callback for a pure one.
Pure callbacks are important for spacing and page-breaking, particularly pure Y-extent and Y-offset callbacks. For example, a slur cannot know its true Y-extent until after the page breaks, line breaks, and horizontal spacing have been completed. But we need to know its Y-extent while computing the page breaking, so we can see if things fit on a page without collisions; hence ly:slur::pure-height. Cheers, Joe On Tue, May 24, 2011 at 10:31 AM, m...@apollinemike.com < m...@apollinemike.com> wrote: > Hey all, > > I think I've asked this question before, but I can't find the response - > sorry if I'm repeating myself! > > Could someone please send me a paragraph-long response about what pure > properties are and how/when/why they're used? The more sequential, the > better (i.e. pure properties are defined in X for the purpose of doing Y > when lilypond hits function Z). git grep shows the word `pure' all over the > place, and I feel kinda stupid not knowing what pure means in the LilyPond > lingo. I'm writing a patch right now that allows LilyPond to do multiple > passes through a score to fix several spacing issues I've run into, and > before taking it on seriously I'd like to fill this gap in my knowledge of > the program. > > Cheers, > Mike > _______________________________________________ > lilypond-devel mailing list > lilypond-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-devel >
_______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel