summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkitfox2012-04-25 17:04:24 +0200
committerkitfox2012-04-25 17:04:24 +0200
commitf9d5b8d0a0c2393195ea7139e13e54d645c83ddd (patch)
tree1364a89bcb38f65b3e36c110d2834f5271f6ef7b
parentRenderableElement clipping should now work even if no clip has been set on Gr... (diff)
downloadsvg-salamander-core-f9d5b8d0a0c2393195ea7139e13e54d645c83ddd.tar.gz
svg-salamander-core-f9d5b8d0a0c2393195ea7139e13e54d645c83ddd.tar.xz
svg-salamander-core-f9d5b8d0a0c2393195ea7139e13e54d645c83ddd.zip
Translate attribute now works when only one parameter specified.
git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@111 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b
-rw-r--r--src/main/java/com/kitfox/svg/SVGElement.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/com/kitfox/svg/SVGElement.java b/src/main/java/com/kitfox/svg/SVGElement.java
index 08a801c..7398ea9 100644
--- a/src/main/java/com/kitfox/svg/SVGElement.java
+++ b/src/main/java/com/kitfox/svg/SVGElement.java
@@ -689,7 +689,14 @@ abstract public class SVGElement implements Serializable
}
else if (function.equals("translate"))
{
- retXform.setToTranslation(terms[0], terms[1]);
+ if (terms.length == 1)
+ {
+ retXform.setToTranslation(terms[0], 0);
+ }
+ else
+ {
+ retXform.setToTranslation(terms[0], terms[1]);
+ }
}
else if (function.equals("scale"))
{