summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkitfox2012-10-24 09:57:51 +0200
committerkitfox2012-10-24 09:57:51 +0200
commit50d5fce5d4a2c0e9884ebccf2cf2d2b130aae337 (patch)
tree7b10c6351af4ccf1523bb88b60b0d4277617280d
parentFixing path calculation error for continuous joins. (diff)
downloadsvg-salamander-core-50d5fce5d4a2c0e9884ebccf2cf2d2b130aae337.tar.gz
svg-salamander-core-50d5fce5d4a2c0e9884ebccf2cf2d2b130aae337.tar.xz
svg-salamander-core-50d5fce5d4a2c0e9884ebccf2cf2d2b130aae337.zip
Fixing animation bug.
git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@139 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b
-rw-r--r--src/main/java/com/kitfox/svg/animation/AnimateTransform.java16
1 files 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);