From ff60dac53c84aa7924d894732832bd4a514848d4 Mon Sep 17 00:00:00 2001 From: dooglus Date: Wed, 11 Apr 2007 20:01:19 +0000 Subject: [PATCH] While looking into bug 1696331, I noticed that interpolation from zero tangents was being treated differently in different verticies. Turns out it was using a radial interpolation, which doesn't make much sense for zero vectors (since they have no 'angle' to interpolate from). Use linear interpolation in this case. git-svn-id: http://svn.voria.com/code@455 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/valuenode_bline.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/synfig-core/trunk/src/synfig/valuenode_bline.cpp b/synfig-core/trunk/src/synfig/valuenode_bline.cpp index 4004136..912c4a7 100644 --- a/synfig-core/trunk/src/synfig/valuenode_bline.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_bline.cpp @@ -63,6 +63,10 @@ linear_interpolation(const Vector& a, const Vector& b, float c) inline Vector radial_interpolation(const Vector& a, const Vector& b, float c) { + // if either extreme is zero then use linear interpolation instead + if (a.is_equal_to(Vector::zero()) || b.is_equal_to(Vector::zero())) + return linear_interpolation(a, b, c); + affine_combo mag_combo; affine_combo ang_combo; -- 2.7.4