[Top][All Lists]

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

Re: Move ambitus print callback to scheme.

From: n . puttock
Subject: Re: Move ambitus print callback to scheme.
Date: Fri, 21 Aug 2009 00:35:42 +0000

Reviewers: hanwenn,

On 2009/08/20 03:12:26, hanwenn wrote:
File scm/output-lib.scm (right):
Line 778: (ly:grob-suicide! grob)
this does not make sense. did you forget to check the length of the
array? - why would someone not set join-heads?

I don't know; I just copied it from the C++ code.  Since it's possible
to hide the line using 'transparent or 'stencil, I guess it's pretty
much redundant anyway.
Line 782: (head-up (ly:grob-array-ref heads 1))
you need to check the length of the array

I thought this would be unnecessary, since the array must have two
elements ordered by pitch if the pitch interval isn't empty; otherwise
the engraver suicides the AmbitusLine.

Of course, if you prefer, I'll add a check using ly:grob-array-length.
Line 795: (x-ext (cons (/ (- width) 2) (/ width 2)))
this looks like a nice candidate for a small function

   (symmetric-interval (/ width 2))

Line 801: (ly:grob-suicide! grob))))))
it would be nice to explicitly return something, eg '() in the suicide
case -
with all the nesting it is hard to tell what the final result is.



Move ambitus print callback to scheme.

* implement ambitus::print callback in output-lib.scm

* add interface description to define-grob-interfaces.scm

* allow user override of padding using grob property 'gap

* move 'join-heads to user properties

* remove

* tidy

* add regression test for 'gap

* add convert rule for ly:ambitus::print

Please review this at

Affected files:
  A input/regression/
  M input/regression/
  M lily/
  M lily/
  M lily/include/ambitus.hh
  M python/
  M scm/define-grob-interfaces.scm
  M scm/define-grob-properties.scm
  M scm/define-grobs.scm
  M scm/output-lib.scm
  M scm/safe-lily.scm

reply via email to

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