2005-04-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * input/regression/markup-syntax.ly: remove \score.
+
+ * scm/define-markup-commands.scm (draw-circle): add fill argument
+
+ * scm/stencil.scm (make-circle-stencil): add fill argument
+
+ * ps/music-drawing-routines.ps: add fill argument.
+
* ly/performer-init.ly: add CueVoice to MIDI too.
* ps/music-drawing-routines.ps: new routine BeginEPSF /
* GNUmakefile.in: Bugfix: also link .map files.
->>>>>>> 1.3423
2005-04-09 Nicolas Sceaux <nicolas.sceaux@free.fr>
* scm/music-functions.scm (music->make-music): generate
\header {
-texidoc = "With the new markup syntax, text may be written in various manners."
-}
-\version "2.5.2"
+ texidoc = "Demo of markup texts, using LilyPond syntax. "
+}
-\score {
-
- {
- f'1-\markup {
- foo
- \raise #0.2 \hbracket \bold bar
- \override #'(baseline-skip . 4)
+\version "2.5.2"
- \bracket \column { baz bazr bla }
- \hspace #2.0
- \override #'(font-encoding . fetaMusic) {
- \lookup #"noteheads-0"
- }
- \semiflat
+{
+ f'1-\markup {
+ foo
+ \raise #0.2 \hbracket \bold bar
+ \override #'(baseline-skip . 4)
- { }
-
- \combine "X" "+"
- \combine "o" "/"
- }
- g'1-\markup {
-% \char-number #"abc1234abc"
- \box \column { \line { "string 1" } \line { "string 2" } }
- "$\\emptyset$"
- \draw-circle #1 #0.3
- " "
- \italic Norsk
- \super "2"
- " "
- \raise #3.0 \whiteout white-out
- \circle \dynamic p
- \with-color #green Green
- \dynamic sfzp
- \huge { "A" \smaller "A" \smaller \smaller "A"
- \smaller \smaller \smaller "A" }
- \sub "alike"
- }
- c''4
+ \bracket \column { baz bazr bla }
+ \hspace #2.0
+ \override #'(font-encoding . fetaMusic) {
+ \lookup #"noteheads-0"
}
+ \semiflat
+
+ { }
+
+ \combine "X" "+"
+ \combine "o" "/"
+ }
+ g'1-\markup {
+ % \char-number #"abc1234abc"
+ \box \column { \line { "string 1" } \line { "string 2" } }
+ " "
+ \draw-circle #1 #0.3 ##f
+ " "
+ \draw-circle #1 #0.3 ##t
+ " "
+ \italic Norsk
+ \super "2"
+ " "
+ \raise #3.0 \whiteout white-out
+ \circle \dynamic p
+ \with-color #green Green
+ \dynamic sfzp
+ \huge { "A" \smaller "A" \smaller \smaller "A"
+ \smaller \smaller \smaller "A" }
+ \sub "alike"
+ }
+ c''4
}
0 360 arc closepath fill stroke
} bind def
-/draw_circle % R T
+/draw_circle % R T F
{
+ /filled exch def
setlinewidth
dup 0 moveto
0 exch 0 exch
- 0 360 arc closepath stroke
+ 0 360 arc closepath
+ gsave stroke grestore
+ filled { fill } if
} bind def
/draw_white_dot % x1 y2 R
"Stencil as markup"
stil)
-(def-markup-command (draw-circle layout props radius thickness)
- (number? number?)
- "A circle of radius @var{radius} and thickness @var{thickness}"
- (make-circle-stencil radius thickness))
+(def-markup-command (draw-circle layout props radius thickness fill)
+ (number? number? boolean?)
+ "A circle of radius @var{radius}, thickness @var{thickness} and
+optionally filled."
+ (make-circle-stencil radius thickness fill))
(def-markup-command (circle layout props arg) (markup?)
"Draw a circle around @var{arg}. Use @code{thickness},
(list arch_angle arch_width arch_height height arch_thick thick))
" draw_bracket"))
-(define (circle radius thick)
+(define (circle radius thick fill)
(format
- "~a ~a draw_circle" radius thick))
+ "~a ~a ~a draw_circle" radius thick
+ (if fill
+ "true "
+ "false ")
+ ))
(define (char font i)
(string-append
(- (car yext)) (cdr yext))
xext yext))
-(define-public (make-circle-stencil radius thickness)
+(define-public (make-circle-stencil radius thickness fill)
"Make a circle of radius @var{radius} and thickness @var{thickness}"
(ly:make-stencil
- (list 'circle radius thickness)
+ (list 'circle radius thickness fill)
(cons (- radius) radius)
(cons (- radius) radius)))
(- (cdr y-ext) (car y-ext))))
(radius (+ (/ diameter 2) padding thickness)))
(ly:stencil-add
- (centered-stencil stencil) (make-circle-stencil radius thickness))))
+ (centered-stencil stencil) (make-circle-stencil radius thickness #f))))
(define-public (fontify-text font-metric text)
"Set TEXT with font FONT-METRIC, returning a stencil."