]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-ps.scm
Doc-es: update Notation/Chords.
[lilypond.git] / scm / output-ps.scm
index c4c0a4da07bb93d1547927c3a2be119a407031c6..69f277203934985a01979476b56df1803c5a1bae 100644 (file)
                                 (ly:in-event-class? cause t))
                               point-and-click))))
             (let* ((location (ly:input-file-line-char-column music-origin))
-                   (raw-file (car location))
-                   (file (if (is-absolute? raw-file)
-                             raw-file
-                             (string-append (ly-getcwd) "/" raw-file)))
                    (x-ext (ly:grob-extent grob grob X))
                    (y-ext (ly:grob-extent grob grob Y)))
 
                              ;; Backslashes are not valid
                              ;; file URI path separators.
                              (ly:string-percent-encode
-                              (ly:string-substitute "\\" "/" file))
+                              (ly:string-substitute "\\" "/" (car location)))
 
                              (cadr location)
                              (caddr location)
                                     (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"