X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fdefine-markup-commands.scm;h=f048aeabce04d53c10ae7de663cdf8b9e133c987;hb=3fc70e3e7dfb3c26cb3e5bb9dcabc87cc758c24d;hp=bf9b9b4dd428ef1dd1fc7590e1ff92aa239b3cd7;hpb=178b4c7a699c6653c75550938a3a0cd7821ac92e;p=lilypond.git diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index bf9b9b4dd4..f048aeabce 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -383,7 +383,7 @@ Its appearance may be customized by overrides for @code{thickness}, ;; The final stencil: lined-up bows (apply ly:stencil-add (map - (lambda (stil pt) (ly:stencil-translate stil pt)) + ly:stencil-translate (circular-list init-bow-up init-bow-down) list-of-starts)))) @@ -2251,6 +2251,14 @@ Set the dimensions of @var{arg} to @var{x} and@tie{}@var{y}." `(delay-stencil-evaluation ,(delay expr)) x y)))) +(define-markup-command (with-outline layout props outline arg) + (markup? markup?) + #:category other + " +Print @var{arg} with the outline and dimensions of @var{outline}." + (ly:stencil-outline (interpret-markup layout props arg) + (interpret-markup layout props outline))) + (define-markup-command (with-dimensions-from layout props arg1 arg2) (markup? markup?) #:category other @@ -2333,10 +2341,7 @@ Add padding @var{amount} around @var{arg} in the X@tie{}direction. } } @end lilypond" - (let* ((m (interpret-markup layout props arg)) - (x (ly:stencil-extent m X)) - (y (ly:stencil-extent m Y))) - (ly:make-stencil (list 'transparent-stencil (ly:stencil-expr m)) x y))) + (ly:stencil-outline empty-stencil (interpret-markup layout props arg))) (define-markup-command (pad-to-box layout props x-ext y-ext arg) (number-pair? number-pair? markup?) @@ -3701,17 +3706,18 @@ mensural-flags. Both are supplied for convenience. (raw-length (if stem-up upflag-length downflag-length)) (angle (if stem-up upflag-angle downflag-angle)) (flag-length (+ (* raw-length factor) half-stem-thickness)) - (flag-end (if (= angle 0) - (cons flag-length (* half-stem-thickness dir)) - (polar->rectangular flag-length angle))) + (flag-end (polar->rectangular flag-length angle)) (thickness (* flag-thickness factor)) (thickness-offset (cons 0 (* -1 thickness dir))) (spacing (* -1 flag-spacing factor dir)) (start (cons (- half-stem-thickness) (* half-stem-thickness dir))) - (points (list start - flag-end - (offset-add flag-end thickness-offset) - (offset-add start thickness-offset))) + (raw-points + (list + '(0 . 0) + flag-end + (offset-add flag-end thickness-offset) + thickness-offset)) + (points (map (lambda (coord) (offset-add coord start)) raw-points)) (stencil (ly:round-filled-polygon points half-stem-thickness)) ;; Log for 1/8 is 3, so we need to subtract 3 (flag-stencil (buildflags stencil (- log 3) stencil spacing)))