From 50d5fce5d4a2c0e9884ebccf2cf2d2b130aae337 Mon Sep 17 00:00:00 2001 From: kitfox Date: Wed, 24 Oct 2012 07:57:51 +0000 Subject: Fixing animation bug. git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@139 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b --- .../java/com/kitfox/svg/animation/AnimateTransform.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/kitfox/svg/animation/AnimateTransform.java b/src/main/java/com/kitfox/svg/animation/AnimateTransform.java index 14e39c2..e3d48d5 100644 --- a/src/main/java/com/kitfox/svg/animation/AnimateTransform.java +++ b/src/main/java/com/kitfox/svg/animation/AnimateTransform.java @@ -182,10 +182,10 @@ public class AnimateTransform extends AnimateXform { case TR_TRANSLATE: { - double x0 = fromValue.length > 1 ? fromValue[0] : 0; - double x1 = toValue.length > 1 ? toValue[0] : 0; - double y0 = fromValue.length > 2 ? fromValue[1] : 0; - double y1 = toValue.length > 2 ? toValue[1] : 0; + double x0 = fromValue.length >= 1 ? fromValue[0] : 0; + double x1 = toValue.length >= 1 ? toValue[0] : 0; + double y0 = fromValue.length >= 2 ? fromValue[1] : 0; + double y1 = toValue.length >= 2 ? toValue[1] : 0; double x = lerp(x0, x1, interp); double y = lerp(y0, y1, interp); @@ -208,10 +208,10 @@ public class AnimateTransform extends AnimateXform } case TR_SCALE: { - double x0 = fromValue.length > 1 ? fromValue[0] : 1; - double x1 = toValue.length > 1 ? toValue[0] : 1; - double y0 = fromValue.length > 2 ? fromValue[1] : 1; - double y1 = toValue.length > 2 ? toValue[1] : 1; + double x0 = fromValue.length >= 1 ? fromValue[0] : 1; + double x1 = toValue.length >= 1 ? toValue[0] : 1; + double y0 = fromValue.length >= 2 ? fromValue[1] : 1; + double y1 = toValue.length >= 2 ? toValue[1] : 1; double x = lerp(x0, x1, interp); double y = lerp(y0, y1, interp); -- cgit v1.2.3-55-g7522