From f9d5b8d0a0c2393195ea7139e13e54d645c83ddd Mon Sep 17 00:00:00 2001 From: kitfox Date: Wed, 25 Apr 2012 15:04:24 +0000 Subject: 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 --- src/main/java/com/kitfox/svg/SVGElement.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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")) { -- cgit v1.2.3-55-g7522