On 2024-03-13 17:35, Thomas Morley wrote:
currently I'm attempting to improve dashed/dotted bar lines wrt to
changed staff-space and span bars.
We use both definitions for BarLine _and_ SpanBar, but then SpanBar is
frequently a little off.
It would be nice to have a possibility to detect whether a definition
is used for span bars.
What specifically do you want to know? Do you expect to code something like
if the grob is a BarLine:
adjust ... by ...
if the grob is a Divisio:
adjust ... by ...
if the grob is a SpanBar:
adjust ... by ...
If so, it seems that you could add a grob property for that adjustment
and get it from the grob.
#(define (make-test-bar-line grob extent)
(let ((grob::make-span-bar? #f))
Another possibility is for the grob's print procedure to pass more
information down to this function. That might be more appropriate if
the information you require is not associated with the grob only, but is
derived from a number of sources, like the surrounding staves, and would
be useful for many different glyph print procedures. Of course,
ly:bar-line::print would provide values appropriate for bar lines and
ly:span-bar::print would provide values appropriate for span bars.
These are the opinions off the top of my head and I reserve the right to
change them.
--
Dan