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

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

Nouvelle commande 'coutours' pou les 'markups'


From: Pierre Perol-Schneider
Subject: Nouvelle commande 'coutours' pou les 'markups'
Date: Tue, 12 Jan 2016 16:36:14 +0100

Bonjour à Tous,

Ci-joint une nouvelle commande 'contours' ('outliner') :

\version "2.19.35"
#(set-default-paper-size "a6")

#(define-markup-command (outliner layout props outln-width outln-clr text-clr text)
  (number? string? string? markup?)
  "Draw a colored ouline around a colored text."
  (interpret-markup layout props
    (markup
      (#:combine
       (#:override
        (cons 'style 'outline)
        (#:override
         (cons 'thickness outln-width)
         (#:whiteout
          (#:with-color
           (x11-color outln-clr)
           text))))
       (#:with-color
        (x11-color text-clr)
        text)))))

%% Example:
some-music = \score {
  \relative {
    \tempo "Allegro"
    c'_( d e f g a b c)
    \bar "|."
  }
  \layout { indent = 0 }
}

\header {
  title = \markup\outliner #3 #'"orange" #'"yellow" { Un peu de musique }
}
\some-music

\markup
\override #'(baseline-skip . 7)
\left-column {
  "Un look sympa :"
  \outliner #1.3 #'"black" #'"white"
  \score { \some-music }
}


Cordialement,
Pierre

reply via email to

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