]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-svg.scm
Web-es: update News.
[lilypond.git] / scm / output-svg.scm
index d00757f4e217c59d01d7e6d4f2d0fd7f864a9bea..ca086318d7810d1f4769d59e6d2e88d4fc28668d 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 2002--2014 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; Copyright (C) 2002--2015 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;;                Patrick McCarty <pnorcks@gmail.com>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
@@ -83,7 +83,7 @@
   (define (helper lst)
     (if (null? lst)
         '()
-        (cons (format #f "~S ~S" (car lst) (- (cadr lst)))
+        (cons (ly:format "~4f ~4f" (car lst) (- (cadr lst)))
               (helper (cddr lst)))))
 
   (string-join (helper lst) " "))
                     (else (any (lambda (t)
                                  (ly:in-event-class? cause t))
                                point-and-click)))
-              (let* ((location (ly:input-file-line-char-column music-origin))
-                     (raw-file (car location))
-                     (file (if (is-absolute? raw-file)
-                               raw-file
-                               (string-append (ly-getcwd) "/" raw-file))))
-                
+              (let* ((location (ly:input-file-line-char-column music-origin)))
+
                 (ly:format "<a style=\"color:inherit;\" xlink:href=\"textedit://~a:~a:~a:~a\">\n"
                            ;; Backslashes are not valid
                            ;; file URI path separators.
                            (ly:string-percent-encode
-                            (ly:string-substitute "\\" "/" file))
-                           
+                            (ly:string-substitute "\\" "/" (car location)))
+
                            (cadr location)
                            (caddr location)
                            (1+ (cadddr location))))))))
    '(fill . "currentColor")))
 
 (define (setcolor r g b)
-  (format #f "<g color=\"rgb(~a%, ~a%, ~a%)\">\n"
+  (ly:format "<g color=\"rgb(~4f%, ~4f%, ~4f%)\">\n"
           (* 100 r) (* 100 g) (* 100 b)))
 
 ;; rotate around given point