CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch:
Changes by: Carl Sorensen <[EMAIL PROTECTED]> 05/06/06 14:40:39
Modified files:
. : ChangeLog
scm : output-tex.scm output-ps.scm fret-diagrams.scm
Added files:
input/regression: fret-diagrams.ly
Log message:
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3719&tr2=1.3720&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/input/regression/fret-diagrams.ly?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/output-tex.scm.diff?tr1=1.92&tr2=1.93&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/output-ps.scm.diff?tr1=1.143&tr2=1.144&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/fret-diagrams.scm.diff?tr1=1.25&tr2=1.26&r1=text&r2=text
Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3719 lilypond/ChangeLog:1.3720
--- lilypond/ChangeLog:1.3719 Mon Jun 6 14:27:42 2005
+++ lilypond/ChangeLog Mon Jun 6 14:40:38 2005
@@ -1,3 +1,18 @@
+
+
+2005-06-06 Carl Sorensen <[EMAIL PROTECTED]>
+
+ * input/regression/fret-diagrams.ly: new file to test fret diagram
+ 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
+
2005-06-06 Han-Wen Nienhuys <[EMAIL PROTECTED]>
* flower/memory-stream.cc (Memory_out_stream): remove fopencookie
support.
@@ -7,7 +22,7 @@
* flower/include/file-cookie.hh: new file. lily_cookie extension
* flower/file-cookie.cc: new file. lily_cookie extension.
-
+
2005-06-06 Jan Nieuwenhuizen <[EMAIL PROTECTED]>
* scm/editor.scm (editor-command-template-alist): Add syn
@@ -244,6 +259,7 @@
* Documentation/pictures/GNUmakefile (OUT_DIST_FILES): Add ly-icon
rules.
+>>>>>>> 1.3718
2005-05-28 Han-Wen Nienhuys <[EMAIL PROTECTED]>
* lily/stencil-scheme.cc (LY_DEFINE): ly:stencil-in-color
Index: lilypond/scm/fret-diagrams.scm
diff -u lilypond/scm/fret-diagrams.scm:1.25 lilypond/scm/fret-diagrams.scm:1.26
--- lilypond/scm/fret-diagrams.scm:1.25 Sat May 28 13:52:04 2005
+++ lilypond/scm/fret-diagrams.scm Mon Jun 6 14:40:39 2005
@@ -58,16 +58,6 @@
(prepend-alist-chain 'font-family 'sans props))))
(interpret-markup layout my-props text)))
-(define (sans-serif-stencil-white layout props mag text)
-"create a stencil with white text in sans-serif font based on
[EMAIL PROTECTED] and @var{props} with magnification @varr{mag} of the
-string @var{text}."
- (let* ((text-stencil (sans-serif-stencil layout props mag text))
- (x-extent (ly:stencil-extent text-stencil X))
- (y-extent (ly:stencil-extent text-stencil Y))
- (c `(white-text ,(* 2 mag) ,text))) ;urg -- workaround for using ps
font
- (ly:make-stencil c x-extent y-extent))) ;urg -- extent is not from ps
font, but we hope it's close
-
(define (draw-strings string-count fret-range th size)
"Draw the strings (vertical lines) for a fret diagram with
@@ -140,18 +130,20 @@
(- size th) 0)))
-(define (draw-dots layout props string-count fret-range size finger-code
dot-position dot-radius dot-list)
+(define (draw-dots layout props string-count fret-range size finger-code
+ dot-position dot-radius dot-thickness dot-list)
"Make dots for fret diagram."
(let* ((scale-dot-radius (* size dot-radius))
+ (scale-dot-thick (* size dot-thickness))
(dot-color (chain-assoc-get 'dot-color props 'black))
; (finger-xoffset (chain-assoc-get 'finger-xoffset props -0.25))
; (finger-yoffset (chain-assoc-get 'finger-yoffset props (- size)))
(finger-xoffset -0.25)
- (finger-yoffset (- size))
+ (finger-yoffset (- (* size 0.5)))
; (dot-label-font-mag (* scale-dot-radius (chain-assoc-get
'dot-label-font-mag props 1.0)))
(dot-label-font-mag scale-dot-radius)
; (string-label-font-mag (* size (chain-assoc-get 'label-font-mag
props 0.7)))
- (string-label-font-mag (* size 0.7))
+ (string-label-font-mag (* size 0.6))
(fret-count (+ (- (cadr fret-range) (car fret-range) 1)))
(mypair (car dot-list))
(restlist (cdr dot-list))
@@ -163,46 +155,51 @@
(finger (caddr mypair))
(finger (if (number? finger) (number->string finger) finger))
(dotstencil (if (eq? dot-color 'white)
- (begin
- (ly:make-stencil (list 'white-dot 0 0
scale-dot-radius) extent extent))
- (ly:make-stencil (list 'dot 0 0 scale-dot-radius )
extent extent)))
- (positioned-dot (ly:stencil-translate-axis
- (ly:stencil-translate-axis dotstencil xpos X)
- ypos Y))
+ (ly:stencil-add
+ (make-circle-stencil scale-dot-radius
scale-dot-thick #t)
+ (ly:stencil-in-color
+ (make-circle-stencil
+ (- scale-dot-radius (* 0.5
scale-dot-thick)) 0 #t)
+ 1 1 1))
+ (make-circle-stencil scale-dot-radius
scale-dot-thick #t)))
+ (positioned-dot (begin
+ ;(display dotstencil)
+ (ly:stencil-translate-axis
+ (ly:stencil-translate-axis dotstencil xpos X)
+ ypos Y)))
+
(labeled-dot-stencil
(if (or (eq? finger '())(eq? finger-code 'none))
positioned-dot
- (if (eq? finger-code 'in-dot)
- (let* ((dot-proc (if (eq? dot-color 'white) 'white-dot
'dot)))
- (ly:stencil-add
- (ly:stencil-translate-axis
- (ly:stencil-translate-axis
- (if (eq? dot-color 'white)
- (centered-stencil (sans-serif-stencil layout
props dot-label-font-mag finger))
- (centered-stencil (sans-serif-stencil-white
layout props
- dot-label-font-mag finger)))
- xpos X)
- ypos Y)
- (ly:stencil-translate-axis
- (ly:stencil-translate-axis
- (ly:make-stencil (list dot-proc 0 0
scale-dot-radius) extent extent)
+ (if (eq? finger-code 'in-dot)
+ (let* ((finger-label (centered-stencil
+ (sans-serif-stencil layout props
+ dot-label-font-mag finger))))
+ (ly:stencil-translate-axis
+ (ly:stencil-translate-axis
+ (ly:stencil-add
+ dotstencil
+ (if (eq? dot-color 'white)
+ finger-label
+ (ly:stencil-in-color finger-label 1 1
1)))
xpos X)
- ypos Y)))
+ ypos Y))
(if (eq? finger-code 'below-string)
(ly:stencil-add
positioned-dot
(ly:stencil-translate-axis
(ly:stencil-translate-axis
(centered-stencil (sans-serif-stencil layout
props
- string-label-font-mag
finger)) xpos X)
- (* size finger-yoffset) Y))
+ string-label-font-mag
finger))
+ xpos X)
+ (* size finger-yoffset) Y))
;unknown finger-code
positioned-dot)))))
(if (null? restlist)
labeled-dot-stencil
(ly:stencil-add
(draw-dots layout props string-count fret-range size finger-code
- dot-position dot-radius restlist)
+ dot-position dot-radius dot-thickness restlist)
labeled-dot-stencil))))
(define (draw-xo layout props string-count fret-range size xo-list)
@@ -270,7 +267,6 @@
(draw-barre layout props string-count fret-range size
finger-code
dot-position dot-radius (cdr barre-list)))
barre-stencil ))))
-
(define (stepmag mag)
"Calculate the font step necessary to get a desired magnification"
@@ -280,7 +276,7 @@
"Label the base fret on a fret diagram"
(let* ((base-fret (car fret-range))
; (label-font-mag (chain-assoc-get 'label-font-mag props 0.7))
- (label-font-mag 0.7)
+ (label-font-mag 0.5)
; (label-vertical-offset (chain-assoc-get 'fret-label-vertical-offset
props -0.2))
(label-vertical-offset -0.2)
(number-type (chain-assoc-get 'number-type props 'roman-lower))
@@ -356,8 +352,8 @@
(alignment (chain-assoc-get 'align-dir props -0.4)) ; needed only here
; (xo-padding (* th (chain-assoc-get 'padding props 2))) ; needed only
here
- (label-space 0.25)
- (xo-padding (* th 2))
+ (label-space (* 0.25 size))
+ (xo-padding (* th size 5))
(label-dir (chain-assoc-get 'label-dir props RIGHT))
(parameters (fret-parse-marking-list marking-list fret-count))
(dot-list (cdr (assoc 'dot-list parameters)))
@@ -374,9 +370,9 @@
fret-diagram-stencil)))
(if (not (null? dot-list))
(set! fret-diagram-stencil (ly:stencil-add
+ fret-diagram-stencil
(draw-dots layout props string-count
fret-range size finger-code
- dot-position dot-radius dot-list)
- fret-diagram-stencil)))
+ dot-position dot-radius th
dot-list))))
(if (not (null? xo-list))
(set! fret-diagram-stencil (ly:stencil-combine-at-edge
fret-diagram-stencil Y UP
Index: lilypond/scm/output-ps.scm
diff -u lilypond/scm/output-ps.scm:1.143 lilypond/scm/output-ps.scm:1.144
--- lilypond/scm/output-ps.scm:1.143 Fri Jun 3 19:23:23 2005
+++ lilypond/scm/output-ps.scm Mon Jun 6 14:40:39 2005
@@ -21,7 +21,6 @@
blank
circle
dot
- white-dot
beam
dashed-slur
char
@@ -38,7 +37,6 @@
filledbox
round-filled-box
text
- white-text
polygon
draw-line
no-origin))
@@ -303,21 +301,6 @@
(ly:warning (_ "utf8-string encountered in PS backend")))
-;; TODO: FIX THIS.
-;;
-(define (white-dot x y radius)
- (string-append
- " "
- (ly:numbers->string
- (list x y radius)) " draw_white_dot"))
-
-(define (white-text scale s)
- (let ((mystring (string-append
- "(" s ") " (number->string scale)
- " /Helvetica-Bold "
- " draw_white_text")))
- mystring
- ))
(define (zigzag-line centre? zzw zzh thick dx dy)
(string-append
Index: lilypond/scm/output-tex.scm
diff -u lilypond/scm/output-tex.scm:1.92 lilypond/scm/output-tex.scm:1.93
--- lilypond/scm/output-tex.scm:1.92 Sat May 28 13:43:24 2005
+++ lilypond/scm/output-tex.scm Mon Jun 6 14:40:39 2005
@@ -24,7 +24,6 @@
blank
circle
dot
- white-dot
beam
dashed-slur
named-glyph
@@ -37,7 +36,6 @@
filledbox
round-filled-box
text
- white-text
setcolor
resetcolor
polygon
@@ -82,9 +80,6 @@
(define (embedded-ps string)
(embedded-ps (list 'embedded-ps string)))
-(define (white-dot x y radius)
- (embedded-ps (list 'white-dot x y radius)))
-
(define (beam width slope thick blot)
(embedded-ps (list 'beam width slope thick blot)))
@@ -154,9 +149,6 @@
"\\hbox{\\~a{}~a}" (tex-font-command font)
(sanitize-tex-string s)))
-(define (white-text scale s)
- (embedded-ps (list 'white-text scale s)))
-
(define (setcolor r g b)
(string-append "\\color[rgb]{"
(number->string r) ", "
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs