[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TimeSignature with white border?
From: |
Mark Polesky |
Subject: |
Re: TimeSignature with white border? |
Date: |
Sun, 5 Apr 2009 16:14:24 -0700 (PDT) |
> From: Kieren MacMillan
> However, I'd like an automated way of "outlining" any #'stencil --
> maybe it's a task I can accomplish as a Frog?
Kieren,
Here's something to fiddle with.
Just a start, but you could develop
it more if you're interested.
Hope it helps
- Mark
\version "2.13.0"
#(define (whiteout-clef-stil grob)
(let* ((pad 1)
(this-stil (ly:clef::print grob))
(stil-x-ext (ly:stencil-extent this-stil 0))
(stil-y-ext (ly:stencil-extent this-stil 1))
(stil-w (- (cdr stil-x-ext) (car stil-x-ext)))
(stil-h (- (cdr stil-y-ext) (car stil-y-ext)))
(box-x-ext (cons (- (car stil-x-ext) pad)
(+ (cdr stil-x-ext) pad)))
(box-y-ext (cons (- (car stil-y-ext) pad)
(+ (cdr stil-y-ext) pad)))
(box-w (- (cdr box-x-ext) (car box-x-ext)))
(box-h (- (cdr box-y-ext) (car box-y-ext)))
)
(ly:grob-set-property! grob 'stencil
(ly:stencil-add
(ly:make-stencil
(list 'embedded-ps
(ly:format
(string-append "gsave\n"
"currentpoint translate\n"
"1 setgray\n"
"~a ~a ~a ~a rectfill\n"
"grestore\n")
(car box-x-ext)
(car box-y-ext)
box-w
box-h))
stil-x-ext
stil-y-ext)
this-stil))))
whiteoutClef = {
\override Slur #'layer = #-2
\override Staff.Clef #'layer = #-1
\override Staff.Clef #'stencil = #whiteout-clef-stil
}
normalClef = {
\revert Slur #'layer
\revert Staff.Clef #'layer
\revert Staff.Clef #'stencil
}
{
\whiteoutClef
\once \override Slur #'extra-offset = #'(0 . -2)
\clef bass f,1^( \clef treble a'1)
}
white-border-clef.png
Description: PNG image
- TimeSignature with white border?, Kieren MacMillan, 2009/04/05
- Re: TimeSignature with white border?, Mark Polesky, 2009/04/05
- Re: TimeSignature with white border?, Kieren MacMillan, 2009/04/05
- Re: TimeSignature with white border?,
Mark Polesky <=
- Re: TimeSignature with white border?, Mark Polesky, 2009/04/06
- Re: TimeSignature with white border?, Kieren MacMillan, 2009/04/06
- Re: TimeSignature with white border?, Trevor Daniels, 2009/04/07
- Re: TimeSignature with white border?, Kieren MacMillan, 2009/04/07
- Re: TimeSignature with white border?, Neil Puttock, 2009/04/07
- Re: TimeSignature with white border?, Kieren MacMillan, 2009/04/07
- Re: TimeSignature with white border?, Mark Polesky, 2009/04/07
- Re: TimeSignature with white border?, Neil Puttock, 2009/04/07