(scm framework-ps)
(lily))
-;;; helper functions, not part of output interface
-;;;
-
-
-;; ice-9 format uses a lot of memory
-;; using simple-format almost halves lilypond cell usage
-
-(define (str4 num)
- (if (or (nan? num) (inf? num))
- (begin
- (ly:warning (_ "Found infinity or nan in output. Substituting 0.0"))
- (if (ly:get-option 'strict-infinity-checking)
- (exit 1))
- "0.0")
- (ly:number->string num)))
-
-(define (number-pair->string4 numpair)
- (ly:format "~4l" numpair))
-
;;;
;;; Lily output interface, PostScript implementation --- cleanup and docme
;;;
"false")
radius thick))
-(define (start-enclosing-id-node s)
+(define (start-group-node attributes)
"")
-(define (end-enclosing-id-node)
+(define (end-group-node)
"")
(define (dashed-line thick on off dx dy phase)
(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"