[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: left-aligning grobs to other grobs
From: |
David Nalesnik |
Subject: |
Re: left-aligning grobs to other grobs |
Date: |
Mon, 14 Mar 2011 14:17:20 -0500 |
On 3/14/11, Gilles THIBAULT <address@hidden> wrote:
>> Attached is a function . . .
>
> Wahoo. Seems to be a very powerfull function. I keep it in my favorites.
> Thanks David.
Glad you can use it!
> 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)))))
Thank you very much! This also fixes the issue of what to do with decimals.
--David