-
-
- (ly:format
- "gsave currentpoint translate 1 setlinecap ~a setlinewidth\n~l stroke grestore"
- thickness
- (convert-path-exps exps)))
-
+
+ (let ((cap-numeric (case cap ((butt) 0) ((round) 1) ((square) 2)
+ (else (begin
+ (ly:warning (_ "unknown line-cap-style: ~S")
+ (symbol->string cap))
+ 1))))
+ (join-numeric (case join ((miter) 0) ((round) 1) ((bevel) 2)
+ (else (begin
+ (ly:warning (_ "unknown line-join-style: ~S")
+ (symbol->string join))
+ 1)))))
+ (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" ""))))
+
+(define (setscale x y)
+ (ly:format "gsave ~4l scale\n"
+ (list x y)))
+
+(define (resetscale)
+ "grestore\n")