lilypond-user-fr
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: esai impression de split arrow


From: bameylan
Subject: Re: esai impression de split arrow
Date: Thu, 16 Jan 2014 15:54:17 -0800 (PST)

Daniel, voilà le code que notre ami Pierre Perol-Schneider m'avait envoyé;
regarde mon message là: 

http://lilypond-french-users.1298960.n2.nabble.com/Inserer-un-objet-graphique-td7580411.html#a7580413

et le code de Pierre:

#(define-markup-command (arrow-at-angle layout props angle-deg length fill)
(number? number? boolean?)
(let* (
(PI-OVER-180 (/ (atan 1 1) 34))
(degrees->radians (lambda (degrees) (* degrees PI-OVER-180)))
(angle-rad (degrees->radians angle-deg))
(target-x (* length (cos angle-rad)))
(target-y (* length (sin angle-rad))))
(interpret-markup layout props
(markup
#:translate (cons (/ target-x 2) (/ target-y 2))
#:rotate angle-deg
#:translate (cons (/ length -2) 0)
#:concat (#:draw-line (cons length 0)
#:arrow-head X RIGHT fill)))))
splitStaffBarLineMarkup = \markup \with-dimensions #'(0 . 0) #'(0 . 0) {
\combine
\arrow-at-angle #45 #(sqrt 8) ##t
\arrow-at-angle #-45 #(sqrt 8) ##t
}
convDownStaffBarLineMarkup = \markup \with-dimensions #'(0 . 0) #'(0 . 0) {
\arrow-at-angle #-45 #(sqrt 8) ##t
}
convUpStaffBarLineMarkup = \markup \with-dimensions #'(0 . 0) #'(0 . 0) {
\arrow-at-angle #45 #(sqrt 8) ##t
}
splitStaffBarLine = {
\once \override Staff.BarLine.stencil =
#(lambda (grob)
(ly:stencil-combine-at-edge
(ly:bar-line::print grob)
X RIGHT
(grob-interpret-markup grob splitStaffBarLineMarkup)
0))
\break
}
convDownStaffBarLine = {
\once \override Staff.BarLine.stencil =
#(lambda (grob)
(ly:stencil-combine-at-edge
(ly:bar-line::print grob)
X RIGHT
(grob-interpret-markup grob convDownStaffBarLineMarkup)
0))
\break
}
convUpStaffBarLine = {
\once \override Staff.BarLine.stencil =
#(lambda (grob)
(ly:stencil-combine-at-edge
(ly:bar-line::print grob)
X RIGHT
(grob-interpret-markup grob convUpStaffBarLineMarkup)
0))
\break
}



Le tout marche excellement bien!

Bernard




-----
Cordialement

Bernard
--
View this message in context: 
http://lilypond-french-users.1298960.n2.nabble.com/esai-impression-de-split-arrow-tp7580815p7580824.html
Sent from the LilyPond French Users mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]