X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Foutput-ps.scm;h=c83b613cbd1ceca68b2157886cb05fb0b5bfa393;hb=7a08a215a4d5f71da7e6e5a4ae12dffd9bd4ac1e;hp=723a616369bd5f7a4b37243c30dc4506a9f05e2e;hpb=8a104f4a3f020c9fcd6ebbb1c9c4cf88f1020371;p=lilypond.git diff --git a/scm/output-ps.scm b/scm/output-ps.scm index 723a616369..c83b613cbd 100644 --- a/scm/output-ps.scm +++ b/scm/output-ps.scm @@ -1,6 +1,6 @@ ;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; Copyright (C) 1998--2010 Jan Nieuwenhuizen +;;;; Copyright (C) 1998--2011 Jan Nieuwenhuizen ;;;; Han-Wen Nienhuys ;;;; ;;;; 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") @@ -261,6 +261,16 @@ (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) @@ -303,3 +313,10 @@ 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")