[Top][All Lists]

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

Re: Start, end, gradient of Glissando

From: Aaron Hill
Subject: Re: Start, end, gradient of Glissando
Date: Sat, 23 Oct 2021 16:18:05 -0700
User-agent: Roundcube Webmail/1.4.9

On 2021-10-23 5:17 am, Thomas Morley wrote:
Any hints?


Your Y-left and Y-right are the extreme values that have not been interpolated using the values from normalized-endpoints. Borrowing logic from Line_spanner::print, here is a modification to your test code:

(normalized-endpoints (ly:grob-property grob 'normalized-endpoints))
           (Y-length (- Y-right Y-left))
(normal-Y-left (+ Y-left (* (car normalized-endpoints) Y-length))) (normal-Y-right (- Y-right (* (- 1 (cdr normalized-endpoints)) Y-length)))
(- X-left grob-relative-coord (- left-padding) (/ thick 2))
               (+ normal-Y-left left-padding-y)))
(- X-right grob-relative-coord right-padding (- (/ thick 2)))
               (- normal-Y-right right-padding-y current-y-coord))))

-- Aaron Hill

reply via email to

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