- `(transform . ,(format #f "translate (~f, ~f)"
- (* output-scale x)
- (- 0 (* output-scale y))))))
+ ;; FIXME: Not using GNU coding standards [translate ()] here
+ ;; to work around a bug in Microsoft Internet Explorer 6.0
+ `(transform . ,(ly:format "translate(~f, ~f)"
+ x (- y)))))
+
+(define (polygon coords blot-diameter is-filled)
+ (entity
+ 'polygon ""
+ '(stroke-linejoin . "round")
+ '(stroke-linecap . "round")
+ `(stroke-width . ,blot-diameter)
+ `(fill . ,(if is-filled "currentColor" "none"))
+ '(stroke . "currentColor")
+ `(points . ,(string-join
+ (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>")