2002-07-23 Han-Wen <hanwen@cs.uu.nl>
+ * scm/sketch.scm: fix roundfilledbox definition
+
* lily/lily-guile.cc (robust_list_ref): be sensible with negative
argument. This fixes too-long stems on half and quarter notes.
@node Output formats
@section Output formats
-LilyPond can output processed music in different output formats.
+LilyPond can output processed music in different output formats. They
+can be used by invoking lilypond directly, i.e. not through ly2dvi,
+and supplying the @code{-f} command line option. See also
+@ref{Invoking LilyPond}.
@menu
* @TeX{} output::
@subsection Sketch output
@uref{http://sketch.sourceforge.net,Sketch} is a Free vector drawing
-program. LilyPond includes bare bones output for Sketch version 0.7.
+program. LilyPond includes bare bones output for Sketch version
+0.7.
@cindex Sketch
@cindex vector drawing
+@c -*-texinfo-*-
@node Invoking LilyPond
@chapter Invoking LilyPond
-@item -f,--format=@var{format} Output format for sheet music. Choices
-are @code{tex} (for @TeX{} output, to be processed with plain @TeX{},
-or through ly2dvi), @code{pdftex} for PDF@TeX{} input, @code{ps} (for
-PostScript), @code{scm} (for a Scheme dump), and @code{as} (for
-ASCII-art).
+@item -f,--format=@var{format}
+@c
+@c
+Output format for sheet music. Choices are @code{tex} (for @TeX{}
+output, to be processed with plain @TeX{}, or through ly2dvi),
+@code{pdftex} for PDF@TeX{} input, @code{ps} (for PostScript),
+@code{scm} (for a Scheme dump), @code{sk} (for Sketch) and @code{as}
+(for ASCII-art).
+
+@cindex output format, setting
+@cindex Sketch output
+@cindex ASCII-art output
+@cindex PDFTeX output
+@cindex PostScript output
+@cindex Scheme dump
Unless you have special requirements, you should use @TeX{}
output. All other options are experimental.
(if (<= dy 1) "-" "="))
(func "h-line" dx))))))
-(define (roundfilledbox breapth width depth height)
+(define (roundfilledbox breapth width depth height blot)
(filledbox breapth width depth height))
(define (font-load-command name-mag command)
("ps" . ,ps-output-expression)
("scm" . ,write)
("as" . ,as-output-expression)
- ("pysk" . ,pysk-output-expression)
+; ("pysk" . ,pysk-output-expression)
("sketch" . ,sketch-output-expression)
("pdftex" . ,pdftex-output-expression)
))
;; (ly-number->string (radius))
;; " ??? "))) ;; how to draw a circle in PDF?
;;
-;;(define (roundfilledbox x width y height blotdiam)
+;;(define (roundfilledbox x y width height blotdiam)
;; (string-append " "
;; (dot x y blotdiam)
;; (dot (+ x width) y blotdiam)
;;
;; WORKAROUND:
;;
-(define (roundfilledbox breadth width depth height)
+(define (roundfilledbox breadth width depth height blot)
(filledbox breadth width depth height))
;;
"depth " (number->dim depth)
"height " (number->dim height) " "))
-(define (roundfilledbox x width y height blotdiam)
- (embedded-pdf (list 'roundfilledbox x width y height blotdiam)))
+(define (roundfilledbox x y width height blotdiam)
+ (embedded-pdf (list 'roundfilledbox x y width height blotdiam)))
(define (text s)
(string-append "\\hbox{" (output-tex-string s) "}"))
(string-append (numbers->string (list breapth width depth height))
" draw_box" ))
-(define (roundfilledbox x width y height blotdiam)
+(define (roundfilledbox x y width height blotdiam)
(string-append " "
(numbers->string
- (list x width y height blotdiam)) " draw_round_box"))
+ (list x y width height blotdiam)) " draw_round_box"))
(define (dot x y radius)
(string-append " "
;; ))
+;;
+;; All functions have the signature
+;;
+;; NAME X Y ARGUMENTS-PASSED-BY-LILYPOND
+;;
+
;; guile <= 1.4.x compatibility for eval
(if (or (equal? (minor-version) "4.1")
(equal? (minor-version) "4")
(define (dispatch-x-y x y expr)
(apply (ly-eval (car expr) this-module) (append (list x y) (cdr expr))))
-
-
-
(define (ascii->string i) (make-string 1 (integer->char i)))
(sketch-numbers->string (map mul-scale (list width dy dx height x y)))
")\n"))
+
+(define (roundfilledbox x y dx dy w h b)
+ (filled-rectangle w 0 0 h x y))
+
(define (sketch-bezier x y l)
(let* ((c0 (car (list-tail l 3)))
(c123 (list-head l 3))
"bc(" (sketch-numbers->string (map mul-scale control)) ",2)\n")))
+
(define (sketch-beziers x y l thick)
(let* ((first (list-tail l 4))
(second (list-head l 4)))