diff options
-rw-r--r-- | src/main/java/com/kitfox/svg/SVGElement.java | 9 |
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"))
{
|