CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch:
Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/06/06 15:38:28
Modified files:
. : ChangeLog
input/regression: backend-excercise.ly
ly : property-init.ly
scm : output-svg.scm
Log message:
(setcolor): implement (re)setcolor with <g>
change black to currentColor everywhere. This fixes color support
in SVG.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3720&tr2=1.3721&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/input/regression/backend-excercise.ly.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ly/property-init.ly.diff?tr1=1.74&tr2=1.75&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/output-svg.scm.diff?tr1=1.28&tr2=1.29&r1=text&r2=text
Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3720 lilypond/ChangeLog:1.3721
--- lilypond/ChangeLog:1.3720 Mon Jun 6 14:40:38 2005
+++ lilypond/ChangeLog Mon Jun 6 15:38:28 2005
@@ -1,17 +1,21 @@
+2005-06-06 Han-Wen Nienhuys <[EMAIL PROTECTED]>
+ * scm/output-svg.scm (setcolor): implement (re)setcolor with <g>
+ change black to currentColor everywhere. This fixes color support
+ in SVG.
2005-06-06 Carl Sorensen <[EMAIL PROTECTED]>
* input/regression/fret-diagrams.ly: new file to test fret diagram
- capability
+ capability
* scm/output-tex.scm: remove white-dot and white-text
* scm/output-ps.scm: remove white-dot and white-text
* scm/fret-diagrams.scm (sans-serif-stencil-white): removed --
- using ly:stencil-in-color instead
- (draw-dots) : remove call to white-dot
+ using ly:stencil-in-color instead
+ (draw-dots) : remove call to white-dot
2005-06-06 Han-Wen Nienhuys <[EMAIL PROTECTED]>
Index: lilypond/input/regression/backend-excercise.ly
diff -u lilypond/input/regression/backend-excercise.ly:1.4
lilypond/input/regression/backend-excercise.ly:1.5
--- lilypond/input/regression/backend-excercise.ly:1.4 Sat May 28 13:43:23 2005
+++ lilypond/input/regression/backend-excercise.ly Mon Jun 6 15:38:28 2005
@@ -8,21 +8,23 @@
\relative {
\new StaffGroup \new PianoStaff <<
- \new Staff <<
+ \new Staff
{
#(set-octavation 1)
\times 2/3 { c'8[\< f]( f''\!) }
#(set-octavation 0)
- <f \5>
+ <f,, \5>4
+
+ \override TextScript #'color = #red
+ g4^"red"
}
- \skip 1 >>
+
\new Staff \relative c'' {
- \makeClusters { <g a>8 <e a> }
+ \makeClusters { <g a>8 <e a> <g a>4 }
+
\override Glissando #'style = #'zigzag
f2 \glissando f'
- \override NoteHead #'print-function = #Note_head::brew_ez_stencil
- \override NoteHead #'Y-extent-callback = #'()
- \override NoteHead #'X-extent-callback = #'()
+ \setEasyHeads
f e
}
>>
Index: lilypond/ly/property-init.ly
diff -u lilypond/ly/property-init.ly:1.74 lilypond/ly/property-init.ly:1.75
--- lilypond/ly/property-init.ly:1.74 Tue May 31 23:42:46 2005
+++ lilypond/ly/property-init.ly Mon Jun 6 15:38:28 2005
@@ -51,6 +51,7 @@
\override NoteHead #'print-function = #Note_head::brew_ez_stencil
\override NoteHead #'font-size = #-7
\override NoteHead #'font-family = #'sans
+ \override NoteHead #'font-series = #'bold
}
aikenHeads = \set shapeNoteStyles = ##(do re mi fa #f la ti)
Index: lilypond/scm/output-svg.scm
diff -u lilypond/scm/output-svg.scm:1.28 lilypond/scm/output-svg.scm:1.29
--- lilypond/scm/output-svg.scm:1.28 Sat May 28 13:43:24 2005
+++ lilypond/scm/output-svg.scm Mon Jun 6 15:38:28 2005
@@ -144,6 +144,7 @@
(define (fontify font expr)
(entity 'text expr
`(style . ,(svg-font font))
+ '(fill . "currentColor")
))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -212,8 +213,8 @@
'(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))
@@ -231,8 +232,8 @@
'(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)
@@ -249,8 +250,8 @@
'(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)))
)))
@@ -269,7 +270,7 @@
`((stroke-linejoin . "round")
(stroke-linecap . "round")
(stroke-width . ,thick)
- (stroke . "black")
+ (stroke . "currentColor")
(x1 . ,x1)
(y1 . ,(- y1))
(x2 . ,x2)
@@ -302,8 +303,8 @@
'(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))))
))
@@ -330,8 +331,8 @@
'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)))
@@ -341,3 +342,12 @@
(define (utf8-string pango-font-description string)
(dispatch `(fontify ,pango-font-description ,(entity 'tspan string))))
+
+
+(define (setcolor r g b)
+ (format "<g color=\"rgb(~a%,~a%,~a%)\">"
+ (* 100 r) (* 100 g) (* 100 b)
+ ))
+
+(define (resetcolor)
+ "</g>")
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs