From f2d6ea6c952ab8f8651f95cdc1bc45716e4d3cc8 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 29 Jul 2003 16:34:37 +0000 Subject: [PATCH] add TODO comment. --- ChangeLog | 15 +++++++++++++-- VERSION | 2 +- config.make.in | 2 +- lily/include/lilypond-input-version.hh | 8 ++++---- lily/lexer.ll | 6 +++--- lily/lilypond-version.cc | 10 +++++----- lily/lookup.cc | 2 +- lily/tie.cc | 6 +++++- ps/music-drawing-routines.ps | 7 +++++-- scm/output-ascii-script.scm | 2 +- scm/output-pdf.scm | 3 --- scm/output-pdftex.scm | 3 --- scm/output-ps.scm | 23 ----------------------- scm/output-sketch.scm | 5 ----- scm/output-sodipodi.scm | 23 ----------------------- scm/output-tex.scm | 3 --- 16 files changed, 39 insertions(+), 81 deletions(-) diff --git a/ChangeLog b/ChangeLog index dc4dd7dd0e..b4402b20f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,22 @@ + +2003-07-29 Han-Wen Nienhuys + + * 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 * { many }: Use two uppercase letters in LilyPond. * lily/main.cc, po/{ many }, scripts/{ many }: add verbs. -2003-07-29 Han-Wen Nienhuys - + * VERSION: 1.7.29 released. + * input/regression/font-name.ly: don't use PS fonts for compatibility reasons. diff --git a/VERSION b/VERSION index 4d9bc08ea0..24b6520a9b 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ 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 diff --git a/config.make.in b/config.make.in index fdfadb5a34..a9e7a6f10e 100644 --- a/config.make.in +++ b/config.make.in @@ -1,6 +1,6 @@ # -*-Makefile-*- -MISSING_OPTIONAL = @OPTIONAL@ +gMISSING_OPTIONAL = @OPTIONAL@ MISSING_REQUIRED = @REQUIRED@ # @configure_input@ diff --git a/lily/include/lilypond-input-version.hh b/lily/include/lilypond-input-version.hh index 1333a556ad..e71f6f4b2d 100644 --- a/lily/include/lilypond-input-version.hh +++ b/lily/include/lilypond-input-version.hh @@ -12,10 +12,10 @@ #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; @@ -26,6 +26,6 @@ struct LilyPond_version String extra_patch_string_; }; -extern LilyPond_version oldest_version; +extern Lilypond_version oldest_version; #endif // LILYPOND_VERSION_HH diff --git a/lily/lexer.ll b/lily/lexer.ll index 11dc326517..7fc5828206 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -729,14 +729,14 @@ strip_trailing_white (String&s) /* 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 ())); diff --git a/lily/lilypond-version.cc b/lily/lilypond-version.cc index 3854972714..ca293c9a78 100644 --- a/lily/lilypond-version.cc +++ b/lily/lilypond-version.cc @@ -1,5 +1,5 @@ /* - lilypond-version.cc -- implement LilyPond_version + lilypond-version.cc -- implement Lilypond_version source file of the GNU LilyPond music typesetter @@ -11,14 +11,14 @@ #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 version; version = String_convert::split (str, '.'); @@ -34,12 +34,12 @@ LilyPond_version::LilyPond_version (String 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_; diff --git a/lily/lookup.cc b/lily/lookup.cc index b439d28c91..8fd4b2fb13 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -400,7 +400,7 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick) } - 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)); diff --git a/lily/tie.cc b/lily/tie.cc index 99cf426d5c..21eaac68f6 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -100,7 +100,11 @@ Tie::get_default_dir (Grob*me) 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) { diff --git a/ps/music-drawing-routines.ps b/ps/music-drawing-routines.ps index dd2f6efec9..b665aff49a 100644 --- a/ps/music-drawing-routines.ps +++ b/ps/music-drawing-routines.ps @@ -214,12 +214,15 @@ % 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 diff --git a/scm/output-ascii-script.scm b/scm/output-ascii-script.scm index b955214ffb..db24d96eb0 100644 --- a/scm/output-ascii-script.scm +++ b/scm/output-ascii-script.scm @@ -49,7 +49,7 @@ )) ; simple flat slurs -(define (bezier-bow l thick) +(define (bezier-sandwich thick) (let ( (c0 (cadddr l)) (c1 (cadr l)) diff --git a/scm/output-pdf.scm b/scm/output-pdf.scm index 898c996b2c..eaaca5fa5b 100644 --- a/scm/output-pdf.scm +++ b/scm/output-pdf.scm @@ -192,9 +192,6 @@ (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)) diff --git a/scm/output-pdftex.scm b/scm/output-pdftex.scm index ceb35e65d6..96e576ffba 100644 --- a/scm/output-pdftex.scm +++ b/scm/output-pdftex.scm @@ -210,9 +210,6 @@ (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))) diff --git a/scm/output-ps.scm b/scm/output-ps.scm index 9471f9afc8..22a9c91107 100644 --- a/scm/output-ps.scm +++ b/scm/output-ps.scm @@ -39,29 +39,6 @@ (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 diff --git a/scm/output-sketch.scm b/scm/output-sketch.scm index ad914a92e4..c5fcd6c985 100644 --- a/scm/output-sketch.scm +++ b/scm/output-sketch.scm @@ -41,7 +41,6 @@ ; (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) @@ -286,10 +285,6 @@ layer('Layer 1',1,1,0,0,(0,0,0)) (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))) diff --git a/scm/output-sodipodi.scm b/scm/output-sodipodi.scm index 4c8675cc3d..23afde99a6 100644 --- a/scm/output-sodipodi.scm +++ b/scm/output-sodipodi.scm @@ -221,29 +221,6 @@ (* -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)) diff --git a/scm/output-tex.scm b/scm/output-tex.scm index 8a531626f6..408319655b 100644 --- a/scm/output-tex.scm +++ b/scm/output-tex.scm @@ -225,9 +225,6 @@ (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))) -- 2.39.2