]> git.donarmstrong.com Git - lilypond.git/blob - input/new/drawing-circles-around-various-objects.ly
8b8a09ee2d69abae460acf9c1eea7d6940b8ae1d
[lilypond.git] / input / new / drawing-circles-around-various-objects.ly
1 \version "2.11.23"
2 \header {
3   lsrtags = "tweaks-and-overrides"
4   texidoc = "
5 The @code{\circle} command allows you to draw circles around various objects,
6 for example fingering indications. However, some objects require
7 specific tweaks: rehearsal marks depend on the @code{Score.markFormatter}
8 context, bar numbers on the @code{Score.BarNumber} context, and so on.
9
10 You can tweak the printing of your circles by setting some properties
11 such as @code{#'thickness}, @code{#'circle-padding} or @code{#'font-size}.
12 "
13   doctitle = "Drawing circles around various objects"
14 }
15
16 \relative c' {
17   c1
18   \set Score.markFormatter =
19     #(lambda (mark context)
20              (make-circle-markup (format-mark-numbers mark context)))
21   \mark \default
22   c2 d^\markup { \circle \finger 2 }
23   \override Score.BarNumber #'break-visibility = #all-visible
24   \override Score.BarNumber  #'stencil =
25     #(make-stencil-circler 0.1 0.25 ly:text-interface::print)
26 }