From ed531508e18c3f9e533fe6085b488ef27bb34a64 Mon Sep 17 00:00:00 2001 From: Carl Sorensen Date: Sat, 10 Jan 2009 17:38:59 -0700 Subject: [PATCH] Remove duplicate stencil functions Functions translate-stencil and round-filled-box-stencil were added to scm/stencil.scm as part of the fret diagrams update. These stencils duplicate ly:stencil-translate and ly:round-filled-box, and are therefore removed by this commit. --- scm/fret-diagrams.scm | 12 ++++++------ scm/stencil.scm | 14 -------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/scm/fret-diagrams.scm b/scm/fret-diagrams.scm index fab6868fd3..7592ef37ef 100644 --- a/scm/fret-diagrams.scm +++ b/scm/fret-diagrams.scm @@ -428,7 +428,7 @@ Line thickness is given by @var{th}, fret & string spacing by 1 1 1)) (make-circle-stencil scale-dot-radius scale-dot-thick #t))) - (positioned-dot (translate-stencil dot-stencil dot-coordinates)) + (positioned-dot (ly:stencil-translate dot-stencil dot-coordinates)) (labeled-dot-stencil (cond ((or (eq? finger '())(eq? finger-code 'none)) @@ -438,7 +438,7 @@ Line thickness is given by @var{th}, fret & string spacing by (centered-stencil (sans-serif-stencil layout props dot-label-font-mag finger)))) - (translate-stencil + (ly:stencil-translate (ly:stencil-add dot-stencil (if (eq? dot-color 'white) @@ -465,7 +465,7 @@ Line thickness is given by @var{th}, fret & string spacing by orientation))) (ly:stencil-add positioned-dot - (translate-stencil label-stencil label-translation)))) + (ly:stencil-translate label-stencil label-translation)))) (else ;unknown finger-code positioned-dot)))) (if (null? restlist) @@ -501,7 +501,7 @@ Line thickness is given by @var{th}, fret & string spacing by (glyph-stencil-coordinates (stencil-coordinates 0 glyph-string-coordinate orientation)) (positioned-glyph - (translate-stencil glyph-stencil glyph-stencil-coordinates))) + (ly:stencil-translate glyph-stencil glyph-stencil-coordinates))) (if (null? restlist) positioned-glyph (ly:stencil-add @@ -574,7 +574,7 @@ Line thickness is given by @var{th}, fret & string spacing by (label-half-width (stencil-fretboard-offset label-stencil 'string orientation)) (label-outside-diagram (+ label-space label-half-width))) - (translate-stencil + (ly:stencil-translate label-stencil (stencil-coordinates (1+ (* size label-vertical-offset)) @@ -728,7 +728,7 @@ Line thickness is given by @var{th}, fret & string spacing by (set! fret-diagram-stencil (ly:stencil-add fret-diagram-stencil - (translate-stencil + (ly:stencil-translate xo-stencil (stencil-coordinates (- diagram-fret-top diff --git a/scm/stencil.scm b/scm/stencil.scm index 8513c6389a..105f6f5893 100644 --- a/scm/stencil.scm +++ b/scm/stencil.scm @@ -4,13 +4,6 @@ ;;;; ;;;; (c) 2003--2009 Han-Wen Nienhuys -(define-public (translate-stencil stencil coordinate-pair) - "Translate @code{stencil} by the distances specified in -@code{coordinate-pair}." - (ly:stencil-translate-axis - (ly:stencil-translate-axis stencil (cdr coordinate-pair) Y) - (car coordinate-pair) X)) - (define-public (stack-stencils axis dir padding stils) "Stack stencils STILS in direction AXIS, DIR, using PADDING." (cond @@ -88,13 +81,6 @@ (interval-widen xext (/ width 2)) (interval-widen yext (/ width 2))))) -(define-public (make-round-filled-box-stencil xext yext blot-diameter) - "Make a filled rounded box." - - (ly:make-stencil - (list 'round-filled-box (- (car xext)) (cdr xext) - (- (car yext)) (cdr yext) blot-diameter) - xext yext)) (define-public (make-filled-box-stencil xext yext) "Make a filled box." -- 2.39.5