From: Jan Nieuwenhuizen Date: Sun, 19 Dec 1999 14:27:33 +0000 (+0100) Subject: patch::: 1.3.13.jcn1 X-Git-Tag: release/1.3.14~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=dc66be1e4d7546979dca2780c7634f277a37b76a;p=lilypond.git patch::: 1.3.13.jcn1 pl 13.jcn1 - bezier-bow fix --- diff --git a/CHANGES b/CHANGES index b248113d9c..0ad7305550 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +pl 13.jcn1 + - bezier-bow fix + pl 12.hwn1 - polynomial.hh - bf: generic properties diff --git a/VERSION b/VERSION index bcb4087ea5..59b0cf7d59 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=13 -MY_PATCH_LEVEL= +MY_PATCH_LEVEL=jcn1 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/flower/polynomial.cc b/flower/polynomial.cc index 7fe77f2112..2fe75879f0 100644 --- a/flower/polynomial.cc +++ b/flower/polynomial.cc @@ -76,7 +76,7 @@ Polynomial::power(int exponent, const Polynomial & src) return dest; } -const Real FUDGE = 1e-8; +static Real const FUDGE = 1e-8; void Polynomial::clean() diff --git a/lily/bezier-bow.cc b/lily/bezier-bow.cc index 1610af6ec1..a029f36e66 100644 --- a/lily/bezier-bow.cc +++ b/lily/bezier-bow.cc @@ -221,10 +221,14 @@ Bezier_bow::calc_return (Real begin_alpha, Real end_alpha) return_.control_[2] = curve_.control_[1] - thick * complex_exp (Offset (0, 90 - begin_alpha)); } +static Real const FUDGE = 1e-8; + /* -This function calculates 2 center control points, based on + This function calculates 2 center control points, + based on lines through c_0 --> left disturbing + and c_3--> right disturbing encompass points. - See Documentation/fonts.tex + See Documentation/fonts.tex */ void Bezier_bow::calc_tangent_controls () @@ -275,19 +279,23 @@ Bezier_bow::calc_tangent_controls () Direction d = LEFT; do { - maxtan[d] *= rc_correct; - angles[d] = atan (-d * maxtan[d]); + maxtan[d] *= -d * rc_correct; + angles[d] = atan (maxtan[d]); } while (flip(&d) != LEFT); Real rc3 = 0.0; - // if we have two disturbing points, have line through those... - if (disturb[LEFT][Y_AXIS] != disturb[RIGHT][Y_AXIS]) + /* + if we have two disturbing points, have line through those... + in order to get a sane line, make sure points are reasonably far apart + X distance must be reasonably(!) big (division) + */ + if (abs (disturb[LEFT][X_AXIS] - disturb[RIGHT][X_AXIS]) > FUDGE) rc3 = (disturb[RIGHT][Y_AXIS] - disturb[LEFT][Y_AXIS]) / (disturb[RIGHT][X_AXIS] - disturb[LEFT][X_AXIS]); else - rc3 = tan ((angles[RIGHT] - angles[LEFT]) / 2); + rc3 = tan ((angles[LEFT] - angles[RIGHT]) / 2); // ugh: be less steep