Am So., 24. Okt. 2021 um 01:18 Uhr schrieb Aaron Hill <lilyp...@hillvisions.com>: > > On 2021-10-23 5:17 am, Thomas Morley wrote: > > Any hints? > > normalized-endpoints > > 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))) > (start-coord > (cons > (- X-left grob-relative-coord (- left-padding) (/ thick > 2)) > (+ normal-Y-left left-padding-y))) > (end-coord > (cons > (- X-right grob-relative-coord right-padding (- (/ thick > 2))) > (- normal-Y-right right-padding-y current-y-coord)))) > %%%% > > > -- Aaron Hill
Hi Aaron, this does the trick for the vertical values. Though, how could I have found it myself? My lack of C++-knowledge hinders me to understand the "logic from Line_spanner::print". I usually learn things from looking at scheme-codings. But there is none in our source using 'normalized-endpoints, apart from setting it in some grob-definitions. The description reads: "Represents left and right placement over the _total_ spanner, where the _width_ of the spanner is normalized between 0 and 1." I think the wording is misleading, at least "total" means the unbroken spanner for me, thus I never considered to look at it for broken spanners. The word "width" means the extent in X-axis direction, again no reason to look at it for extents in Y-axis. Probably the whole description should be rewritten. Many thanks! Harm P.S. While the Y-values are fixed now, I found some flaw, if left/right padding is not zero. At least for broken or cross-staff Glissando. I'll continue research..., unless someone has another hint?