]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-svg.scm
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / scm / output-svg.scm
index a1df2f474c0af4348a1ad8f1ff07f8b0fd51a572..786a37ca177deb434518e3b5e2d650053dba97bd 100644 (file)
@@ -2,7 +2,7 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;;
-;;;; (c) 2002--2005 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; (c) 2002--2006 Jan Nieuwenhuizen <janneke@gnu.org>
 
 ;;;; http://www.w3.org/TR/SVG11
 ;;;; http://www.w3.org/TR/SVG12/ -- page, pageSet in draft
 
 (define (placebox x y expr)
   (entity 'g
-         
-         ;; FIXME -- JCN
-         ;;(dispatch expr)
          expr
-         `(transform . ,(format #f "translate (~f, ~f)"
+         ;; FIXME: Not using GNU coding standards [translate ()] here
+         ;; to work around a bug in Microsoft Internet Explorer 6.0
+         `(transform . ,(format #f "translate(~f, ~f)"
                                 x (- y)))))
 
 (define (polygon coords blot-diameter is-filled)
                (map offset->point (ly:list->offsets '() coords))))
    ))
 
+;; rotate around given point
+(define (setrotation ang x y)
+  (format "<g transform=\"rotate(~a,~a,~a)\">"
+    (number->string (* -1 ang))
+    (number->string x)
+    (number->string (* -1 y))))
+
+(define (resetrotation ang x y)
+  "</g>")
+
 (define (round-filled-box breapth width depth height blot-diameter)
   (entity 'rect ""
          ;; The stroke will stick out.  To use stroke,
 (define (text font string)
   (dispatch `(fontify ,font ,(entity 'tspan (string->entities string)))))
 
-(define (utf8-string pango-font-description string)
+(define (utf-8-string pango-font-description string)
   (dispatch `(fontify ,pango-font-description ,(entity 'tspan string))))