]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/regression/markup-syntax.ly: remove \score.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 13 Apr 2005 00:15:06 +0000 (00:15 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 13 Apr 2005 00:15:06 +0000 (00:15 +0000)
* 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.

* ps/music-drawing-routines.ps: new routine BeginEPSF /
EndEPSF.

* scm/output-ps.scm (glyph-string): break lines. 255 chars is max
for EPS files.

* scm/define-markup-commands.scm (epsfile): add epsfile command.

ChangeLog
input/regression/markup-syntax.ly
ps/music-drawing-routines.ps
scm/define-markup-commands.scm
scm/output-ps.scm
scm/stencil.scm

index 0670538b67dc6e9f796ab6a724705955b14e082e..bbd18f77a869171598af2853d29480947189d5a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 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 /
@@ -82,7 +90,6 @@
 
        * 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 
index b4ac17530ad7e30e38acdeb3a608966a7dd8ca0f..a2f474d5a30215bc635014eee97ca5aa6ab28921 100644 (file)
@@ -1,47 +1,47 @@
 \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
 }
index 8627ea5e11a982e3e33090b6a1f28aaabb3f106b..53dc007fc203865aa17e193a8befa7435565423d 100644 (file)
@@ -284,12 +284,15 @@ bind def
        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
index 14de51a7ad6b6471fa6bc48cfa3a1276ee340b50..7ae27aa26162625cd1b6548459087fb8c72b9022 100644 (file)
   "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},
index ceaf44306b2f31461e09af3496eb79dd55866177..6183c2899556bf0030eead7bbeeccbf986f4830d 100644 (file)
     (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 
index 8b193ce15d290c043f78d99006179ff3f5ca6185..81e1d9a40c28253fcd3d5b5d0b88774340f02480 100644 (file)
                        (- (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)))
 
@@ -100,7 +100,7 @@ encloses the contents.
                        (- (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."