X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Foutput-svg.scm;h=27b6118483ccdb05cfcb1fce79e805a037637d2f;hb=27778e71840f517d1ed4ab3529051809ef4cbd74;hp=9b1b250f77857a631b525bd90fa282b796b6e178;hpb=8af3c27f5b63009a9a8507fcfcc220a93dcbf725;p=lilypond.git diff --git a/scm/output-svg.scm b/scm/output-svg.scm index 9b1b250f77..27b6118483 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--2010 Jan Nieuwenhuizen +;;;; Copyright (C) 2002--2012 Jan Nieuwenhuizen ;;;; Patrick McCarty ;;;; ;;;; LilyPond is free software: you can redistribute it and/or modify @@ -55,20 +55,26 @@ (value (cdr x))) (if (number? value) (set! value (ly:format "~4f" value))) - (format " ~s=\"~a\"" attr value))) + (format #f " ~s=\"~a\"" attr value))) attributes-alist))) (define-public (eo entity . attributes-alist) "o = open" - (format "<~S~a>\n" entity (attributes attributes-alist))) + (format #f "<~S~a>\n" entity (attributes attributes-alist))) (define-public (eoc entity . attributes-alist) - " oc = open/close" - (format "<~S~a/>\n" entity (attributes attributes-alist))) + "oc = open/close" + (format #f "<~S~a/>\n" entity (attributes attributes-alist))) (define-public (ec entity) "c = close" - (format "\n" entity)) + (format #f "\n" entity)) + +(define (start-enclosing-id-node s) + (string-append "\n")) + +(define (end-enclosing-id-node) + "\n") (define-public (comment s) (string-append "\n")) @@ -86,7 +92,7 @@ (define (helper lst) (if (null? lst) '() - (cons (format "~S ~S" (car lst) (- (cadr lst))) + (cons (format #f "~S ~S" (car lst) (- (cadr lst))) (helper (cddr lst))))) (string-join (helper lst) " ")) @@ -351,7 +357,7 @@ (define (dashed-line thick on off dx dy phase) (draw-line thick 0 0 dx dy - `(stroke-dasharray . ,(format "~a,~a" on off)))) + `(stroke-dasharray . ,(format #f "~a,~a" on off)))) (define (draw-line thick x1 y1 x2 y2 . alist) (apply entity 'line "" @@ -539,7 +545,7 @@ (closepath . z)) ""))) - (cons (format "~a~a" svg-head (number-list->point args)) + (cons (format #f "~a~a" svg-head (number-list->point args)) (convert-path-exps (drop rest arity)))) '())) @@ -637,7 +643,7 @@ '(fill . "currentColor"))) (define (setcolor r g b) - (format "\n" + (format #f "\n" (* 100 r) (* 100 g) (* 100 b))) ;; rotate around given point