On 22.12.2016 17:43, Kieren MacMillan wrote:
Hello all,
Is there a way to use the built-in \draw-line markup command, but with a square
cap and not the [lovely!] rounded cap default?
Tried \override #'(line-cap-style . square), but that didn’t seem to work.
If you specifically want to use the built-in command, no, there’s no
way. make-line-stencil, defined in scm/stencil.scm, doesn’t support
changing line-cap-style. However, make-path-stencil and the \path markup
command do, so I’d suggest creating a front-end taking the same
arguments as \draw-line, with the additional line-cap-style property:
%%%%%%%%%%%
\version "2.19.53"
#(define-markup-command (path-draw-line layout props dest) (pair?)
#:category graphic
#:properties ((line-cap-style 'round)
(thickness 1))
(interpret-markup layout props
(markup
#:override `(line-cap-style . ,line-cap-style)
#:path thickness `((moveto 0 0)
(lineto ,(car dest) ,(cdr dest))))))
\markup { \override #'(line-cap-style . square) \path-draw-line #'(10 .
-10) }
%%%%%%%%%%%%
HTH, Simon
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user