]> git.donarmstrong.com Git - lilypond.git/commitdiff
SVG backend: round values for rotate transformation
authorPatrick McCarty <pnorcks@gmail.com>
Sat, 1 Aug 2009 23:28:58 +0000 (16:28 -0700)
committerPatrick McCarty <pnorcks@gmail.com>
Sat, 1 Aug 2009 23:37:38 +0000 (16:37 -0700)
scm/output-svg.scm

index bc6568a4c7e146c8238dd329a0eff33d7ae98239..11223df43d12396af8fb6f524b47ee6717e71bb9 100644 (file)
          '(fill . "currentColor")))
 
 (define (setcolor r g b)
-  (format "<g color=\"rgb(~a%,~a%,~a%)\">\n"
+  (format "<g color=\"rgb(~a%, ~a%, ~a%)\">\n"
          (* 100 r) (* 100 g) (* 100 b)))
 
 ;; rotate around given point
 (define (setrotation ang x y)
-  (format "<g transform=\"rotate(~a,~a,~a)\">\n"
-    (number->string (* -1 ang))
-    (number->string x)
-    (number->string (* -1 y))))
+  (ly:format "<g transform=\"rotate(~4f, ~4f, ~4f)\">\n"
+            (* -1 ang) x (* -1 y)))
 
 (define (text font string)
   (dispatch `(fontify ,font ,(entity 'tspan (string->entities string)))))