/*
 *  The MIT License (MIT)
 *
 *  View the full license at:
 *  https://github.com/hendrixjoseph/FamilyTree/blob/master/LICENSE.md
 *
 *  Copyright (c) 2015 Joseph Hendrix
 *
 *  Hosted on GitHub at https://github.com/hendrixjoseph/FamilyTree
 *
 */

package edu.wright.hendrix11.svg.transform;

/**
 * @author Joe Hendrix
 */
public class Translate extends XyTransform
{
    public Translate(Number x, Number y)
    {
        super(x,y);
    }
    
    public Translate(Number x)
    {
        super(x);
    }

    @Override
    public String toString()
    {
        StringBuilder sb = new StringBuilder("translate(").append(x);
        
        if(y != null)
            sb.append(",").append(y);
        
        return sb.append(")").toString();
    }
}

@@ -568,187 +568,82 @@
     
-StringBuilder sb = new StringBuilder(%22translate(%22).append(x);%0A        %0A        if(y != null)%0A            sb.append(%22,%22).append(y);%0A        %0A        return sb.append(%22)%22).toString(
+Number%5B%5D args = %7Bx, y%7D;%0A        %0A        return toString(%22translate%22, args
 );%0A 

Update Translate.java