From: Lukas Pietsch Date: Sun, 8 Mar 2015 10:34:32 +0000 (+0000) Subject: Add support for stencils with stroke-thickness set to zero X-Git-Tag: release/2.19.17-1~10 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b7fdbfc2ceb805cfca5b386b43e1dec831702b17;p=lilypond.git Add support for stencils with stroke-thickness set to zero Issue 3882 Bring PS output in line with SVG output so that it becomes possible to define path stencil expressions with a filled contour but no outline stroke. This is necessary for consistent support of user-defined glyphs defined as path stencils, to be used for planned mensural notation extensions. --- diff --git a/scm/output-ps.scm b/scm/output-ps.scm index c4c0a4da07..70b13848e4 100644 --- a/scm/output-ps.scm +++ b/scm/output-ps.scm @@ -295,15 +295,20 @@ (ly:warning (_ "unknown line-join-style: ~S") (symbol->string join)) 1))))) - (ly:format - "gsave currentpoint translate + (ly:format + "gsave currentpoint translate ~a setlinecap ~a setlinejoin ~a setlinewidth -~l gsave stroke grestore ~a grestore" - cap-numeric - join-numeric - thickness - (convert-path-exps exps) - (if fill? "fill" "")))) +~l ~a grestore" + cap-numeric + join-numeric + thickness + (convert-path-exps exps) + ;; print outline contour only if there is no fill or if + ;; contour is explicitly requested with a thickness > 0 + (cond ((not fill?) "stroke") + ((positive? thickness) "gsave stroke grestore fill") + (else "fill"))))) + (define (setscale x y) (ly:format "gsave ~4l scale\n"