]> git.donarmstrong.com Git - lilypond.git/commitdiff
Allow "closepath" in 'path stencil expressions
authorPatrick McCarty <pnorcks@gmail.com>
Sat, 1 Aug 2009 19:01:52 +0000 (12:01 -0700)
committerPatrick McCarty <pnorcks@gmail.com>
Sat, 1 Aug 2009 19:12:56 +0000 (12:12 -0700)
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.

scm/output-ps.scm
scm/output-svg.scm

index 27a3d8f37803bf9707123e6e5d46d9730f9bb251..ee1da5308e3be0a49254d3f108288b8f6ba6cd79 100644 (file)
              (cond
               ((memq head '(rmoveto rlineto lineto moveto)) 2)
               ((memq head '(rcurveto curveto)) 6)
+              ((eq? head 'closepath) 0)
               (else 1)))
             (args (take rest arity))
             )
index 6076bdaa72ac0b981d986664c6671d4951295a40..1963728eba156bcba667f31dbccb1bdc0e9f5a96 100644 (file)
           (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
                                  (curveto . C)
                                  (moveto . M)
                                  (lineto . L)
-                                 (rlineto . l))
+                                 (rlineto . l)
+                                 (closepath . z))
                                "")))
 
          (cons (format "~a~a"