;;;; This file is part of LilyPond, the GNU music typesetter.
;;;;
-;;;; Copyright (C) 1998--2010 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; Copyright (C) 1998--2011 Jan Nieuwenhuizen <janneke@gnu.org>
;;;; Han-Wen Nienhuys <hanwen@xs4all.nl>
;;;;
;;;; LilyPond is free software: you can redistribute it and/or modify
(define (str4 num)
(if (or (nan? num) (inf? num))
(begin
- (ly:warning (_ "Found infinity or nan in output. Substituting 0.0"))
+ (ly:warning (_ "Found infinity or nan in output. Substituting 0.0"))
(if (ly:get-option 'strict-infinity-checking)
(exit 1))
"0.0")
(- x2 x1) (- y2 y1)
x1 y1 thick))
-(define (connected-shape pointlist thick x-scale y-scale connect fill)
- (ly:format "~a~4f ~4f ~4f ~4f ~a ~a draw_connected_shape"
- (string-concatenate
- (map (lambda (x)
- (apply (if (eq? (length x) 6)
- (lambda (x1 x2 x3 x4 x5 x6)
- (ly:format "~4f ~4f ~4f ~4f ~4f ~4f 6 "
- x1
- x2
- x3
- x4
- x5
- x6))
- (lambda (x1 x2)
- (ly:format "~4f ~4f 2 " x1 x2)))
- x))
- (reverse pointlist)))
- (length pointlist)
- x-scale
- y-scale
- thick
- (if connect "true" "false")
- (if fill "true" "false")))
-
(define (partial-ellipse x-radius y-radius start-angle end-angle thick connect fill)
(ly:format "~a ~a ~4f ~4f ~4f ~4f ~4f draw_partial_ellipse"
(if fill "true" "false")
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")