From: Patrick McCarty Date: Sat, 1 Aug 2009 19:01:52 +0000 (-0700) Subject: Allow "closepath" in 'path stencil expressions X-Git-Tag: release/2.13.4-1~231 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e4f431efb1a8d5d36ebce377f25eae04ea8876ab;p=lilypond.git Allow "closepath" in 'path stencil expressions Currently there is no way to properly close a subpath in the 'path stencil expression. This patch adds the appropriate operators for the PS and SVG backends; both operators have arity 0, which made this feature trivial to add. --- diff --git a/scm/output-ps.scm b/scm/output-ps.scm index 27a3d8f378..ee1da5308e 100644 --- a/scm/output-ps.scm +++ b/scm/output-ps.scm @@ -273,6 +273,7 @@ (cond ((memq head '(rmoveto rlineto lineto moveto)) 2) ((memq head '(rcurveto curveto)) 6) + ((eq? head 'closepath) 0) (else 1))) (args (take rest arity)) ) diff --git a/scm/output-svg.scm b/scm/output-svg.scm index 6076bdaa72..1963728eba 100644 --- a/scm/output-svg.scm +++ b/scm/output-svg.scm @@ -414,6 +414,7 @@ (arity (cond ((memq head '(rmoveto rlineto lineto moveto)) 2) ((memq head '(rcurveto curveto)) 6) + ((eq? head 'closepath) 0) (else 1))) (args (take rest arity)) (svg-head (assoc-get head @@ -422,7 +423,8 @@ (curveto . C) (moveto . M) (lineto . L) - (rlineto . l)) + (rlineto . l) + (closepath . z)) ""))) (cons (format "~a~a"