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.
(cond
((memq head '(rmoveto rlineto lineto moveto)) 2)
((memq head '(rcurveto curveto)) 6)
(cond
((memq head '(rmoveto rlineto lineto moveto)) 2)
((memq head '(rcurveto curveto)) 6)
+ ((eq? head 'closepath) 0)
(else 1)))
(args (take rest arity))
)
(else 1)))
(args (take rest arity))
)
(arity
(cond ((memq head '(rmoveto rlineto lineto moveto)) 2)
((memq head '(rcurveto curveto)) 6)
(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
(else 1)))
(args (take rest arity))
(svg-head (assoc-get head
(curveto . C)
(moveto . M)
(lineto . L)
(curveto . C)
(moveto . M)
(lineto . L)
+ (rlineto . l)
+ (closepath . z))
"")))
(cons (format "~a~a"
"")))
(cons (format "~a~a"