lilypond-user
[Top][All Lists]
Advanced

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

Re: left-aligning grobs to other grobs


From: Gilles THIBAULT
Subject: Re: left-aligning grobs to other grobs
Date: Mon, 14 Mar 2011 10:33:14 +0100




Attached is a function . . .

Wahoo. Seems to be a very powerfull function. I keep it in my favorites.
Thanks David.

Gilles

NB
If the user enters the value 2 for example as the dir parameter, the function fails.
Using = < and >  in the last cond expression avoids that.
(ly:grob-set-property! grob 'extra-offset
    `(,(cond ((< $dir 0) (- (ly:grob-relative-coordinate ref sys X)
          default-coord))
      ((= $dir 0)  (- (interval-center (ly:grob-extent ref sys X))
          (interval-center (ly:grob-extent grob sys X))))
      ((> $dir 0)  (- (cdr (ly:grob-extent ref sys X))
          (cdr (ly:grob-extent grob sys X)))))

  . ,$corr)))))
Well, it 's just a nitpick.




reply via email to

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