+
+2003-07-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * lily/tie.cc: add TODO comment.
+
+ * lily/bezier.cc: replace bezier-bow with bezier-sandwich.
+
+ * scm/*.scm: remove bezier-bow. Use bezier-sandwich with rounded
+ linejoins and linecaps. This fixes problems with occasional spikes
+ on slur/tie endings.
+
2003-07-29 Heikki Junes <hjunes@cc.hut.fi>
* { many }: Use two uppercase letters in LilyPond.
* lily/main.cc, po/{ many }, scripts/{ many }: add verbs.
-2003-07-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
+ * VERSION: 1.7.29 released.
+
* input/regression/font-name.ly: don't use PS fonts for
compatibility reasons.
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=7
-PATCH_LEVEL=29
+PATCH_LEVEL=30
MY_PATCH_LEVEL=
# Use the above to send patches: MY_PATCH_LEVEL is always empty for a
# -*-Makefile-*-
-MISSING_OPTIONAL = @OPTIONAL@
+gMISSING_OPTIONAL = @OPTIONAL@
MISSING_REQUIRED = @REQUIRED@
# @configure_input@
#include "string.hh"
-struct LilyPond_version
+struct Lilypond_version
{
- LilyPond_version (int major, int minor, int patch);
- LilyPond_version (String str);
+ Lilypond_version (int major, int minor, int patch);
+ Lilypond_version (String str);
String to_string () const;
operator int () const;
String extra_patch_string_;
};
-extern LilyPond_version oldest_version;
+extern Lilypond_version oldest_version;
#endif // LILYPOND_VERSION_HH
/* 1.3.146 == removal of ; */
-LilyPond_version oldest_version ("1.3.146");
+Lilypond_version oldest_version ("1.3.146");
bool
valid_version_b (String s)
{
- LilyPond_version current ( MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL );
- LilyPond_version ver (s);
+ Lilypond_version current ( MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL );
+ Lilypond_version ver (s);
if (! ((ver >= oldest_version) && (ver <= current)))
{
non_fatal_error (_f ("Incorrect lilypond version: %s (%s, %s)", ver.to_string (), oldest_version.to_string (), current.to_string ()));
/*
- lilypond-version.cc -- implement LilyPond_version
+ lilypond-version.cc -- implement Lilypond_version
source file of the GNU LilyPond music typesetter
#include "string-convert.hh"
#include "array.hh"
-LilyPond_version::LilyPond_version (int major, int minor, int patch)
+Lilypond_version::Lilypond_version (int major, int minor, int patch)
{
major_ = major;
minor_ = minor;
patch_ = patch;
}
-LilyPond_version::LilyPond_version (String str)
+Lilypond_version::Lilypond_version (String str)
{
Array<String> version;
version = String_convert::split (str, '.');
}
String
-LilyPond_version::to_string () const
+Lilypond_version::to_string () const
{
return ::to_string (major_) + "." + ::to_string (minor_) + "." + ::to_string (patch_);
}
-LilyPond_version::operator int () const
+Lilypond_version::operator int () const
{
// ugh
return 100000 * major_ + 1000 * minor_ + patch_;
}
- SCM at = (scm_list_n (ly_symbol2scm ("bezier-bow"),
+ SCM at = (scm_list_n (ly_symbol2scm ("bezier-sandwich"),
ly_quote_scm (list),
gh_double2scm (linethick),
SCM_UNDEFINED));
return UP;
}
-
+/*
+ TODO: we should also use thickness for computing the clearance
+ between head and tie. Very thick ties will now touch the note head.
+
+ */
SCM
Tie::get_control_points (SCM smob)
{
% this is for drawing slurs.
/draw_bezier_sandwich % thickness controls
-{
+{
+ % round ending and round beginning
+ 1 setlinejoin 1 setlinecap
setlinewidth
moveto
curveto
lineto
- curveto
+ curveto
+ closepath
gsave
fill
grestore
))
; simple flat slurs
-(define (bezier-bow l thick)
+(define (bezier-sandwich thick)
(let (
(c0 (cadddr l))
(c1 (cadr l))
(define (placebox x y s) "")
-(define (bezier-bow l thick)
- (bezier-sandwich l thick))
-
(define (bezier-sandwich l thick)
(string-append (setlinewidth thick)
(moveto-pair (list-ref l 7))
(ly:number->string x) "}{"
s "}%\n"))
-(define (bezier-bow l thick)
- (embedded-pdf (list 'bezier-bow `(quote ,l) thick)))
-
(define (bezier-sandwich l thick)
(embedded-pdf (list 'bezier-sandwich `(quote ,l) thick)))
(string-append
(numbers->string (list slope width thick)) " draw_beam" ))
-;; two beziers with round endings
-(define (bezier-bow l thick)
-
- (define (bezier-ending z0 z1 z2)
- (let ((x0 (car z0))
- (y0 (cdr z0))
- (x1 (car z1))
- (y1 (cdr z1))
- (x2 (car z2))
- (y2 (cdr z2)))
- (string-append
- " "
- (numbers->string
- (list x0 y0
- (/ (sqrt (+ (* (- x1 x2) (- x1 x2))
- (* (- y1 y2) (- y1 y2)))) 2)))
- " draw_dot")))
-
- (string-append
- (bezier-sandwich l thick)
- (bezier-ending (list-ref l 3) (list-ref l 0) (list-ref l 5))
- (bezier-ending (list-ref l 7) (list-ref l 0) (list-ref l 5))))
-
;; two beziers
(define (bezier-sandwich l thick)
(string-append
; (let ((keyword (car expr)))
; (cond
; ((eq? keyword 'beam x y width slope thick)
-; ((eq? keyword 'bezier-bow x y l thick)
; ((eq? keyword 'bezier-sandwich x y l thick)
; ((eq? keyword 'bracket arch_angle arch_width arch_height height arch_thick thick)
; ((eq? keyword 'char x y i)
(define (invoke-char s i)
"")
-;; TODO: bezier-ending, see ps.scm
-(define (bezier-bow x y l thick)
- (bezier-sandwich x y l thick))
-
(define (bezier-sandwich x y l thick)
(apply
sketch-beziers (list x y (primitive-eval l) thick)))
(* -1 (/ y z))
1 1)))))
-;; TODO: bezier-ending, see ps.scm
-(define (bezier-bow urg-l thick)
-
- (define (bezier-ending z0 z1 z2)
- (let ((x0 (car z0))
- (y0 (cdr z0))
- (x1 (car z1))
- (y1 (cdr z1))
- (x2 (car z2))
- (y2 (cdr z2)))
- (let ((r (/ (sqrt (+ (* (- x1 x2) (- x1 x2))
- (* (- y1 y2) (- y1 y2)))) 2)))
- (tagify "circle" ""
- `(fill . "#000000;")
- `(cx . ,(number->string (* output-scale x0)))
- `(cy . ,(number->string (* output-scale (- 0 y0))))
- `(r . ,(number->string (* output-scale r)))))))
-
- (let ((l (eval urg-l this-module)))
- (string-append
- (bezier-sandwich l thick)
- (bezier-ending (list-ref l 3) (list-ref l 0) (list-ref l 5))
- (bezier-ending (list-ref l 7) (list-ref l 0) (list-ref l 5)))))
(define (bezier-sandwich l thick)
(let* (;;(l (eval urg-l this-module))
(ly:number->string x) "}{"
s "}%\n"))
-(define (bezier-bow l thick)
- (embedded-ps (list 'bezier-bow `(quote ,l) thick)))
-
(define (bezier-sandwich l thick)
(embedded-ps (list 'bezier-sandwich `(quote ,l) thick)))