]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-ps.scm
Warnings: Turn some normal messages into warnings
[lilypond.git] / scm / output-ps.scm
index 16f62012d9846a3ca7e5690c76b0004e7056c037..c83b613cbd1ceca68b2157886cb05fb0b5bfa393 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; 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
@@ -45,7 +45,7 @@
 (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")
             (cdr y)
             url))
 
+(define (page-link page-no x y)
+  (if (number? page-no)
+    (ly:format "~a ~a currentpoint vector_add  ~a ~a currentpoint vector_add ~a mark_page_link"
+              (car x)
+              (car y)
+              (cdr x)
+              (cdr y)
+              page-no)
+    ""))
+
 (define* (path thickness exps #:optional (cap 'round) (join 'round) (fill? #f))
   (define (convert-path-exps exps)
     (if (pair? exps)
      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")