X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Foutput-svg.scm;h=653664122cd5d20befb84ed84fa4147ec6690840;hb=90e4d7057f3857da049dfda3d130017d4719bd6b;hp=d00757f4e217c59d01d7e6d4f2d0fd7f864a9bea;hpb=0a71592e9a7b4e43e08fb8b0012c831bf6513cbb;p=lilypond.git diff --git a/scm/output-svg.scm b/scm/output-svg.scm index d00757f4e2..653664122c 100644 --- a/scm/output-svg.scm +++ b/scm/output-svg.scm @@ -1,6 +1,6 @@ ;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; Copyright (C) 2002--2014 Jan Nieuwenhuizen +;;;; Copyright (C) 2002--2015 Jan Nieuwenhuizen ;;;; Patrick McCarty ;;;; ;;;; LilyPond is free software: you can redistribute it and/or modify @@ -61,10 +61,15 @@ "c = close" (format #f "\n" entity)) -(define (start-enclosing-id-node s) - (string-append "\n")) +(define (start-group-node attributes) + (define attributes-string + (string-concatenate + (map (lambda (item) + (ly:format " ~a=\"~a\"" (car item) (cdr item))) + attributes))) + (string-append "\n")) -(define (end-enclosing-id-node) +(define (end-group-node) "\n") (define-public (comment s) @@ -83,7 +88,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) " ")) @@ -615,7 +620,7 @@ '(fill . "currentColor"))) (define (setcolor r g b) - (format #f "\n" + (ly:format "\n" (* 100 r) (* 100 g) (* 100 b))) ;; rotate around given point