Le 27/08/2022 à 13:55, Thomas Morley a écrit :
I foresee some hard to solve problems, though. I'm currently not sure
about the success.


IUUC, you have a problem to draw the grob with both a vertical and a horizontal line, because the usual way to make the vertical line place itself against the notes with some padding would be Y-offset = side-position-interface::y-aligned-side, but this requires the Y-extent + vertical-skylines, and those depend on the full stencil, and the vertical part of the line depends on the Y-offset, so you have
a cyclic dependency.

Tricky, yes. OTOH, would it work to have two separate grobs, one for the horizontal
line and one for the vertical one? Say,

BarreVerticalLine

  - an Item
  - has 'horizontal-line pointer to a BarreHorizontalLine
  - stencil = a function that takes the coordinate of the
    'horizontal-line, and draws a vertical line up to that
    height
  - X-extent = a function that essentially does

      (symmetric-interval thickness)

    (it can't be computed from the stencil, since as BarreVerticalLine
     is an Item its X-extent will be asked for before line breaking)

  - Y-extent = an unpure-pure container (ask me for details if
    needed)

BarreHorizontalLine

  - a Spanner
  - has horizontal-line-spanner-interface, uses it for bound-details.
    Uses ly:line-spanner::print for stencil. This is all quite similar
    to TextSpanner.

Just in case that helps.

Jean



Reply via email to