]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-svg.scm
remove old definitions (backportme).
[lilypond.git] / scm / output-svg.scm
index edf86aa119bcb4ddf5d2995eb2da5ad8ca908b10..402c14c405a14b372e5d9670f615f6c3ae5b0147 100644 (file)
@@ -59,6 +59,8 @@
   "c = close"
   (format #f "</~S>\n" entity))
 
+
+
 (define-public (entity entity string . attributes-alist)
   (if (equal? string "")
       (apply eoc entity attributes-alist)
 (define (fontify font expr)
   (entity 'text expr
          `(style . ,(svg-font font))
+         '(fill . "currentColor")
          ))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
            '(stroke-linejoin . "round")
            '(stroke-linecap . "round")
            `(stroke-width . ,blot-diameter)
-           '(stroke . "black")
-           '(fill . "black")
+           '(stroke . "currentColor")
+           '(fill . "currentColor")
            `(points . ,(string-join
                         (map offset->point
                              (list (cons (/ b 2) (/ t 2))
            '(stroke-linejoin . "round")
            '(stroke-linecap . "round")
            `(stroke-width . ,blot-diameter)
-           '(stroke . "black")
-           '(fill . "black")
+           '(stroke . "currentColor")
+           '(fill . "currentColor")
            `(d . ,(format #f "M ~S,~S l ~S,~S l ~S,~S l ~S,~S l ~S,~S"
                           (/ b 2) (/ t 2)
                           w (- h)
            '(stroke-linejoin . "round")
            '(stroke-linecap . "round")
            `(stroke-width . ,thick)
-           '(stroke . "black")
-           '(fill . "black")
+           '(stroke . "currentColor")
+           '(fill . "currentColor")
            `(d . ,(string-append (svg-bezier first #f)
                                  (svg-bezier second first-c0)))
            )))
          `((stroke-linejoin . "round")
            (stroke-linecap . "round")
            (stroke-width . ,thick)
-           (stroke . "black")
+           (stroke . "currentColor")
            (x1 . ,x1)
            (y1 . ,(- y1))
            (x2 . ,x2)
 (define (dashed-line thick on off dx dy)
   (draw-line thick 0 0 dx dy `(style . ,(format "stroke-dasharray:~a,~a;" on off))))
 
-;; WTF is this in every backend?
-(define (horizontal-line x1 x2 th)
-  (filledbox (- x1) (- x2 x1) (* .5 th) (* .5 th)))
-
 (define (filledbox breapth width depth height)
   (round-filled-box breapth width depth height 0))
 
    '(stroke-linejoin . "round")
    '(stroke-linecap . "round")
    `(stroke-width . ,blot-diameter)
-   `(fill . ,(if is-filled "black" "none"))
-   '(stroke . "black")
+   `(fill . ,(if is-filled "currentColor" "none"))
+   '(stroke . "currentColor")
    `(points . ,(string-join
                (map offset->point (ly:list->offsets '() coords))))
    ))
    'circle ""
    '(stroke-linejoin . "round")
    '(stroke-linecap . "round")
-   `(fill . ,(if is-filled "black" "none"))
-   `(stroke . "black")
+   `(fill . ,(if is-filled "currentColor" "none"))
+   `(stroke . "currentColor")
    `(stroke-width . ,thick)
    `(r . ,radius)))
 
 (define (utf8-string pango-font-description string)
   (dispatch `(fontify ,pango-font-description ,(entity 'tspan string))))
 
-(define (bracket arch_angle arch_width arch_height height arch_thick thick)
-  ;; FIXME.
-  ""
-  )
+
+
+(define (setcolor r g b)
+  (format "<g color=\"rgb(~a%,~a%,~a%)\">"
+         (* 100 r) (* 100 g) (* 100 b)
+         ))
+
+(define (resetcolor)
+  "</g>")