Index: /applications/editors/josm/plugins/importvec/README
===================================================================
--- /applications/editors/josm/plugins/importvec/README	(revision 26683)
+++ /applications/editors/josm/plugins/importvec/README	(revision 26684)
@@ -7,4 +7,2 @@
 
     * The license for plugin is "GPL v2 or later".
-
-    * Plugin uses parts of SVG Salamander project https://svgsalamander.dev.java.net/
Index: /applications/editors/josm/plugins/importvec/build.xml
===================================================================
--- /applications/editors/josm/plugins/importvec/build.xml	(revision 26683)
+++ /applications/editors/josm/plugins/importvec/build.xml	(revision 26684)
@@ -32,5 +32,5 @@
     <property name="commit.message" value="Commit message"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="4394"/>
+    <property name="plugin.main.version" value="4453"/>
     <!--
       ************************************************
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/A.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/A.java	(revision 26683)
+++ 	(revision )
@@ -1,102 +1,0 @@
-/*
- * Stop.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 1:56 AM
- */
-
-package com.kitfox.svg;
-
-import com.kitfox.svg.xml.StyleAttribute;
-import java.awt.*;
-import java.net.URI;
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class A extends Group {
-
-    URI href;
-    String title;
-
-    /** Creates a new instance of Stop */
-    public A() {
-    }
-/*
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent)
-    {
-		//Load style string
-        super.loaderStartElement(helper, attrs, parent);
-
-        String offset = attrs.getValue("offset");
-        this.offset = (float)XMLParseUtil.parseRatio(offset);
-
-        buildStop();
-    }
-    */
-    
-    protected void build() throws SVGException
-    {
-        super.build();
-        
-        StyleAttribute sty = new StyleAttribute();
-        
-        if (getPres(sty.setName("xlink:href")))
-        {
-            href = sty.getURIValue(getXMLBase());
-        }
-        
-        if (getPres(sty.setName("xlink:title")))
-        {
-            title = sty.getStringValue();
-        }
-    }
-
-    /**
-     * Updates all attributes in this diagram associated with a time event.
-     * Ie, all attributes with track information.
-     * @return - true if this node has changed state as a result of the time
-     * update
-     */
-    public boolean updateTime(double curTime) throws SVGException
-    {
-        boolean changeState = super.updateTime(curTime);
-//        if (trackManager.getNumTracks() == 0) return false;
-
-        //Get current values for parameters
-        StyleAttribute sty = new StyleAttribute();
-        
-        if (getPres(sty.setName("xlink:href")))
-        {
-            href = sty.getURIValue(getXMLBase());
-        }
-        
-        if (getPres(sty.setName("xlink:title")))
-        {
-            title = sty.getStringValue();
-        }
-        
-        return changeState;
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/Circle.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/Circle.java	(revision 26683)
+++ 	(revision )
@@ -1,171 +1,0 @@
-/*
- * Rect.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 5:25 PM
- */
-
-package com.kitfox.svg;
-
-import com.kitfox.svg.xml.StyleAttribute;
-import java.awt.Graphics2D;
-import java.awt.Shape;
-import java.awt.geom.Ellipse2D;
-import java.awt.geom.Rectangle2D;
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class Circle extends ShapeElement 
-{
-
-    float cx = 0f;
-    float cy = 0f;
-    float r = 0f;
-
-
-    Ellipse2D.Float circle = new Ellipse2D.Float();
-
-    /** Creates a new instance of Rect */
-    public Circle() {
-    }
-/*
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent)
-    {
-		//Load style string
-        super.loaderStartElement(helper, attrs, parent);
-
-        String cx = attrs.getValue("cx");
-        String cy = attrs.getValue("cy");
-        String r = attrs.getValue("r");
-
-        this.cx = XMLParseUtil.parseFloat(cx);
-        this.cy = XMLParseUtil.parseFloat(cy);
-        this.r = XMLParseUtil.parseFloat(r);
-
-        build();
-        
-        //setBounds(this.cx - this.r, this.cy - this.r, this.r * 2.0, this.r * 2.0);
-    }
-*/
-    /*
-    public void loaderEndElement(SVGLoaderHelper helper)
-    {
-//        super.loaderEndElement(helper);
-
-//        build();
-    }
-     */
-    
-    protected void build() throws SVGException
-    {
-        super.build();
-        
-        StyleAttribute sty = new StyleAttribute();
-        
-        if (getPres(sty.setName("cx"))) cx = sty.getFloatValueWithUnits();
-        
-        if (getPres(sty.setName("cy"))) cy = sty.getFloatValueWithUnits();
-        
-        if (getPres(sty.setName("r"))) r = sty.getFloatValueWithUnits();
-        
-        circle.setFrame(cx - r, cy - r, r * 2f, r * 2f);
-    }
-
-    public void render(Graphics2D g) throws SVGException
-    {
-        beginLayer(g);
-        renderShape(g, circle);
-        finishLayer(g);
-    }
-
-    public Shape getShape()
-    {
-        return shapeToParent(circle);
-    }
-
-    public Rectangle2D getBoundingBox() throws SVGException
-    {
-        return boundsToParent(includeStrokeInBounds(circle.getBounds2D()));
-    }
-
-    /**
-     * Updates all attributes in this diagram associated with a time event.
-     * Ie, all attributes with track information.
-     * @return - true if this node has changed state as a result of the time
-     * update
-     */
-    public boolean updateTime(double curTime) throws SVGException
-    {
-//        if (trackManager.getNumTracks() == 0) return false;
-        boolean changeState = super.updateTime(curTime);
-
-        //Get current values for parameters
-        StyleAttribute sty = new StyleAttribute();
-        boolean shapeChange = false;
-        
-        if (getPres(sty.setName("cx")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != cx)
-            {
-                cx = newVal;
-                shapeChange = true;
-            }
-        }
-        
-        if (getPres(sty.setName("cy")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != cy)
-            {
-                cy = newVal;
-                shapeChange = true;
-            }
-        }
-        
-        if (getPres(sty.setName("r")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != r)
-            {
-                r = newVal;
-                shapeChange = true;
-            }
-        }
-        
-        if (shapeChange)
-        {
-            build();
-//            circle.setFrame(cx - r, cy - r, r * 2f, r * 2f);
-//            return true;
-        }
-        
-        return changeState || shapeChange;
-    }
-    
-}
-
-
-
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/Defs.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/Defs.java	(revision 26683)
+++ 	(revision )
@@ -1,70 +1,0 @@
-/*
- * Stop.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 1:56 AM
- */
-
-package com.kitfox.svg;
-
-import java.awt.*;
-import java.awt.geom.*;
-import java.util.*;
-
-import com.kitfox.svg.xml.*;
-import org.xml.sax.*;
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class Defs extends TransformableElement
-{
-
-    /** Creates a new instance of Stop */
-    public Defs() {
-    }
-
-    /**
-     * Called after the start element but before the end element to indicate
-     * each child tag that has been processed
-     */
-    public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException
-    {
-		super.loaderAddChild(helper, child);
-
-//        members.add(child);
-    }
-
-    public boolean updateTime(double curTime) throws SVGException
-    {
-        boolean stateChange = false;
-        for (Iterator it = children.iterator(); it.hasNext();)
-        {
-            SVGElement ele = (SVGElement)it.next();
-            stateChange = stateChange || ele.updateTime(curTime);
-        }
-        
-        return super.updateTime(curTime) || stateChange;
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/Desc.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/Desc.java	(revision 26683)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/*
- * Stop.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on September 19, 2004, 1:56 AM
- */
-
-package com.kitfox.svg;
-
-/**
- * Holds title textual information within tree
- *
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class Desc extends SVGElement {
-
-    StringBuffer text = new StringBuffer();
-
-    /** Creates a new instance of Stop */
-    public Desc() {
-    }
-
-    /**
-     * Called during load process to add text scanned within a tag
-     */
-    public void loaderAddText(SVGLoaderHelper helper, String text)
-    {
-        this.text.append(text);
-    }
-
-    public String getText() { return text.toString(); }
-    
-    public boolean updateTime(double curTime)
-    {
-        return false;
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/Ellipse.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/Ellipse.java	(revision 26683)
+++ 	(revision )
@@ -1,192 +1,0 @@
-/*
- * Rect.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 5:25 PM
- */
-
-package com.kitfox.svg;
-
-import com.kitfox.svg.xml.StyleAttribute;
-import com.kitfox.svg.xml.*;
-import org.xml.sax.*;
-
-import java.awt.*;
-import java.awt.geom.*;
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class Ellipse extends ShapeElement {
-
-    float cx = 0.0f;
-    float cy = 0.0f;
-    float rx = 0.0f;
-    float ry = 0.0f;
-
-    Ellipse2D.Float ellipse = new Ellipse2D.Float();
-
-    /** Creates a new instance of Rect */
-    public Ellipse() {
-    }
-/*
-    protected void init(String idIn, Style parentStyle, String cx, String cy, String rx, String ry) {
-        super.init(idIn, parentStyle);
-
-        this.cx = parseDouble(cx);
-        this.cy = parseDouble(cy);
-        this.rx = parseDouble(rx);
-        this.ry = parseDouble(ry);
-
-        setBounds(this.cx - this.rx, this.cy - this.ry, this.rx * 2.0, this.ry * 2.0);
-    }
-*/
-    /*
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent)
-    {
-		//Load style string
-        super.loaderStartElement(helper, attrs, parent);
-
-        String cx = attrs.getValue("cx");
-        String cy = attrs.getValue("cy");
-        String rx = attrs.getValue("rx");
-        String ry = attrs.getValue("ry");
-
-        this.cx = XMLParseUtil.parseDouble(cx);
-        this.cy = XMLParseUtil.parseDouble(cy);
-        this.rx = XMLParseUtil.parseDouble(rx);
-        this.ry = XMLParseUtil.parseDouble(ry);
-
-        build();
-    }
-    */
-    
-    /*
-    public void loaderEndElement(SVGLoaderHelper helper)
-    {
-        super.loaderEndElement(helper);
-
-        build();
-    }
-     */
-    
-    protected void build() throws SVGException
-    {
-        super.build();
-        
-        StyleAttribute sty = new StyleAttribute();
-        
-        if (getPres(sty.setName("cx"))) cx = sty.getFloatValueWithUnits();
-        
-        if (getPres(sty.setName("cy"))) cy = sty.getFloatValueWithUnits();
-        
-        if (getPres(sty.setName("rx"))) rx = sty.getFloatValueWithUnits();
-        
-        if (getPres(sty.setName("ry"))) ry = sty.getFloatValueWithUnits();
-        
-        ellipse.setFrame(cx - rx, cy - ry, rx * 2f, ry * 2f);
-    }
-
-    public void render(Graphics2D g) throws SVGException
-    {
-        beginLayer(g);
-        renderShape(g, ellipse);
-        finishLayer(g);
-    }
-
-    public Shape getShape()
-    {
-        return shapeToParent(ellipse);
-    }
-
-    public Rectangle2D getBoundingBox() throws SVGException
-    {
-        return boundsToParent(includeStrokeInBounds(ellipse.getBounds2D()));
-    }
-    
-    /**
-     * Updates all attributes in this diagram associated with a time event.
-     * Ie, all attributes with track information.
-     * @return - true if this node has changed state as a result of the time
-     * update
-     */
-    public boolean updateTime(double curTime) throws SVGException
-    {
-//        if (trackManager.getNumTracks() == 0) return false;
-        boolean changeState = super.updateTime(curTime);
-
-        //Get current values for parameters
-        StyleAttribute sty = new StyleAttribute();
-        boolean shapeChange = false;
-        
-        if (getPres(sty.setName("cx")))
-        {
-            float newCx = sty.getFloatValueWithUnits();
-            if (newCx != cx)
-            {
-                cx = newCx;
-                shapeChange = true;
-            }
-        }
-        
-        if (getPres(sty.setName("cy")))
-        {
-            float newCy = sty.getFloatValueWithUnits();
-            if (newCy != cy)
-            {
-                cy = newCy;
-                shapeChange = true;
-            }
-        }
-        
-        if (getPres(sty.setName("rx")))
-        {
-            float newRx = sty.getFloatValueWithUnits();
-            if (newRx != rx)
-            {
-                rx = newRx;
-                shapeChange = true;
-            }
-        }
-        
-        if (getPres(sty.setName("ry")))
-        {
-            float newRy = sty.getFloatValueWithUnits();
-            if (newRy != ry)
-            {
-                ry = newRy;
-                shapeChange = true;
-            }
-        }
-        
-        if (shapeChange)
-        {
-            build();
-//            ellipse.setFrame(cx - rx, cy - ry, rx * 2f, ry * 2f);
-//            return true;
-        }
-        
-        return changeState || shapeChange;
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/Group.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/Group.java	(revision 26683)
+++ 	(revision )
@@ -1,301 +1,0 @@
-/*
- * Stop.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 1:56 AM
- */
-
-package com.kitfox.svg;
-
-import com.kitfox.svg.xml.StyleAttribute;
-import java.awt.Graphics2D;
-import java.awt.Rectangle;
-import java.awt.Shape;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.Area;
-import java.awt.geom.NoninvertibleTransformException;
-import java.awt.geom.Point2D;
-import java.awt.geom.Rectangle2D;
-import java.util.Iterator;
-import java.util.List;
-
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class Group extends ShapeElement
-{
-
-    //Cache bounding box for faster clip testing
-    Rectangle2D boundingBox;
-    Shape cachedShape;
-
-    //Cache clip bounds
-    final Rectangle clipBounds = new Rectangle();
-
-    /** Creates a new instance of Stop */
-    public Group() {
-    }
-
-    /*
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent)
-    {
-        //Load style string
-        super.loaderStartElement(helper, attrs, parent);
-
-        //String transform = attrs.getValue("transform");
-    }
-     */
-
-    /**
-     * Called after the start element but before the end element to indicate
-     * each child tag that has been processed
-     */
-    public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException
-    {
-        super.loaderAddChild(helper, child);
-
-//        members.add(child);
-    }
-
-    protected boolean outsideClip(Graphics2D g) throws SVGException
-    {
-        g.getClipBounds(clipBounds);
-        Rectangle2D rect = getBoundingBox();
-
-//if (rect == null)
-//{
-//    rect = getBoundingBox();
-//}
-
-//        if (rect.intersects(clipBounds))
-        if (rect.intersects(clipBounds))
-        {
-            return false;
-        }
-
-        return true;
-    }
-
-    void pick(Point2D point, boolean boundingBox, List retVec) throws SVGException
-    {
-        Point2D xPoint = new Point2D.Double(point.getX(), point.getY());
-        if (xform != null)
-        {
-            try
-            {
-                xform.inverseTransform(point, xPoint);
-            } 
-            catch (NoninvertibleTransformException ex)
-            {
-                throw new SVGException(ex);
-            }
-        }
-        
-        
-        for (Iterator it = children.iterator(); it.hasNext();)
-        {
-            SVGElement ele = (SVGElement)it.next();
-            if (ele instanceof RenderableElement)
-            {
-                RenderableElement rendEle = (RenderableElement)ele;
-                
-                rendEle.pick(xPoint, boundingBox, retVec);
-            }
-        }
-    }
-
-    void pick(Rectangle2D pickArea, AffineTransform ltw, boolean boundingBox, List retVec) throws SVGException
-    {
-        if (xform != null)
-        {
-            ltw = new AffineTransform(ltw);
-            ltw.concatenate(xform);
-        }
-        
-        
-        for (Iterator it = children.iterator(); it.hasNext();)
-        {
-            SVGElement ele = (SVGElement)it.next();
-            if (ele instanceof RenderableElement)
-            {
-                RenderableElement rendEle = (RenderableElement)ele;
-                
-                rendEle.pick(pickArea, ltw, boundingBox, retVec);
-            }
-        }
-    }
-
-    public void render(Graphics2D g) throws SVGException
-    {
-        //Don't process if not visible
-        StyleAttribute styleAttrib = new StyleAttribute();
-        if (getStyle(styleAttrib.setName("visibility")))
-        {
-            if (!styleAttrib.getStringValue().equals("visible")) return;
-        }
-        
-        //Do not process offscreen groups
-        boolean ignoreClip = diagram.ignoringClipHeuristic();
-        if (!ignoreClip && outsideClip(g)) return;
-
-        beginLayer(g);
-
-        Iterator it = children.iterator();
-
-        try
-        {
-            g.getClipBounds(clipBounds);
-        }
-        catch (Exception e)
-        {
-            //For some reason, getClipBounds can throw a null pointer exception for 
-            // some types of Graphics2D
-            ignoreClip = true;
-        }
-
-        while (it.hasNext())
-        {
-            SVGElement ele = (SVGElement)it.next();
-            if (ele instanceof RenderableElement)
-            {
-                RenderableElement rendEle = (RenderableElement)ele;
-
-//                if (shapeEle == null) continue;
-
-                if (!(ele instanceof Group))
-                {
-                    //Skip if clipping area is outside our bounds
-                    if (!ignoreClip && !rendEle.getBoundingBox().intersects(clipBounds)) 
-                    {
-                        continue;
-                    }
-                }
-
-                rendEle.render(g);
-            }
-        }
-
-        finishLayer(g);
-    }
-
-
-    /**
-     * Retrieves the cached bounding box of this group
-     */
-    public Shape getShape()
-    {
-        if (cachedShape == null) calcShape();
-        return cachedShape;
-    }
-
-    public void calcShape()
-    {
-        Area retShape = new Area();
-
-        for (Iterator it = children.iterator(); it.hasNext();)
-        {
-            SVGElement ele = (SVGElement)it.next();
-
-            if (ele instanceof ShapeElement)
-            {
-                ShapeElement shpEle = (ShapeElement)ele;
-                Shape shape = shpEle.getShape();
-                if (shape != null)
-                {
-                    retShape.add(new Area(shape));
-                }
-            }
-        }
-
-        cachedShape = shapeToParent(retShape);
-    }
-
-    /**
-     * Retrieves the cached bounding box of this group
-     */
-    public Rectangle2D getBoundingBox() throws SVGException
-    {
-        if (boundingBox == null) calcBoundingBox();
-//        calcBoundingBox();
-        return boundingBox;
-    }
-
-    /**
-     * Recalculates the bounding box by taking the union of the bounding boxes
-     * of all children.  Caches the result.
-     */
-    public void calcBoundingBox() throws SVGException
-    {
-//        Rectangle2D retRect = new Rectangle2D.Float();
-        Rectangle2D retRect = null;
-
-        for (Iterator it = children.iterator(); it.hasNext();)
-        {
-            SVGElement ele = (SVGElement)it.next();
-
-            if (ele instanceof RenderableElement)
-            {
-                RenderableElement rendEle = (RenderableElement)ele;
-                Rectangle2D bounds = rendEle.getBoundingBox();
-                if (bounds != null)
-                {
-                    if (retRect == null) retRect = bounds;
-                    else retRect = retRect.createUnion(bounds);
-                }
-            }
-        }
-
-//        if (xform != null)
-//        {
-//            retRect = xform.createTransformedShape(retRect).getBounds2D();
-//        }
-
-        //If no contents, use degenerate rectangle
-        if (retRect == null) retRect = new Rectangle2D.Float();
-
-        boundingBox = boundsToParent(retRect);
-    }
-
-    public boolean updateTime(double curTime) throws SVGException
-    {
-        boolean changeState = super.updateTime(curTime);
-        Iterator it = children.iterator();
-
-        //Distribute message to all members of this group
-        while (it.hasNext())
-        {
-            SVGElement ele = (SVGElement)it.next();
-            boolean updateVal = ele.updateTime(curTime);
-
-            changeState = changeState || updateVal;
-
-            //Update our shape if shape aware children change
-            if (ele instanceof ShapeElement) cachedShape = null;
-            if (ele instanceof RenderableElement) boundingBox = null;
-        }
-
-        return changeState;
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/Line.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/Line.java	(revision 26683)
+++ 	(revision )
@@ -1,172 +1,0 @@
-/*
- * Rect.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 5:25 PM
- */
-
-package com.kitfox.svg;
-
-import com.kitfox.svg.xml.StyleAttribute;
-import java.awt.Graphics2D;
-import java.awt.Shape;
-import java.awt.geom.Line2D;
-import java.awt.geom.Rectangle2D;
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class Line extends ShapeElement {
-
-    float x1 = 0f;
-    float y1 = 0f;
-    float x2 = 0f;
-    float y2 = 0f;
-
-    Line2D.Float line;
-//    RectangularShape rect;
-
-    /** Creates a new instance of Rect */
-    public Line() {
-    }
-
-    /*
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent)
-    {
-		//Load style string
-        super.loaderStartElement(helper, attrs, parent);
-
-        String x1 = attrs.getValue("x1");
-        String y1 = attrs.getValue("y1");
-        String x2 = attrs.getValue("x2");
-        String y2 = attrs.getValue("y2");
-
-        this.x1 = XMLParseUtil.parseFloat(x1);
-        this.y1 = XMLParseUtil.parseFloat(y1);
-        this.x2 = XMLParseUtil.parseFloat(x2);
-        this.y2 = XMLParseUtil.parseFloat(y2);
-
-        build();
-    }
-*/
-    protected void build() throws SVGException
-    {
-        super.build();
-        
-        StyleAttribute sty = new StyleAttribute();
-        
-        if (getPres(sty.setName("x1"))) x1 = sty.getFloatValueWithUnits();
-
-        if (getPres(sty.setName("y1"))) y1 = sty.getFloatValueWithUnits();
-
-        if (getPres(sty.setName("x2"))) x2 = sty.getFloatValueWithUnits();
-
-        if (getPres(sty.setName("y2"))) y2 = sty.getFloatValueWithUnits();
-
-        line = new Line2D.Float(x1, y1, x2, y2);
-    }
-    
-
-    public void render(Graphics2D g) throws SVGException
-    {
-        beginLayer(g);
-        renderShape(g, line);
-        finishLayer(g);
-    }
-
-    public Shape getShape()
-    {
-        return shapeToParent(line);
-    }
-
-    public Rectangle2D getBoundingBox() throws SVGException
-    {
-        return boundsToParent(includeStrokeInBounds(line.getBounds2D()));
-    }
-
-    /**
-     * Updates all attributes in this diagram associated with a time event.
-     * Ie, all attributes with track information.
-     * @return - true if this node has changed state as a result of the time
-     * update
-     */
-    public boolean updateTime(double curTime) throws SVGException
-    {
-//        if (trackManager.getNumTracks() == 0) return false;
-        boolean changeState = super.updateTime(curTime);
-
-        //Get current values for parameters
-        StyleAttribute sty = new StyleAttribute();
-        boolean shapeChange = false;
-        
-        if (getPres(sty.setName("x1")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != x1)
-            {
-                x1 = newVal;
-                shapeChange = true;
-            }
-        }
-
-        if (getPres(sty.setName("y1")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != y1)
-            {
-                y1 = newVal;
-                shapeChange = true;
-            }
-        }
-
-        if (getPres(sty.setName("x2")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != x2)
-            {
-                x2 = newVal;
-                shapeChange = true;
-            }
-        }
-
-        if (getPres(sty.setName("y2")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != y2)
-            {
-                y2 = newVal;
-                shapeChange = true;
-            }
-        }
-
-        if (shapeChange)
-        {
-            build();
-//            line = new Line2D.Float(x1, y1, x2, y2);
-//            return true;
-        }
-        
-        return changeState || shapeChange;
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/Metadata.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/Metadata.java	(revision 26683)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Stop.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on September 19, 2004, 1:56 AM
- */
-
-package com.kitfox.svg;
-
-/**
- * Does not hold any information.  Included to allow metadata tag to be parsed.
- *
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class Metadata extends SVGElement 
-{
-    /** Creates a new instance of Stop */
-    public Metadata() {
-    }
-
-    public boolean updateTime(double curTime)
-    {
-        return false;
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/Path.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/Path.java	(revision 26683)
+++ 	(revision )
@@ -1,154 +1,0 @@
-/*
- * Rect.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 5:25 PM
- */
-
-package com.kitfox.svg;
-
-import com.kitfox.svg.xml.StyleAttribute;
-import java.awt.*;
-import java.awt.geom.*;
-
-import com.kitfox.svg.pathcmd.*;
-import com.kitfox.svg.xml.*;
-import org.xml.sax.*;
-
-//import org.apache.batik.ext.awt.geom.ExtendedGeneralPath;
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class Path extends ShapeElement {
-
-//    PathCommand[] commands = null;
-
-    int fillRule = GeneralPath.WIND_NON_ZERO;
-    String d = "";
-//    ExtendedGeneralPath path;
-    GeneralPath path;
-
-    /** Creates a new instance of Rect */
-    public Path() {
-    }
-
-    /*
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent)
-    {
-		//Load style string
-        super.loaderStartElement(helper, attrs, parent);
-
-        StyleAttribute styleAttrib = getStyle("fill-rule");
-        String fillRule = (styleAttrib == null) ? "nonzero" : styleAttrib.getStringValue();
-        
-        String d = attrs.getValue("d");
-        path = buildPath(d, fillRule.equals("evenodd") ? GeneralPath.WIND_EVEN_ODD : GeneralPath.WIND_NON_ZERO);
-    }
-    */
-    
-    protected void build() throws SVGException
-    {
-        super.build();
-        
-        StyleAttribute sty = new StyleAttribute();
-        
-    
-        String fillRuleStrn  = (getStyle(sty.setName("fill-rule"))) ? sty.getStringValue() : "nonzero";
-        fillRule = fillRuleStrn.equals("evenodd") ? GeneralPath.WIND_EVEN_ODD : GeneralPath.WIND_NON_ZERO;
-        
-//        String d = "";
-        if (getPres(sty.setName("d"))) d = sty.getStringValue();
-
-//System.err.println(d);
-        
-        path = buildPath(d, fillRule);
-        
-//System.err.println(d);
-    }
-    
-    public void render(Graphics2D g) throws SVGException
-    {
-        beginLayer(g);
-        renderShape(g, path);
-        finishLayer(g);
-    }
-
-    public Shape getShape()
-    {
-        return shapeToParent(path);
-    }
-
-    public Rectangle2D getBoundingBox() throws SVGException
-    {
-        return boundsToParent(includeStrokeInBounds(path.getBounds2D()));
-    }
-
-    /**
-     * Updates all attributes in this diagram associated with a time event.
-     * Ie, all attributes with track information.
-     * @return - true if this node has changed state as a result of the time
-     * update
-     */
-    public boolean updateTime(double curTime) throws SVGException
-    {
-//        if (trackManager.getNumTracks() == 0) return false;
-        boolean changeState = super.updateTime(curTime);
-
-        //Get current values for parameters
-        StyleAttribute sty = new StyleAttribute();
-        boolean shapeChange = false;
-        
-        if (getStyle(sty.setName("fill-rule")))
-        {
-            int newVal = sty.getStringValue().equals("evenodd") 
-                ? GeneralPath.WIND_EVEN_ODD 
-                : GeneralPath.WIND_NON_ZERO;
-            if (newVal != fillRule)
-            {
-                fillRule = newVal;
-                changeState = true;
-            }
-        }
-        
-        if (getPres(sty.setName("d")))
-        {
-            String newVal = sty.getStringValue();
-            if (!newVal.equals(d))
-            {
-                d = newVal;
-                shapeChange = true;
-            }
-        }
-        
-        if (shapeChange)
-        {
-            build();
-//            path = buildPath(d, fillRule);
-//            return true;
-        }
-        
-        return changeState || shapeChange;
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/Polygon.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/Polygon.java	(revision 26683)
+++ 	(revision )
@@ -1,178 +1,0 @@
-/*
- * Rect.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 5:25 PM
- */
-
-package com.kitfox.svg;
-
-import com.kitfox.svg.xml.StyleAttribute;
-import com.kitfox.svg.xml.XMLParseUtil;
-import java.awt.geom.*;
-import java.awt.*;
-
-import com.kitfox.svg.xml.*;
-import org.xml.sax.*;
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class Polygon extends ShapeElement {
-
-    int fillRule = GeneralPath.WIND_NON_ZERO;
-    String pointsStrn = "";
-//    float[] points = null;
-    GeneralPath path;
-
-    /** Creates a new instance of Rect */
-    public Polygon() {
-    }
-/*
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent)
-    {
-		//Load style string
-        super.loaderStartElement(helper, attrs, parent);
-
-
-        points = XMLParseUtil.parseFloatList(attrs.getValue("points"));
-
-        build();
-    }
-*/
-/*
-    public void build()
-    {
-        StyleAttribute styleAttrib = getStyle("fill-rule");
-        String fillRule = (styleAttrib == null) ? "nonzero" : styleAttrib.getStringValue();
-
-        path = new GeneralPath(
-            fillRule.equals("evenodd") ? GeneralPath.WIND_EVEN_ODD : GeneralPath.WIND_NON_ZERO,
-            points.length / 2);
-
-        path.moveTo(points[0], points[1]);
-        for (int i = 2; i < points.length; i += 2)
-        {
-            path.lineTo(points[i], points[i + 1]);
-        }
-        path.closePath();
-    }
-*/
-    
-//static int yyyyy = 0;
-    
-    protected void build() throws SVGException
-    {
-        super.build();
-        
-        StyleAttribute sty = new StyleAttribute();
-        
-        if (getPres(sty.setName("points"))) pointsStrn = sty.getStringValue();
-        
-        String fillRuleStrn = getStyle(sty.setName("fill-rule")) ? sty.getStringValue() : "nonzero";
-        fillRule = fillRuleStrn.equals("evenodd") ? GeneralPath.WIND_EVEN_ODD : GeneralPath.WIND_NON_ZERO;
-
-        buildPath();
-    }
-    
-    protected void buildPath()
-    {
-        float[] points = XMLParseUtil.parseFloatList(pointsStrn);
-        path = new GeneralPath(fillRule, points.length / 2);
-
-        path.moveTo(points[0], points[1]);
-        for (int i = 2; i < points.length; i += 2)
-        {
-            path.lineTo(points[i], points[i + 1]);
-        }
-        path.closePath();
-    }
-    
-    public void render(Graphics2D g) throws SVGException
-    {
-        beginLayer(g);
-        renderShape(g, path);
-        finishLayer(g);
-    }
-
-
-    public Shape getShape()
-    {
-        return shapeToParent(path);
-    }
-
-    public Rectangle2D getBoundingBox() throws SVGException
-    {
-        return boundsToParent(includeStrokeInBounds(path.getBounds2D()));
-    }
-
-
-    /**
-     * Updates all attributes in this diagram associated with a time event.
-     * Ie, all attributes with track information.
-     * @return - true if this node has changed state as a result of the time
-     * update
-     */
-    public boolean updateTime(double curTime) throws SVGException
-    {
-//        if (trackManager.getNumTracks() == 0) return false;
-        boolean changeState = super.updateTime(curTime);
-
-        //Get current values for parameters
-        StyleAttribute sty = new StyleAttribute();
-        boolean shapeChange = false;
-        
-        if (getStyle(sty.setName("fill-rule")))
-        {
-            int newVal = sty.getStringValue().equals("evenodd") 
-                ? GeneralPath.WIND_EVEN_ODD 
-                : GeneralPath.WIND_NON_ZERO;
-            if (newVal != fillRule)
-            {
-                fillRule = newVal;
-                shapeChange = true;
-            }
-        }
-        
-        if (getPres(sty.setName("points")))
-        {
-            String newVal = sty.getStringValue();
-            if (!newVal.equals(pointsStrn))
-            {
-                pointsStrn = newVal;
-                shapeChange = true;
-            }
-        }
-        
-        
-        if (shapeChange)
-        {
-            build();
-//            buildPath();
-//            return true;
-        }
-        
-        return changeState || shapeChange;
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/Polyline.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/Polyline.java	(revision 26683)
+++ 	(revision )
@@ -1,153 +1,0 @@
-/*
- * Rect.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 5:25 PM
- */
-
-package com.kitfox.svg;
-
-import java.awt.geom.*;
-import java.awt.*;
-
-import com.kitfox.svg.xml.*;
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class Polyline extends ShapeElement {
-
-    int fillRule = GeneralPath.WIND_NON_ZERO;
-    String pointsStrn = "";
-//    float[] points = null;
-    GeneralPath path;
-
-    /** Creates a new instance of Rect */
-    public Polyline() {
-    }
-
-    /*
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent)
-    {
-		//Load style string
-        super.loaderStartElement(helper, attrs, parent);
-
-
-        points = XMLParseUtil.parseFloatList(attrs.getValue("points"));
-
-        build();
-    }
-    */
-
-    public void build() throws SVGException
-    {
-        super.build();
-        
-        StyleAttribute sty = new StyleAttribute();
-        
-        if (getPres(sty.setName("points"))) pointsStrn = sty.getStringValue();
-        
-        String fillRuleStrn = getStyle(sty.setName("fill-rule")) ? sty.getStringValue() : "nonzero";
-        fillRule = fillRuleStrn.equals("evenodd") ? GeneralPath.WIND_EVEN_ODD : GeneralPath.WIND_NON_ZERO;
-
-        buildPath();
-    }
-    
-    protected void buildPath()
-    {
-        float[] points = XMLParseUtil.parseFloatList(pointsStrn);
-        path = new GeneralPath(fillRule, points.length / 2);
-
-        path.moveTo(points[0], points[1]);
-        for (int i = 2; i < points.length; i += 2)
-        {
-            path.lineTo(points[i], points[i + 1]);
-        }
-    }
-
-    public void render(Graphics2D g) throws SVGException
-    {
-        beginLayer(g);
-        renderShape(g, path);
-        finishLayer(g);
-    }
-
-    public Shape getShape()
-    {
-        return shapeToParent(path);
-    }
-
-    public Rectangle2D getBoundingBox() throws SVGException
-    {
-        return boundsToParent(includeStrokeInBounds(path.getBounds2D()));
-    }
-
-    /**
-     * Updates all attributes in this diagram associated with a time event.
-     * Ie, all attributes with track information.
-     * @return - true if this node has changed state as a result of the time
-     * update
-     */
-    public boolean updateTime(double curTime) throws SVGException
-    {
-//        if (trackManager.getNumTracks() == 0) return false;
-        boolean changeState = super.updateTime(curTime);
-
-        //Get current values for parameters
-        StyleAttribute sty = new StyleAttribute();
-        boolean shapeChange = false;
-        
-        if (getStyle(sty.setName("fill-rule")))
-        {
-            int newVal = sty.getStringValue().equals("evenodd") 
-                ? GeneralPath.WIND_EVEN_ODD 
-                : GeneralPath.WIND_NON_ZERO;
-            if (newVal != fillRule)
-            {
-                fillRule = newVal;
-                shapeChange = true;
-            }
-        }
-        
-        if (getPres(sty.setName("points")))
-        {
-            String newVal = sty.getStringValue();
-            if (!newVal.equals(pointsStrn))
-            {
-                pointsStrn = newVal;
-                shapeChange = true;
-            }
-        }
-        
-        
-        if (shapeChange)
-        {
-            build();
-//            buildPath();
-//            return true;
-        }
-        
-        return changeState || shapeChange;
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/Rect.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/Rect.java	(revision 26683)
+++ 	(revision )
@@ -1,268 +1,0 @@
-/*
- * Rect.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 5:25 PM
- */
-
-package com.kitfox.svg;
-
-import com.kitfox.svg.xml.StyleAttribute;
-
-import java.awt.*;
-import java.awt.geom.*;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class Rect extends ShapeElement {
-
-    float x = 0f;
-    float y = 0f;
-    float width = 0f;
-    float height = 0f;
-    float rx = 0f;
-    float ry = 0f;
-
-    RectangularShape rect;
-
-    /** Creates a new instance of Rect */
-    public Rect() {
-    }
-
-    private void writeObject(ObjectOutputStream out) throws IOException    
-    {
-        out.writeFloat(x);
-        out.writeFloat(y);
-        out.writeFloat(width);
-        out.writeFloat(height);
-        out.writeFloat(rx);
-        out.writeFloat(ry);
-    }
-    
-    private void readObject(ObjectInputStream in) throws IOException
-    {
-        x = in.readFloat();
-        y = in.readFloat();
-        width = in.readFloat();
-        height = in.readFloat();
-        rx = in.readFloat();
-        ry = in.readFloat();
-        
-        if (rx == 0f && ry == 0f)
-        {
-            rect = new Rectangle2D.Float(x, y, width, height);
-        }
-        else
-        {
-            rect = new RoundRectangle2D.Float(x, y, width, height, rx * 2, ry * 2);
-        }
-    }
-    
-    /*
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent)
-    {
-		//Load style string
-        super.loaderStartElement(helper, attrs, parent);
-
-        String x = attrs.getValue("x");
-        String y = attrs.getValue("y");
-        String width = attrs.getValue("width");
-        String height = attrs.getValue("height");
-        String rx = attrs.getValue("rx");
-        String ry = attrs.getValue("ry");
-
-        if (rx == null) rx = ry;
-        if (ry == null) ry = rx;
-
-        this.x = XMLParseUtil.parseFloat(x);
-        this.y = XMLParseUtil.parseFloat(y);
-        this.width = XMLParseUtil.parseFloat(width);
-        this.height = XMLParseUtil.parseFloat(height);
-        if (rx != null)
-        {
-            this.rx = XMLParseUtil.parseFloat(rx);
-            this.ry = XMLParseUtil.parseFloat(ry);
-        }
-
-        build();
-//        setBounds(this.x, this.y, this.width, this.height);
-    }
-*/
-    
-    protected void build() throws SVGException
-    {
-        super.build();
-        
-        StyleAttribute sty = new StyleAttribute();
-        
-//        SVGElement parent = this.getParent();
-//        if (parent instanceof RenderableElement)
-//        {
-//            RenderableElement re = (RenderableElement)parent;
-//            Rectangle2D bounds = re.getBoundingBox();
-//            bounds = null;
-//        }
-        
-        
-        if (getPres(sty.setName("x"))) x = sty.getFloatValueWithUnits();
-        
-        if (getPres(sty.setName("y"))) y = sty.getFloatValueWithUnits();
-        
-        if (getPres(sty.setName("width"))) width = sty.getFloatValueWithUnits();
-        
-        if (getPres(sty.setName("height"))) height = sty.getFloatValueWithUnits();
-
-        boolean rxSet = false;
-        if (getPres(sty.setName("rx"))) { rx = sty.getFloatValueWithUnits(); rxSet = true; }
-        
-        boolean rySet = false;
-        if (getPres(sty.setName("ry"))) { ry = sty.getFloatValueWithUnits(); rySet = true; }
-        
-        if (!rxSet) rx = ry;
-        if (!rySet) ry = rx;
-
-        
-        if (rx == 0f && ry == 0f)
-        {
-            rect = new Rectangle2D.Float(x, y, width, height);
-        }
-        else
-        {
-            rect = new RoundRectangle2D.Float(x, y, width, height, rx * 2, ry * 2);
-        }
-    }
-
-    public void render(Graphics2D g) throws SVGException
-    {
-        beginLayer(g);
-        renderShape(g, rect);
-        finishLayer(g);
-    }
-
-    public Shape getShape()
-    {
-        return shapeToParent(rect);
-    }
-
-    public Rectangle2D getBoundingBox() throws SVGException
-    {
-        return boundsToParent(includeStrokeInBounds(rect.getBounds2D()));
-    }
-
-    /**
-     * Updates all attributes in this diagram associated with a time event.
-     * Ie, all attributes with track information.
-     * @return - true if this node has changed state as a result of the time
-     * update
-     */
-    public boolean updateTime(double curTime) throws SVGException
-    {
-//        if (trackManager.getNumTracks() == 0) return false;
-        boolean changeState = super.updateTime(curTime);
-
-        //Get current values for parameters
-        StyleAttribute sty = new StyleAttribute();
-        boolean shapeChange = false;
-        
-        if (getPres(sty.setName("x")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != x)
-            {
-                x = newVal;
-                shapeChange = true;
-            }
-        }
-
-        if (getPres(sty.setName("y")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != y)
-            {
-                y = newVal;
-                shapeChange = true;
-            }
-        }
-
-        if (getPres(sty.setName("width")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != width)
-            {
-                width = newVal;
-                shapeChange = true;
-            }
-        }
-
-        if (getPres(sty.setName("height")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != height)
-            {
-                height = newVal;
-                shapeChange = true;
-            }
-        }
-
-        if (getPres(sty.setName("rx")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != rx)
-            {
-                rx = newVal;
-                shapeChange = true;
-            }
-        }
-
-        if (getPres(sty.setName("ry")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != ry)
-            {
-                ry = newVal;
-                shapeChange = true;
-            }
-        }
-
-        if (shapeChange)
-        {
-            build();
-//            if (rx == 0f && ry == 0f)
-//            {
-//                rect = new Rectangle2D.Float(x, y, width, height);
-//            }
-//            else
-//            {
-//                rect = new RoundRectangle2D.Float(x, y, width, height, rx * 2, ry * 2);
-//            }
-//            return true;
-        }
-        
-        return changeState || shapeChange;
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/RenderableElement.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/RenderableElement.java	(revision 26683)
+++ 	(revision )
@@ -1,167 +1,0 @@
-/*
- * BoundedElement.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 9:00 AM
- */
-
-package com.kitfox.svg;
-
-import com.kitfox.svg.xml.StyleAttribute;
-import java.awt.Graphics2D;
-import java.awt.Shape;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.Area;
-import java.awt.geom.Point2D;
-import java.awt.geom.Rectangle2D;
-import java.net.URI;
-import java.util.List;
-
-
-
-/**
- * Maintains bounding box for this element
- *
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-abstract public class RenderableElement extends TransformableElement 
-{
-
-    AffineTransform cachedXform = null;
-    Shape cachedClip = null;
-    
-    public static final int VECTOR_EFFECT_NONE = 0;
-    public static final int VECTOR_EFFECT_NON_SCALING_STROKE = 1;
-    int vectorEffect;
-
-    /** Creates a new instance of BoundedElement */
-    public RenderableElement() {
-    }
-
-    public RenderableElement(String id, SVGElement parent)
-    {
-        super(id, parent);
-    }
-
-    protected void build() throws SVGException
-    {
-        super.build();
-        
-        StyleAttribute sty = new StyleAttribute();
-        
-        if (getPres(sty.setName("vector-effect")))
-        {
-            if ("non-scaling-stroke".equals(sty.getStringValue()))
-            {
-                vectorEffect = VECTOR_EFFECT_NON_SCALING_STROKE;
-            }
-            else
-            {
-                vectorEffect = VECTOR_EFFECT_NONE;
-            }
-        }
-        else
-        {
-            vectorEffect = VECTOR_EFFECT_NONE;
-        }
-    }
-    
-    abstract public void render(Graphics2D g) throws SVGException;
-    
-    abstract void pick(Point2D point, boolean boundingBox, List retVec) throws SVGException;
-    
-    abstract void pick(Rectangle2D pickArea, AffineTransform ltw, boolean boundingBox, List retVec) throws SVGException;
-    
-    abstract public Rectangle2D getBoundingBox() throws SVGException;
-/*
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent)
-    {
-        super.loaderStartElement(helper, attrs, parent);
-    }
-*/
-    /**
-     * Pushes transform stack, transforms to local coordinates and sets up
-     * clipping mask.
-     */
-    protected void beginLayer(Graphics2D g) throws SVGException
-    {
-        if (xform != null)
-        {
-            cachedXform = g.getTransform();
-            g.transform(xform);
-        }
-
-        StyleAttribute styleAttrib = new StyleAttribute();
-        
-        //Get clipping path
-//        StyleAttribute styleAttrib = getStyle("clip-path", false);
-        Shape clipPath = null;
-        /*int clipPathUnits = ClipPath.CP_USER_SPACE_ON_USE;
-        if (getStyle(styleAttrib.setName("clip-path")))
-        {
-            URI uri = styleAttrib.getURIValue(getXMLBase());
-            if (uri != null)
-            {
-                ClipPath ele = (ClipPath)diagram.getRoot().ge.getUniverse().getElement(uri);
-                clipPath = ele.getClipPathShape();
-                clipPathUnits = ele.getClipPathUnits();
-            }
-        }
-
-        //Return if we're out of clipping range
-        if (clipPath != null)
-        {
-            if (clipPathUnits == ClipPath.CP_OBJECT_BOUNDING_BOX && (this instanceof ShapeElement))
-            {
-                Rectangle2D rect = ((ShapeElement)this).getBoundingBox();
-                AffineTransform at = new AffineTransform();
-                at.scale(rect.getWidth(), rect.getHeight());
-                clipPath = at.createTransformedShape(clipPath);
-            }
-
-            cachedClip = g.getClip();
-            Area newClip = new Area(cachedClip);
-            newClip.intersect(new Area(clipPath));
-            g.setClip(newClip);
-        }*/
-    }
-
-    /**
-     * Restores transform and clipping values to the way they were before
-     * this layer was drawn.
-     */
-    protected void finishLayer(Graphics2D g)
-    {
-        if (cachedClip != null)
-        {
-            g.setClip(cachedClip);
-        }
-
-        if (cachedXform != null)
-        {
-            g.setTransform(cachedXform);
-        }
-    }
-
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGDiagram.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGDiagram.java	(revision 26683)
+++ 	(revision )
@@ -1,227 +1,0 @@
-/*
- * SVGDiagram.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on February 18, 2004, 5:04 PM
- */
-
-package com.kitfox.svg;
-
-import java.awt.Graphics2D;
-import java.awt.Rectangle;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.Point2D;
-import java.awt.geom.Rectangle2D;
-import java.io.Serializable;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-
-/**
- * Top level structure in an SVG tree.
- *
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class SVGDiagram implements Serializable
-{
-    public static final long serialVersionUID = 0;
-    
-    //Indexes elements within this SVG diagram
-    final HashMap<String,SVGElement> idMap = new HashMap<String,SVGElement>();
-
-    SVGRoot root;
-
-    /**
-     * This is used by the SVGRoot to determine the width of the 
-     */
-    private Rectangle deviceViewport = new Rectangle(100, 100);
-
-    /**
-     * If true, no attempt will be made to discard geometry based on it being
-     * out of bounds.  This trades potentially drawing many out of bounds
-     * shapes with having to recalculate bounding boxes every animation iteration.
-     */
-    protected boolean ignoreClipHeuristic = false;
-
-    /**
-     * URI that uniquely identifies this document.  Also used to resolve
-     * relative urls.  Default base for document.
-     */
-    final URI xmlBase;
-
-    /** Creates a new instance of SVGDiagram */
-    public SVGDiagram(URI xmlBase)
-    {
-        this.xmlBase = xmlBase;
-    }
-
-    /**
-     * Draws this diagram to the passed graphics context
-     */
-    public void render(Graphics2D g) throws SVGException
-    {
-        root.render(g);
-    }
-    
-    /**
-     * Searches thorough the scene graph for all RenderableElements that have
-     * shapes that contain the passed point.
-     * 
-     * For every shape which contains the pick point, a List containing the
-     * path to the node is added to the return list.  That is, the result of
-     * SVGElement.getPath() is added for each entry.
-     *
-     * @return the passed in list
-     */
-    public List pick(Point2D point, List retVec) throws SVGException
-    {
-        return pick(point, false, retVec);
-    }
-    
-    public List pick(Point2D point, boolean boundingBox, List retVec) throws SVGException
-    {
-        if (retVec == null)
-        {
-            retVec = new ArrayList();
-        }
-        
-        root.pick(point, boundingBox, retVec);
-        
-        return retVec;
-    }
-
-    public List pick(Rectangle2D pickArea, List retVec) throws SVGException
-    {
-        return pick(pickArea, false, retVec);
-    }
-    
-    public List pick(Rectangle2D pickArea, boolean boundingBox, List retVec) throws SVGException
-    {
-        if (retVec == null)
-        {
-            retVec = new ArrayList();
-        }
-        
-        root.pick(pickArea, new AffineTransform(), boundingBox, retVec);
-        
-        return retVec;
-    }
-
-    public URI getXMLBase()
-    {
-        return xmlBase;
-    }
-
-    public float getWidth()
-    {
-        if (root == null) return 0;
-        return root.getDeviceWidth();
-    }
-    
-    public float getHeight()
-    {
-        if (root == null) return 0;
-        return root.getDeviceHeight();
-    }
-    
-    /**
-     * Returns the viewing rectangle of this diagram in device coordinates.
-     */
-    public Rectangle2D getViewRect(Rectangle2D rect)
-    {
-        if (root != null) return root.getDeviceRect(rect);
-        return rect;
-    }
-
-    public Rectangle2D getViewRect()
-    {
-        return getViewRect(new Rectangle2D.Double());
-    }
-
-    public SVGElement getElement(String name)
-    {
-        return (SVGElement)idMap.get(name);
-    }
-
-    public void setElement(String name, SVGElement node)
-    {
-        idMap.put(name, node);
-    }
-
-    public void removeElement(String name)
-    {
-        idMap.remove(name);
-    }
-
-    public SVGRoot getRoot()
-    {
-        return root;
-    }
-
-    public void setRoot(SVGRoot root)
-    {
-        this.root = root;
-    }
-
-    public boolean ignoringClipHeuristic() { return ignoreClipHeuristic; }
-
-    public void setIgnoringClipHeuristic(boolean ignoreClipHeuristic) { this.ignoreClipHeuristic = ignoreClipHeuristic; }
-
-    /**
-     * Updates all attributes in this diagram associated with a time event.
-     * Ie, all attributes with track information.
-     */
-    public void updateTime(double curTime) throws SVGException
-    {
-        if (root == null) return;
-        root.updateTime(curTime);
-    }
-
-    public Rectangle getDeviceViewport()
-    {
-        return deviceViewport;
-    }
-
-    /**
-     * Sets the dimensions of the device being rendered into.  This is used by
-     * SVGRoot when its x, y, width or height parameters are specified as
-     * percentages.
-     */
-    public void setDeviceViewport(Rectangle deviceViewport)
-    {
-        this.deviceViewport.setBounds(deviceViewport);
-        if (root != null)
-        {
-            try
-            {
-                root.build();
-            } catch (SVGException ex)
-            {
-                ex.printStackTrace();
-            }
-        }
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGDisplayPanel.form
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGDisplayPanel.form	(revision 26683)
+++ 	(revision )
@@ -1,16 +1,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
-  <Events>
-    <EventHandler event="componentResized" listener="java.awt.event.ComponentListener" parameters="java.awt.event.ComponentEvent" handler="formComponentResized"/>
-  </Events>
-  <AuxValues>
-    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
-    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
-    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
-  </AuxValues>
-
-  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
-</Form>
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGDisplayPanel.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGDisplayPanel.java	(revision 26683)
+++ 	(revision )
@@ -1,195 +1,0 @@
-/*
- * SVGDisplayPanel.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on February 20, 2004, 12:29 PM
- */
-
-package com.kitfox.svg;
-
-import javax.swing.*;
-import java.awt.*;
-import java.awt.geom.*;
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class SVGDisplayPanel extends javax.swing.JPanel implements Scrollable
-{
-    public static final long serialVersionUID = 1;
-    
-    SVGDiagram diagram = null;
-    float scale = 1f;
-    Color bgColor = null;
-
-    /** Creates new form SVGDisplayPanel */
-    public SVGDisplayPanel()
-    {
-        initComponents();
-    }
-
-    public SVGDiagram getDiagram()
-    {
-        return diagram;
-    }
-    
-    public void setDiagram(SVGDiagram diagram)
-    {
-        this.diagram = diagram;
-        diagram.setDeviceViewport(getBounds());
-        
-        setDimension();
-    }
-
-    public void setScale(float scale)
-    {
-        this.scale = scale;
-        setDimension();
-    }
-
-    public void setBgColor(Color col)
-    {
-        bgColor = col;
-    }
-
-    private void setDimension()
-    {
-        if (diagram == null)
-        {
-            setPreferredSize(new Dimension(1, 1));
-            revalidate();
-            return;
-        }
-
-        final Rectangle2D.Float rect = new Rectangle2D.Float();
-        diagram.getViewRect(rect);
-
-        int w = (int)(rect.width * scale);
-        int h = (int)(rect.height * scale);
-
-        setPreferredSize(new Dimension(w, h));
-        revalidate();
-    }
-
-    /**
-     * Update this image to reflect the passed time
-     */
-    public void updateTime(double curTime) throws SVGException
-    {
-        if (diagram == null) return;
-        
-        diagram.updateTime(curTime);
-    }
-    
-    public void paintComponent(Graphics gg)
-    {
-        Graphics2D g = (Graphics2D)gg;
-
-        if (bgColor != null)
-        {
-            Dimension dim = getSize();
-            g.setColor(bgColor);
-            g.fillRect(0, 0, dim.width, dim.height);
-        }
-
-        g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
-        g.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-        if (diagram != null) 
-        {
-            try
-            {
-                diagram.render(g);
-            }
-            catch (SVGException e)
-            {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    /** This method is called from within the constructor to
-     * initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is
-     * always regenerated by the Form Editor.
-     */
-    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
-    private void initComponents()
-    {
-
-        setLayout(new java.awt.BorderLayout());
-
-        addComponentListener(new java.awt.event.ComponentAdapter()
-        {
-            public void componentResized(java.awt.event.ComponentEvent evt)
-            {
-                formComponentResized(evt);
-            }
-        });
-
-    }// </editor-fold>//GEN-END:initComponents
-
-    private void formComponentResized(java.awt.event.ComponentEvent evt)//GEN-FIRST:event_formComponentResized
-    {//GEN-HEADEREND:event_formComponentResized
-        if (diagram != null)
-        {
-            diagram.setDeviceViewport(getBounds());
-            setDimension();
-        }
-
-    }//GEN-LAST:event_formComponentResized
-
-    public Dimension getPreferredScrollableViewportSize()
-    {
-        return getPreferredSize();
-    }
-
-    public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
-    {
-        if (orientation == SwingConstants.HORIZONTAL)
-        {
-            return visibleRect.width;
-        }
-        else return visibleRect.height;
-    }
-
-    public boolean getScrollableTracksViewportHeight()
-    {
-        return false;
-    }
-
-    public boolean getScrollableTracksViewportWidth()
-    {
-        return false;
-    }
-
-    public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
-    {
-        return getScrollableBlockIncrement(visibleRect, orientation, direction) / 16;
-    }
-
-
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    // End of variables declaration//GEN-END:variables
-
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGElement.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGElement.java	(revision 26683)
+++ 	(revision )
@@ -1,752 +1,0 @@
-/*
- * SVGElement.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 1:59 AM
- * Modified on October 19, 2010 by Upliner
- */
-
-package com.kitfox.svg;
-
-import java.util.*;
-import java.util.regex.*;
-import java.net.*;
-import java.awt.geom.*;
-
-import org.xml.sax.*;
-
-import com.kitfox.svg.pathcmd.Arc;
-import com.kitfox.svg.pathcmd.BuildHistory;
-import com.kitfox.svg.pathcmd.Cubic;
-import com.kitfox.svg.pathcmd.CubicSmooth;
-import com.kitfox.svg.pathcmd.Horizontal;
-import com.kitfox.svg.pathcmd.LineTo;
-import com.kitfox.svg.pathcmd.MoveTo;
-import com.kitfox.svg.pathcmd.PathCommand;
-import com.kitfox.svg.pathcmd.Quadratic;
-import com.kitfox.svg.pathcmd.QuadraticSmooth;
-import com.kitfox.svg.pathcmd.Terminal;
-import com.kitfox.svg.pathcmd.Vertical;
-import com.kitfox.svg.xml.*;
-
-import java.io.Serializable;
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-abstract public class SVGElement implements Serializable
-{
-    public static final long serialVersionUID = 0;
-    
-    public static final String SVG_NS = "http://www.w3.org/2000/svg";
-    
-    protected SVGElement parent = null;
-    
-    protected final ArrayList<SVGElement> children = new ArrayList<SVGElement>();
-    
-    protected String id = null;
-    /**
-     * CSS class.  Used for applying style sheet information.
-     */
-    protected String cssClass = null;
-    
-    /**
-     * Styles defined for this elemnt via the <b>style</b> attribute.
-     */
-    protected final HashMap<String,StyleAttribute> inlineStyles = new HashMap<String,StyleAttribute>();
-    
-    /**
-     * Presentation attributes set for this element.  Ie, any attribute other
-     * than the <b>style</b> attribute.
-     */
-    protected final HashMap<String,StyleAttribute> presAttribs = new HashMap<String,StyleAttribute>();
-    
-    /**
-     * A list of presentation attributes to not include in the presentation
-     * attribute set.
-     */
-    protected static final Set<String> ignorePresAttrib;
-    static
-    {
-        HashSet<String> set = new HashSet<String>();
-//        set.add("id");
-//        set.add("class");
-//        set.add("style");
-//        set.add("xml:base");
-        
-        ignorePresAttrib = Collections.unmodifiableSet(set);
-    }
-    
-    /**
-     * This element may override the URI we resolve against with an
-     * xml:base attribute.  If so, a copy is placed here.  Otherwise, we defer
-     * to our parent for the reolution base
-     */
-    protected URI xmlBase = null;
-    
-    /**
-     * The diagram this element belongs to
-     */
-    protected SVGDiagram diagram;
-
-    boolean dirty = true;
-
-//    public static final Matcher adobeId = Pattern.compile("(.*)_1_").matcher("");
-//    static final String fpNumRe = "[-+]?((\\d+)|(\\d*\\.\\d+))([-+]?[eE]\\d+)?";
-    
-    /** Creates a new instance of SVGElement */
-    public SVGElement()
-    {
-        this(null, null, null);
-    }
-    
-    public SVGElement(String id, SVGElement parent)
-    {
-        this(id, null, parent);
-    }
-    
-    public SVGElement(String id, String cssClass, SVGElement parent)
-    {
-        this.id = id;
-        this.cssClass = cssClass;
-        this.parent = parent;
-    }
-    
-    public SVGElement getParent()
-    {
-        return parent;
-    }
-    
-    void setParent(SVGElement parent)
-    {
-        this.parent = parent;
-    }
-    
-    /**
-     * @return an ordered list of nodes from the root of the tree to this node
-     */
-    public List<SVGElement> getPath(List<SVGElement> retVec)
-    {
-        if (retVec == null) retVec = new ArrayList<SVGElement>();
-        
-        if (parent != null)
-        {
-            parent.getPath(retVec);
-        }
-        retVec.add(this);
-        
-        return retVec;
-    }
-    
-    /**
-     * @param retVec - A list to add all children to.  If null, a new list is
-     * created and children of this group are added.
-     *
-     * @return The list containing the children of this group
-     */
-    public List<SVGElement> getChildren(List<SVGElement> retVec)
-    {
-        if (retVec == null) retVec = new ArrayList<SVGElement>();
-        
-        retVec.addAll(children);
-        
-        return retVec;
-    }
-    
-    /**
-     * @param id - Id of svg element to return
-     * @return the child of the given id, or null if no such child exists.
-     */
-    public SVGElement getChild(String id)
-    {
-        for (Iterator<SVGElement> it = children.iterator(); it.hasNext();)
-        {
-            SVGElement ele = (SVGElement)it.next();
-            String eleId = ele.getId();
-            if (eleId != null && eleId.equals(id)) return ele;
-        }
-        
-        return null;
-    }
-    
-    /**
-     * Searches children for given element.  If found, returns index of child.
-     * Otherwise returns -1.
-     */
-    public int indexOfChild(SVGElement child)
-    {
-        return children.indexOf(child);
-    }
-    
-    /**
-     * Swaps 2 elements in children.
-     * @i index of first
-     * @j index of second
-     *
-     * @return true if successful, false otherwise
-     */
-    public void swapChildren(int i, int j) throws SVGException
-    {
-        if ((children == null) || (i < 0) || (i >= children.size()) || (j < 0) || (j >= children.size()))
-        {
-            return;
-        }
-        
-        SVGElement temp = children.get(i);
-        children.set(i, children.get(j));
-        children.set(j, temp);
-        build();
-    }
-
-    /**
-     * Called by internal processes to rebuild the geometry of this node
-     * from it's presentation attributes, style attributes and animated tracks.
-     */
-    protected void build() throws SVGException
-    {
-        StyleAttribute sty = new StyleAttribute();
-        
-        if (getPres(sty.setName("id")))
-        {
-            String newId = sty.getStringValue();
-            if (!newId.equals(id))
-            {
-                diagram.removeElement(id);
-                id = newId;
-                diagram.setElement(this.id, this);
-            }
-        }
-        if (getPres(sty.setName("class"))) cssClass = sty.getStringValue();
-        if (getPres(sty.setName("xml:base"))) xmlBase = sty.getURIValue();
-    }
-    
-    /**
-     * Copies the current style into the passed style attribute.  Checks for
-     * inline styles first, then internal and extranal style sheets, and
-     * finally checks for presentation attributes.  Recursively checks parents.
-     * @param attrib - Attribute to write style data to.  Must have it's name
-     * set to the name of the style being queried.
-     * @param recursive - If true and this object does not contain the
-     * named style attribute, checks attributes of parents abck to root until
-     * one found.
-     */
-    public boolean getStyle(StyleAttribute attrib, boolean recursive) throws SVGException
-    {
-        String styName = attrib.getName();
-        
-        //Check for local inline styles
-        StyleAttribute styAttr = (StyleAttribute)inlineStyles.get(styName);
-        
-        attrib.setStringValue(styAttr == null ? "" : styAttr.getStringValue());
-        
-        //Return if we've found a non animated style
-        if (styAttr != null) return true;
-        
-        
-        
-        //Implement style sheet lookup later
-        
-        //Check for presentation attribute
-        StyleAttribute presAttr = (StyleAttribute)presAttribs.get(styName);
-        
-        attrib.setStringValue(presAttr == null ? "" : presAttr.getStringValue());
-        
-        //Return if we've found a presentation attribute instead
-        if (presAttr != null) return true;
-        
-        
-        //If we're recursive, check parents
-        if (recursive)
-        {
-            SVGElement parentContext = getParentContext();
-            if (parentContext != null) return parentContext.getStyle(attrib, true);
-            if (parent != null) return parent.getStyle(attrib, true);
-        }
-        
-        //Unsuccessful reading style attribute
-        return false;
-    }
-    /**
-     * Copies the presentation attribute into the passed one.
-     * @return - True if attribute was read successfully
-     */
-    public boolean getPres(StyleAttribute attrib) throws SVGException
-    {
-        String presName = attrib.getName();
-        
-        //Make sure we have a coresponding presentation attribute
-        StyleAttribute presAttr = (StyleAttribute)presAttribs.get(presName);
-        
-        //Copy presentation value directly
-        attrib.setStringValue(presAttr == null ? "" : presAttr.getStringValue());
-        
-        //Return if we found presentation attribute
-        if (presAttr != null) return true;
-        
-        return false;
-    }
-
-    
-    /**
-     * Called during SAX load process to notify that this tag has begun the process
-     * of being loaded
-     * @param attrs - Attributes of this tag
-     * @param helper - An object passed to all SVG elements involved in this build
-     * process to aid in sharing information.
-     */
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent) throws SAXException
-    {
-        //Set identification info
-        this.parent = parent;
-        this.diagram = helper.diagram;
-        
-        this.id = attrs.getValue("id");
-        if (this.id != null && !this.id.equals(""))
-        {
-            diagram.setElement(this.id, this);
-        }
-        
-        String className = attrs.getValue("class");
-        this.cssClass = (className == null || className.equals("")) ? null : className;
-        //docRoot = helper.docRoot;
-        //universe = helper.universe;
-        
-        String base = attrs.getValue("xml:base");
-        if (base != null && !base.equals(""))
-        {
-            try
-            {
-                xmlBase = new URI(base);
-            }
-            catch (Exception e)
-            {
-                throw new SAXException(e);
-            }
-        }
-        
-        //Place all other attributes into the presentation attribute list
-        int numAttrs = attrs.getLength();
-        for (int i = 0; i < numAttrs; i++)
-        {
-            String name = attrs.getQName(i);
-            if (ignorePresAttrib.contains(name)) continue;
-            String value = attrs.getValue(i);
-            
-            presAttribs.put(name, new StyleAttribute(name, value));
-        }
-    }
-       
-    /**
-     * @return a set of Strings that corespond to CSS attributes on this element
-     */
-    public Set<String> getInlineAttributes()
-    {
-        return inlineStyles.keySet();
-    }
-    
-    /**
-     * @return a set of Strings that corespond to XML attributes on this element
-     */
-    public Set<String> getPresentationAttributes()
-    {
-        return presAttribs.keySet();
-    }
-    
-    /**
-     * Called after the start element but before the end element to indicate
-     * each child tag that has been processed
-     */
-    public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException
-    {
-        children.add(child);
-        child.parent = this;
-        child.setDiagram(diagram);
-    }
-    
-    private void setDiagram(SVGDiagram diagram)
-    {
-        this.diagram = diagram;
-        diagram.setElement(id, this);
-        for (Iterator<SVGElement> it = children.iterator(); it.hasNext();)
-        {
-            SVGElement ele = it.next();
-            ele.setDiagram(diagram);
-        }
-    }
-    
-    public void removeChild(SVGElement child) throws SVGElementException
-    {
-        if (!children.contains(child))
-        {
-            throw new SVGElementException(this, "Element does not contain child " + child);
-        }
-        
-        children.remove(child);
-    }
-    
-    /**
-     * Called during load process to add text scanned within a tag
-     */
-    public void loaderAddText(SVGLoaderHelper helper, String text)
-    {
-    }
-    
-    /**
-     * Called to indicate that this tag and the tags it contains have been completely
-     * processed, and that it should finish any load processes.
-     */
-    public void loaderEndElement(SVGLoaderHelper helper) throws SVGParseException
-    {
-        try
-        {
-            build();
-        }
-        catch (SVGException se)
-        {
-            throw new SVGParseException(se);
-        }
-    }
-    
-    public URI getXMLBase()
-    {
-        return xmlBase != null ? xmlBase :
-            (parent != null ? parent.getXMLBase() : diagram.getXMLBase());
-    }
-
-    /**
-     * @return the id assigned to this node.  Null if no id explicitly set.
-     */
-    public String getId()
-    {
-        return id; 
-    }
-    
-    
-    LinkedList<SVGElement> contexts = new LinkedList<SVGElement>();
-    
-    /**
-     * Hack to allow nodes to temporarily change their parents.  The Use tag will
-     * need this so it can alter the attributes that a particular node uses.
-     */
-    protected void pushParentContext(SVGElement context)
-    {
-        contexts.addLast(context);
-    }
-
-    protected SVGElement popParentContext()
-    {
-        return (SVGElement)contexts.removeLast();
-    }
-    
-    protected SVGElement getParentContext()
-    {
-        return contexts.isEmpty() ? null : (SVGElement)contexts.getLast();
-    }
-    
-    /**
-     * @return the raw style value of this attribute.  Does not take the 
-     * presentation value or animation into consideration.  Used by animations 
-     * to determine the base to animate from.
-     */
-    public StyleAttribute getStyleAbsolute(String styName)
-    {
-        //Check for local inline styles
-        return (StyleAttribute)inlineStyles.get(styName);
-    }
-
-    /*
-     * Returns the named style attribute.  Checks for inline styles first, then
-     * internal and extranal style sheets, and finally checks for presentation
-     * attributes.
-     * @param styleName - Name of attribute to return
-     * @param recursive - If true and this object does not contain the
-     * named style attribute, checks attributes of parents abck to root until
-     * one found.
-     */
-    public boolean getStyle(StyleAttribute attrib) throws SVGException
-    {
-        return getStyle(attrib, true);
-    }
-
-    /**
-     * @return the raw presentation value of this attribute.  Ignores any 
-     * modifications applied by style attributes or animation.  Used by 
-     * animations to determine the starting point to animate from
-     */
-    public StyleAttribute getPresAbsolute(String styName)
-    {
-        //Check for local inline styles
-        return presAttribs.get(styName);
-    }
-    
-    static protected AffineTransform parseTransform(String val) throws SVGException
-    {
-        final Matcher matchExpression = Pattern.compile("\\w+\\([^)]*\\)").matcher("");
-        
-        AffineTransform retXform = new AffineTransform();
-        
-        matchExpression.reset(val);
-        while (matchExpression.find())
-        {
-            retXform.concatenate(parseSingleTransform(matchExpression.group()));
-        }
-        
-        return retXform;
-    }
-    
-    static public AffineTransform parseSingleTransform(String val) throws SVGException
-    {
-        final Matcher matchWord = Pattern.compile("[-.\\w]+").matcher("");
-        
-        AffineTransform retXform = new AffineTransform();
-        
-        matchWord.reset(val);
-        if (!matchWord.find())
-        {
-            //Return identity transformation if no data present (eg, empty string)
-            return retXform;
-        }
-        
-        String function = matchWord.group().toLowerCase();
-        
-        LinkedList<String> termList = new LinkedList<String>();
-        while (matchWord.find())
-        {
-            termList.add(matchWord.group());
-        }
-        
-        
-        double[] terms = new double[termList.size()];
-        Iterator<String> it = termList.iterator();
-        int count = 0;
-        while (it.hasNext())
-        {
-            terms[count++] = XMLParseUtil.parseDouble(it.next());
-        }
-        
-        //Calculate transformation
-        if (function.equals("matrix"))
-        {
-            retXform.setTransform(terms[0], terms[1], terms[2], terms[3], terms[4], terms[5]);
-        }
-        else if (function.equals("translate"))
-        {
-            retXform.setToTranslation(terms[0], terms[1]);
-        }
-        else if (function.equals("scale"))
-        {
-            if (terms.length > 1)
-                retXform.setToScale(terms[0], terms[1]);
-            else
-                retXform.setToScale(terms[0], terms[0]);
-        }
-        else if (function.equals("rotate"))
-        {
-            if (terms.length > 2)
-                retXform.setToRotation(Math.toRadians(terms[0]), terms[1], terms[2]);
-            else
-                retXform.setToRotation(Math.toRadians(terms[0]));
-        }
-        else if (function.equals("skewx"))
-        {
-            retXform.setToShear(Math.toRadians(terms[0]), 0.0);
-        }
-        else if (function.equals("skewy"))
-        {
-            retXform.setToShear(0.0, Math.toRadians(terms[0]));
-        }
-        else
-        {
-            throw new SVGException("Unknown transform type");
-        }
-        
-        return retXform;
-    }
-
-    static protected PathCommand[] parsePathList(String list)
-    {
-        final Matcher matchPathCmd = Pattern.compile("([MmLlHhVvAaQqTtCcSsZz])|([-+]?((\\d*\\.\\d+)|(\\d+))([eE][-+]?\\d+)?)").matcher(list);
-        
-        //Tokenize
-        LinkedList<String> tokens = new LinkedList<String>();
-        while (matchPathCmd.find())
-        {
-            tokens.addLast(matchPathCmd.group());
-        }
-        
-        
-        LinkedList<PathCommand> cmdList = new LinkedList<PathCommand>();
-        char curCmd = 'Z';
-        while (tokens.size() != 0)
-        {
-            String curToken = (String)tokens.removeFirst();
-            char initChar = curToken.charAt(0);
-            if ((initChar >= 'A' && initChar <='Z') || (initChar >= 'a' && initChar <='z'))
-            {
-                curCmd = initChar;
-            }
-            else
-            {
-                tokens.addFirst(curToken);
-            }
-            
-            PathCommand cmd = null;
-            
-            switch (curCmd)
-            {
-                case 'M':
-                    cmd = new MoveTo(false, nextFloat(tokens), nextFloat(tokens));
-                    curCmd = 'L';
-                    break;
-                case 'm':
-                    cmd = new MoveTo(true, nextFloat(tokens), nextFloat(tokens));
-                    curCmd = 'l';
-                    break;
-                case 'L':
-                    cmd = new LineTo(false, nextFloat(tokens), nextFloat(tokens));
-                    break;
-                case 'l':
-                    cmd = new LineTo(true, nextFloat(tokens), nextFloat(tokens));
-                    break;
-                case 'H':
-                    cmd = new Horizontal(false, nextFloat(tokens));
-                    break;
-                case 'h':
-                    cmd = new Horizontal(true, nextFloat(tokens));
-                    break;
-                case 'V':
-                    cmd = new Vertical(false, nextFloat(tokens));
-                    break;
-                case 'v':
-                    cmd = new Vertical(true, nextFloat(tokens));
-                    break;
-                case 'A':
-                    cmd = new Arc(false, nextFloat(tokens), nextFloat(tokens),
-                            nextFloat(tokens),
-                            nextFloat(tokens) == 1f, nextFloat(tokens) == 1f,
-                            nextFloat(tokens), nextFloat(tokens));
-                    break;
-                case 'a':
-                    cmd = new Arc(true, nextFloat(tokens), nextFloat(tokens),
-                            nextFloat(tokens),
-                            nextFloat(tokens) == 1f, nextFloat(tokens) == 1f,
-                            nextFloat(tokens), nextFloat(tokens));
-                    break;
-                case 'Q':
-                    cmd = new Quadratic(false, nextFloat(tokens), nextFloat(tokens),
-                            nextFloat(tokens), nextFloat(tokens));
-                    break;
-                case 'q':
-                    cmd = new Quadratic(true, nextFloat(tokens), nextFloat(tokens),
-                            nextFloat(tokens), nextFloat(tokens));
-                    break;
-                case 'T':
-                    cmd = new QuadraticSmooth(false, nextFloat(tokens), nextFloat(tokens));
-                    break;
-                case 't':
-                    cmd = new QuadraticSmooth(true, nextFloat(tokens), nextFloat(tokens));
-                    break;
-                case 'C':
-                    cmd = new Cubic(false, nextFloat(tokens), nextFloat(tokens),
-                            nextFloat(tokens), nextFloat(tokens),
-                            nextFloat(tokens), nextFloat(tokens));
-                    break;
-                case 'c':
-                    cmd = new Cubic(true, nextFloat(tokens), nextFloat(tokens),
-                            nextFloat(tokens), nextFloat(tokens),
-                            nextFloat(tokens), nextFloat(tokens));
-                    break;
-                case 'S':
-                    cmd = new CubicSmooth(false, nextFloat(tokens), nextFloat(tokens),
-                            nextFloat(tokens), nextFloat(tokens));
-                    break;
-                case 's':
-                    cmd = new CubicSmooth(true, nextFloat(tokens), nextFloat(tokens),
-                            nextFloat(tokens), nextFloat(tokens));
-                    break;
-                case 'Z':
-                case 'z':
-                    cmd = new Terminal();
-                    break;
-                default:
-                    throw new RuntimeException("Invalid path element");
-            }
-            
-            cmdList.add(cmd);
-        }
-        
-        PathCommand[] retArr = new PathCommand[cmdList.size()];
-        cmdList.toArray(retArr);
-        return retArr;
-    }
-    
-    static protected GeneralPath buildPath(String text, int windingRule)
-    {
-        PathCommand[] commands = parsePathList(text);
-        
-        int numKnots = 2;
-        for (int i = 0; i < commands.length; i++)
-        {
-            numKnots += commands[i].getNumKnotsAdded();
-        }
-        
-        
-        GeneralPath path = new GeneralPath(windingRule, numKnots);
-        
-        BuildHistory hist = new BuildHistory();
-        
-        for (int i = 0; i < commands.length; i++)
-        {
-            PathCommand cmd = commands[i];
-            cmd.appendPath(path, hist);
-        }
-        
-        return path;
-    }
-
-    static protected float nextFloat(LinkedList<String> l)
-    {
-        String s = l.removeFirst();
-        return Float.parseFloat(s);
-    }
-    
-    /**
-     * Updates all attributes in this diagram associated with a time event.
-     * Ie, all attributes with track information.
-     * @return - true if this node has changed state as a result of the time
-     * update
-     */
-    abstract public boolean updateTime(double curTime) throws SVGException;
-
-    public int getNumChildren()
-    {
-        return children.size();
-    }
-
-    public SVGElement getChild(int i)
-    {
-        return (SVGElement)children.get(i);
-    }
-    
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGElementException.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGElementException.java	(revision 26683)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/*
- * SVGException.java
- *
- * Created on May 12, 2005, 11:32 PM
- *
- * To change this template, choose Tools | Options and locate the template under
- * the Source Creation and Management node. Right-click the template and choose
- * Open. You can then make changes to the template in the Source Editor.
- */
-
-package com.kitfox.svg;
-
-/**
- *
- * @author kitfox
- */
-public class SVGElementException extends SVGException
-{
-    public static final long serialVersionUID = 0;
-    
-    private final SVGElement element;
-    
-    /**
-     * Creates a new instance of <code>SVGException</code> without detail message.
-     */
-    public SVGElementException(SVGElement element)
-    {
-        this(element, null, null);
-    }
-    
-    
-    /**
-     * Constructs an instance of <code>SVGException</code> with the specified detail message.
-     * @param msg the detail message.
-     */
-    public SVGElementException(SVGElement element, String msg)
-    {
-        this(element, msg, null);
-    }
-    
-    public SVGElementException(SVGElement element, String msg, Throwable cause)
-    {
-        super(msg, cause);
-        this.element = element;
-    }
-    
-    public SVGElementException(SVGElement element, Throwable cause)
-    {
-        this(element, null, cause);
-    }
-
-    public SVGElement getElement()
-    {
-        return element;
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGException.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGException.java	(revision 26683)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*
- * SVGException.java
- *
- * Created on May 12, 2005, 11:32 PM
- *
- * To change this template, choose Tools | Options and locate the template under
- * the Source Creation and Management node. Right-click the template and choose
- * Open. You can then make changes to the template in the Source Editor.
- */
-
-package com.kitfox.svg;
-
-/**
- *
- * @author kitfox
- */
-public class SVGException extends java.lang.Exception
-{
-    public static final long serialVersionUID = 0;
-    
-    /**
-     * Creates a new instance of <code>SVGException</code> without detail message.
-     */
-    public SVGException()
-    {
-    }
-    
-    
-    /**
-     * Constructs an instance of <code>SVGException</code> with the specified detail message.
-     * @param msg the detail message.
-     */
-    public SVGException(String msg)
-    {
-        super(msg);
-    }
-    
-    public SVGException(String msg, Throwable cause)
-    {
-        super(msg, cause);
-    }
-    
-    public SVGException(Throwable cause)
-    {
-        super(cause);
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGLoader.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGLoader.java	(revision 26683)
+++ 	(revision )
@@ -1,262 +1,0 @@
-/*
- * SVGLoader.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on February 18, 2004, 5:09 PM
- * Modified on October 19, 2010 by Upliner
- */
-
-package com.kitfox.svg;
-
-
-import java.util.*;
-import java.net.*;
-import org.xml.sax.*;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class SVGLoader extends DefaultHandler
-{
-    final HashMap<String,Class<? extends SVGElement>> nodeClasses = new HashMap<String,Class<? extends SVGElement>>();
-
-    final LinkedList<SVGElement> buildStack = new LinkedList<SVGElement>();
-
-    final HashSet<String> ignoreClasses = new HashSet<String>();
-
-    final SVGLoaderHelper helper;
-
-    /**
-     * The diagram that represents the base of this SVG document we're loading.
-     * Will be augmented to include node indexing info and other useful stuff.
-     */
-    final SVGDiagram diagram;
-
-//    SVGElement loadRoot;
-
-    //Used to keep track of document elements that are not part of the SVG namespace
-    int skipNonSVGTagDepth = 0;
-    int indent = 0;
-
-    final boolean verbose;
-    
-    /** Creates a new instance of SVGLoader */
-    public SVGLoader(URI xmlBase)
-    {
-        this(xmlBase, false);
-    }
-    
-    public SVGLoader(URI xmlBase, boolean verbose)
-    {
-        this.verbose = verbose;
-        
-        diagram = new SVGDiagram(xmlBase);
-
-        //Compile a list of important builder classes
-        nodeClasses.put("a", A.class);
-        nodeClasses.put("circle", Circle.class);
-        nodeClasses.put("defs", Defs.class);
-        nodeClasses.put("desc", Desc.class);
-        nodeClasses.put("ellipse", Ellipse.class);
-        nodeClasses.put("g", Group.class);
-        nodeClasses.put("line", Line.class);
-        nodeClasses.put("metadata", Metadata.class);
-        nodeClasses.put("path", Path.class);
-        nodeClasses.put("polygon", Polygon.class);
-        nodeClasses.put("polyline", Polyline.class);
-        nodeClasses.put("rect", Rect.class);
-        nodeClasses.put("shape", ShapeElement.class);
-        nodeClasses.put("stop", Stop.class);
-        nodeClasses.put("style", Style.class);
-        nodeClasses.put("svg", SVGRoot.class);
-        nodeClasses.put("symbol", Symbol.class);
-        nodeClasses.put("title", Title.class);
-        nodeClasses.put("use", Use.class);
-
-        ignoreClasses.add("animate");
-        ignoreClasses.add("animatecolor");
-        ignoreClasses.add("animatemotion");
-        ignoreClasses.add("animatetransform");
-        ignoreClasses.add("clippath");
-        ignoreClasses.add("glyph");
-        ignoreClasses.add("hkern");
-        ignoreClasses.add("filter");
-        ignoreClasses.add("image");
-        ignoreClasses.add("font");
-        ignoreClasses.add("font-face");
-        ignoreClasses.add("lineargradient");
-        ignoreClasses.add("midpointstop");
-        ignoreClasses.add("missing-glyph");
-        ignoreClasses.add("pattern");
-        ignoreClasses.add("radialgradient");
-        ignoreClasses.add("set");
-        ignoreClasses.add("text");
-        ignoreClasses.add("tspan");
-
-
-        helper = new SVGLoaderHelper(xmlBase,  diagram);
-    }
-
-    private String printIndent(int indent, String indentStrn)
-    {
-        StringBuffer sb = new StringBuffer();
-        for (int i = 0; i < indent; i++)
-        {
-            sb.append(indentStrn);
-        }
-        return sb.toString();
-    }
-    
-    public void startDocument() throws SAXException
-    {
-//        System.err.println("Start doc");
-
-//        buildStack.clear();
-    }
-
-    public void endDocument() throws SAXException
-    {
-//        System.err.println("End doc");
-    }
-
-    public void startElement(String namespaceURI, String sName, String qName, Attributes attrs) throws SAXException
-    {
-        if (verbose)
-        {
-            System.err.println(printIndent(indent, " ") + "Starting parse of tag " + sName+ ": " + namespaceURI);
-        }
-        indent++;
-        
-        if (skipNonSVGTagDepth != 0 || (!namespaceURI.equals("") && !namespaceURI.equals(SVGElement.SVG_NS)))
-        {
-            skipNonSVGTagDepth++;
-            return;
-        }
-        
-        sName = sName.toLowerCase();
-
-//javax.swing.JOptionPane.showMessageDialog(null, sName);
-
-        Class<?> cls = nodeClasses.get(sName);
-        if (cls == null)
-        {
-            if (!ignoreClasses.contains(sName))
-            {
-                System.err.println("SVGLoader: Could not identify tag '" + sName + "'");
-            }
-            return;
-        }
-
-//Debug info tag depth
-//for (int i = 0; i < buildStack.size(); i++) System.err.print(" ");
-//System.err.println("+" + sName);
-
-        try {
-            SVGElement svgEle = (SVGElement)cls.newInstance();
-
-            SVGElement parent = null;
-            if (buildStack.size() != 0) parent = (SVGElement)buildStack.getLast();
-            svgEle.loaderStartElement(helper, attrs, parent);
-
-            buildStack.addLast(svgEle);
-        }
-        catch (Exception e)
-        {
-            e.printStackTrace();
-            throw new SAXException(e);
-        }
-
-    }
-
-    public void endElement(String namespaceURI, String sName, String qName)
-        throws SAXException
-    {
-        indent--;
-        if (verbose)
-        {
-            System.err.println(printIndent(indent, " ") + "Ending parse of tag " + sName+ ": " + namespaceURI);
-        }
-        
-        if (skipNonSVGTagDepth != 0)
-        {
-            skipNonSVGTagDepth--;
-            return;
-        }
-        
-        sName = sName.toLowerCase();
-
-        Object obj = nodeClasses.get(sName);
-        if (obj == null) return;
-
-//Debug info tag depth
-//for (int i = 0; i < buildStack.size(); i++) System.err.print(" ");
-//System.err.println("-" + sName);
-
-        try {
-            SVGElement svgEle = (SVGElement)buildStack.removeLast();
-
-            svgEle.loaderEndElement(helper);
-
-            SVGElement parent = null;
-            if (buildStack.size() != 0) parent = (SVGElement)buildStack.getLast();
-            //else loadRoot = (SVGElement)svgEle;
-
-            if (parent != null) parent.loaderAddChild(helper, svgEle);
-            else diagram.setRoot((SVGRoot)svgEle);
-
-        }
-        catch (Exception e)
-        {
-            e.printStackTrace();
-            throw new SAXException(e);
-        }
-    }
-
-    public void characters(char buf[], int offset, int len)
-        throws SAXException
-    {
-        if (skipNonSVGTagDepth != 0)
-        {
-            return;
-        }
-
-        if (buildStack.size() != 0)
-        {
-            SVGElement parent = buildStack.getLast();
-            String s = new String(buf, offset, len);
-            parent.loaderAddText(helper, s);
-        }
-    }
-
-    public void processingInstruction(String target, String data)
-        throws SAXException
-    {
-        //Check for external style sheet
-    }
-    
-//    public SVGElement getLoadRoot() { return loadRoot; }
-    public SVGDiagram getLoadedDiagram() { return diagram; }
-    
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGLoaderHelper.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGLoaderHelper.java	(revision 26683)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/*
- * SVGLoaderHelper.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on February 18, 2004, 5:37 PM
- */
-
-package com.kitfox.svg;
-
-import java.net.*;
-import java.io.*;
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class SVGLoaderHelper
-{
-    /** This is the diagram which the load process is currently loading */
-    public final SVGDiagram diagram;
-
-    public final URI xmlBase;
-    
-    /** Creates a new instance of SVGLoaderHelper */
-    public SVGLoaderHelper(URI xmlBase, SVGDiagram diagram)
-    {
-        this.xmlBase = xmlBase;
-        this.diagram = diagram;
-    }
-
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGParseException.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGParseException.java	(revision 26683)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*
- * SVGException.java
- *
- * Created on May 12, 2005, 11:32 PM
- *
- * To change this template, choose Tools | Options and locate the template under
- * the Source Creation and Management node. Right-click the template and choose
- * Open. You can then make changes to the template in the Source Editor.
- */
-
-package com.kitfox.svg;
-
-/**
- *
- * @author kitfox
- */
-public class SVGParseException extends java.lang.Exception
-{
-    public static final long serialVersionUID = 0;
-    
-    /**
-     * Creates a new instance of <code>SVGException</code> without detail message.
-     */
-    public SVGParseException()
-    {
-    }
-    
-    
-    /**
-     * Constructs an instance of <code>SVGException</code> with the specified detail message.
-     * @param msg the detail message.
-     */
-    public SVGParseException(String msg)
-    {
-        super(msg);
-    }
-    
-    public SVGParseException(String msg, Throwable cause)
-    {
-        super(msg, cause);
-    }
-    
-    public SVGParseException(Throwable cause)
-    {
-        super(cause);
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGRoot.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/SVGRoot.java	(revision 26683)
+++ 	(revision )
@@ -1,395 +1,0 @@
-/*
- * SVGRoot.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on February 18, 2004, 5:33 PM
- */
-
-package com.kitfox.svg;
-
-import com.kitfox.svg.xml.NumberWithUnits;
-import com.kitfox.svg.xml.StyleAttribute;
-import java.awt.geom.*;
-import java.awt.*;
-
-/**
- * The root element of an SVG tree.
- *
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class SVGRoot extends Group
-{
-    NumberWithUnits x;
-    NumberWithUnits y;
-    NumberWithUnits width;
-    NumberWithUnits height;
-
-    
-//    final Rectangle2D.Float viewBox = new Rectangle2D.Float();
-    Rectangle2D.Float viewBox = null;
-
-    public static final int PA_X_NONE = 0;
-    public static final int PA_X_MIN = 1;
-    public static final int PA_X_MID = 2;
-    public static final int PA_X_MAX = 3;
-
-    public static final int PA_Y_NONE = 0;
-    public static final int PA_Y_MIN = 1;
-    public static final int PA_Y_MID = 2;
-    public static final int PA_Y_MAX = 3;
-
-    public static final int PS_MEET = 0;
-    public static final int PS_SLICE = 1;
-
-    int parSpecifier = PS_MEET;
-    int parAlignX = PA_X_MID;
-    int parAlignY = PA_Y_MID;
-
-    final AffineTransform viewXform = new AffineTransform();
-    final Rectangle2D.Float clipRect = new Rectangle2D.Float();
-
-    /** Creates a new instance of SVGRoot */
-    public SVGRoot()
-    {
-    }
-/*
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent)
-    {
-		//Load style string
-        super.loaderStartElement(helper, attrs, parent);
-
-        x = XMLParseUtil.parseNumberWithUnits(attrs.getValue("x"));
-        y = XMLParseUtil.parseNumberWithUnits(attrs.getValue("y"));
-        width = XMLParseUtil.parseNumberWithUnits(attrs.getValue("width"));
-        height = XMLParseUtil.parseNumberWithUnits(attrs.getValue("height"));
-
-        String viewBox = attrs.getValue("viewBox");
-        float[] coords = XMLParseUtil.parseFloatList(viewBox);
-
-        if (coords == null)
-        {
-            //this.viewBox.setRect(0, 0, width.getValue(), height.getValue());
-            this.viewBox = null;
-        }
-        else
-        {
-            this.viewBox = new Rectangle2D.Float(coords[0], coords[1], coords[2], coords[3]);
-        }
-
-        String par = attrs.getValue("preserveAspectRatio");
-        if (par != null)
-        {
-            String[] parList = XMLParseUtil.parseStringList(par);
-
-            if (parList[0].equals("none")) { parAlignX = PA_X_NONE; parAlignY = PA_Y_NONE; }
-            else if (parList[0].equals("xMinYMin")) { parAlignX = PA_X_MIN; parAlignY = PA_Y_MIN; }
-            else if (parList[0].equals("xMidYMin")) { parAlignX = PA_X_MID; parAlignY = PA_Y_MIN; }
-            else if (parList[0].equals("xMaxYMin")) { parAlignX = PA_X_MAX; parAlignY = PA_Y_MIN; }
-            else if (parList[0].equals("xMinYMid")) { parAlignX = PA_X_MIN; parAlignY = PA_Y_MID; }
-            else if (parList[0].equals("xMidYMid")) { parAlignX = PA_X_MID; parAlignY = PA_Y_MID; }
-            else if (parList[0].equals("xMaxYMid")) { parAlignX = PA_X_MAX; parAlignY = PA_Y_MID; }
-            else if (parList[0].equals("xMinYMax")) { parAlignX = PA_X_MIN; parAlignY = PA_Y_MAX; }
-            else if (parList[0].equals("xMidYMax")) { parAlignX = PA_X_MID; parAlignY = PA_Y_MAX; }
-            else if (parList[0].equals("xMaxYMax")) { parAlignX = PA_X_MAX; parAlignY = PA_Y_MAX; }
-
-            if (parList[1].equals("meet")) parSpecifier = PS_MEET;
-            else if (parList[1].equals("slice")) parSpecifier = PS_SLICE;
-        }
-
-        build();
-    }
-*/
-    
-    public void build() throws SVGException
-    {
-        super.build();
-        
-        StyleAttribute sty = new StyleAttribute();
-        
-        if (getPres(sty.setName("x"))) x = sty.getNumberWithUnits();
-        
-        if (getPres(sty.setName("y"))) y = sty.getNumberWithUnits();
-        
-        if (getPres(sty.setName("width"))) width = sty.getNumberWithUnits();
-        
-        if (getPres(sty.setName("height"))) height = sty.getNumberWithUnits();
-        
-        if (getPres(sty.setName("viewBox"))) 
-        {
-            float[] coords = sty.getFloatList();
-            viewBox = new Rectangle2D.Float(coords[0], coords[1], coords[2], coords[3]);
-        }
-        
-        if (getPres(sty.setName("preserveAspectRatio")))
-        {
-            String preserve = sty.getStringValue();
-            
-            if (contains(preserve, "none")) { parAlignX = PA_X_NONE; parAlignY = PA_Y_NONE; }
-            else if (contains(preserve, "xMinYMin")) { parAlignX = PA_X_MIN; parAlignY = PA_Y_MIN; }
-            else if (contains(preserve, "xMidYMin")) { parAlignX = PA_X_MID; parAlignY = PA_Y_MIN; }
-            else if (contains(preserve, "xMaxYMin")) { parAlignX = PA_X_MAX; parAlignY = PA_Y_MIN; }
-            else if (contains(preserve, "xMinYMid")) { parAlignX = PA_X_MIN; parAlignY = PA_Y_MID; }
-            else if (contains(preserve, "xMidYMid")) { parAlignX = PA_X_MID; parAlignY = PA_Y_MID; }
-            else if (contains(preserve, "xMaxYMid")) { parAlignX = PA_X_MAX; parAlignY = PA_Y_MID; }
-            else if (contains(preserve, "xMinYMax")) { parAlignX = PA_X_MIN; parAlignY = PA_Y_MAX; }
-            else if (contains(preserve, "xMidYMax")) { parAlignX = PA_X_MID; parAlignY = PA_Y_MAX; }
-            else if (contains(preserve, "xMaxYMax")) { parAlignX = PA_X_MAX; parAlignY = PA_Y_MAX; }
-
-            if (contains(preserve, "meet")) parSpecifier = PS_MEET;
-            else if (contains(preserve, "slice")) parSpecifier = PS_SLICE;
-            
-            /*
-            String[] parList = sty.getStringList();
-
-            if (parList[0].equals("none")) { parAlignX = PA_X_NONE; parAlignY = PA_Y_NONE; }
-            else if (parList[0].equals("xMinYMin")) { parAlignX = PA_X_MIN; parAlignY = PA_Y_MIN; }
-            else if (parList[0].equals("xMidYMin")) { parAlignX = PA_X_MID; parAlignY = PA_Y_MIN; }
-            else if (parList[0].equals("xMaxYMin")) { parAlignX = PA_X_MAX; parAlignY = PA_Y_MIN; }
-            else if (parList[0].equals("xMinYMid")) { parAlignX = PA_X_MIN; parAlignY = PA_Y_MID; }
-            else if (parList[0].equals("xMidYMid")) { parAlignX = PA_X_MID; parAlignY = PA_Y_MID; }
-            else if (parList[0].equals("xMaxYMid")) { parAlignX = PA_X_MAX; parAlignY = PA_Y_MID; }
-            else if (parList[0].equals("xMinYMax")) { parAlignX = PA_X_MIN; parAlignY = PA_Y_MAX; }
-            else if (parList[0].equals("xMidYMax")) { parAlignX = PA_X_MID; parAlignY = PA_Y_MAX; }
-            else if (parList[0].equals("xMaxYMax")) { parAlignX = PA_X_MAX; parAlignY = PA_Y_MAX; }
-
-            if (parList[1].equals("meet")) parSpecifier = PS_MEET;
-            else if (parList[1].equals("slice")) parSpecifier = PS_SLICE;
-             */
-        }
-        
-        prepareViewport();
-    }
-    
-    private boolean contains(String text, String find) 
-    {
-        return (text.indexOf(find) != -1);
-    }
-    
-    protected void prepareViewport()
-    {
-        Rectangle deviceViewport = diagram.getDeviceViewport();
-        
-        Rectangle2D defaultBounds;
-        try
-        {
-            defaultBounds = getBoundingBox();
-        } catch (SVGException ex)
-        {
-            defaultBounds= new Rectangle2D.Float();
-        }
-        
-        //Determine destination rectangle
-        float xx, yy, ww, hh;
-        if (width != null)
-        {
-            xx = (x == null) ? 0 : StyleAttribute.convertUnitsToPixels(x.getUnits(), x.getValue());
-            if (width.getUnits() == NumberWithUnits.UT_PERCENT)
-            {
-                ww = width.getValue() * deviceViewport.width;
-            }
-            else
-            {
-                ww = StyleAttribute.convertUnitsToPixels(width.getUnits(), width.getValue());
-            }
-//            setAttribute("x", AnimationElement.AT_XML, "" + xx);
-//            setAttribute("width", AnimationElement.AT_XML, "" + ww);
-        }
-        else if (viewBox != null)
-        {
-            xx = (float)viewBox.x;
-            ww = (float)viewBox.width;
-            width = new NumberWithUnits(ww, NumberWithUnits.UT_PX);
-            x = new NumberWithUnits(xx, NumberWithUnits.UT_PX);
-        }
-        else
-        {
-            //Estimate size from scene bounding box
-            xx = (float)defaultBounds.getX();
-            ww = (float)defaultBounds.getWidth();
-            width = new NumberWithUnits(ww, NumberWithUnits.UT_PX);
-            x = new NumberWithUnits(xx, NumberWithUnits.UT_PX);
-        }
-        
-        if (height != null)
-        {
-            yy = (y == null) ? 0 : StyleAttribute.convertUnitsToPixels(y.getUnits(), y.getValue());
-            if (height.getUnits() == NumberWithUnits.UT_PERCENT)
-            {
-                hh = height.getValue() * deviceViewport.height;
-            }
-            else
-            {
-                hh = StyleAttribute.convertUnitsToPixels(height.getUnits(), height.getValue());
-            }
-        }
-        else if (viewBox != null)
-        {
-            yy = (float)viewBox.y;
-            hh = (float)viewBox.height;
-            height = new NumberWithUnits(hh, NumberWithUnits.UT_PX);
-            y = new NumberWithUnits(yy, NumberWithUnits.UT_PX);
-        }
-        else
-        {
-            //Estimate size from scene bounding box
-            yy = (float)defaultBounds.getY();
-            hh = (float)defaultBounds.getHeight();
-            height = new NumberWithUnits(hh, NumberWithUnits.UT_PX);
-            y = new NumberWithUnits(yy, NumberWithUnits.UT_PX);
-        }
-
-        clipRect.setRect(xx, yy, ww, hh);
-
-        if (viewBox == null)
-        {
-            viewXform.setToIdentity();
-        }
-        else
-        {
-            viewXform.setToTranslation(clipRect.x, clipRect.y);
-            viewXform.scale(clipRect.width, clipRect.height);
-            viewXform.scale(1 / viewBox.width, 1 / viewBox.height);
-            viewXform.translate(-viewBox.x, -viewBox.y);
-        }
-
-        
-        //For now, treat all preserveAspectRatio as 'none'
-//        viewXform.setToTranslation(viewBox.x, viewBox.y);
-//        viewXform.scale(clipRect.width / viewBox.width, clipRect.height / viewBox.height);
-//        viewXform.translate(-clipRect.x, -clipRect.y);
-    }
-
-    public void render(Graphics2D g) throws SVGException
-    {
-        prepareViewport();
-        
-        AffineTransform cachedXform = g.getTransform();
-        g.transform(viewXform);
-        
-        super.render(g);
-        
-        g.setTransform(cachedXform);
-    }
-
-    public Shape getShape()
-    {
-        Shape shape = super.getShape();
-        return viewXform.createTransformedShape(shape);
-    }
-
-    public Rectangle2D getBoundingBox() throws SVGException
-    {
-        Rectangle2D bbox = super.getBoundingBox();
-        return viewXform.createTransformedShape(bbox).getBounds2D();
-    }
-    
-    public float getDeviceWidth()
-    {
-        return clipRect.width;
-    }
-    
-    public float getDeviceHeight()
-    {
-        return clipRect.height;
-    }
-    
-    public Rectangle2D getDeviceRect(Rectangle2D rect)
-    {
-        rect.setRect(clipRect);
-        return rect;
-    }
-
-    /**
-     * Updates all attributes in this diagram associated with a time event.
-     * Ie, all attributes with track information.
-     * @return - true if this node has changed state as a result of the time
-     * update
-     */
-    public boolean updateTime(double curTime) throws SVGException
-    {
-        boolean changeState = super.updateTime(curTime);
-        
-        StyleAttribute sty = new StyleAttribute();
-        boolean shapeChange = false;
-        
-        if (getPres(sty.setName("x")))
-        {
-            NumberWithUnits newVal = sty.getNumberWithUnits();
-            if (!newVal.equals(x))
-            {
-                x = newVal;
-                shapeChange = true;
-            }
-        }
-
-        if (getPres(sty.setName("y")))
-        {
-            NumberWithUnits newVal = sty.getNumberWithUnits();
-            if (!newVal.equals(y))
-            {
-                y = newVal;
-                shapeChange = true;
-            }
-        }
-
-        if (getPres(sty.setName("width")))
-        {
-            NumberWithUnits newVal = sty.getNumberWithUnits();
-            if (!newVal.equals(width))
-            {
-                width = newVal;
-                shapeChange = true;
-            }
-        }
-
-        if (getPres(sty.setName("height")))
-        {
-            NumberWithUnits newVal = sty.getNumberWithUnits();
-            if (!newVal.equals(height))
-            {
-                height = newVal;
-                shapeChange = true;
-            }
-        }
-        
-        if (getPres(sty.setName("viewBox"))) 
-        {
-            float[] coords = sty.getFloatList();
-            Rectangle2D.Float newViewBox = new Rectangle2D.Float(coords[0], coords[1], coords[2], coords[3]);
-            if (!newViewBox.equals(viewBox))
-            {
-                viewBox = newViewBox;
-                shapeChange = true;
-            }
-        }
-
-        if (shapeChange)
-        {
-            build();
-        }
-
-        return changeState || shapeChange;
-    }
-
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/ShapeElement.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/ShapeElement.java	(revision 26683)
+++ 	(revision )
@@ -1,294 +1,0 @@
-/*
- * ShapeElement.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 5:21 PM
- */
-
-package com.kitfox.svg;
-
-import com.kitfox.svg.xml.StyleAttribute;
-import java.awt.AlphaComposite;
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Composite;
-import java.awt.Graphics2D;
-import java.awt.Paint;
-import java.awt.Shape;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.Point2D;
-import java.awt.geom.Rectangle2D;
-import java.net.URI;
-import java.util.List;
-
-
-
-/**
- * Parent of shape objects
- *
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-abstract public class ShapeElement extends RenderableElement 
-{
-
-    /**
-     * This is necessary to get text elements to render the stroke the correct
-     * width.  It is an alternative to producing new font glyph sets at different
-     * sizes.
-     */
-    protected float strokeWidthScalar = 1f;
-
-    /** Creates a new instance of ShapeElement */
-    public ShapeElement() {
-    }
-
-    abstract public void render(java.awt.Graphics2D g) throws SVGException;
-
-    /*
-    protected void setStrokeWidthScalar(float strokeWidthScalar)
-    {
-        this.strokeWidthScalar = strokeWidthScalar;
-    }
-     */
-
-    void pick(Point2D point, boolean boundingBox, List retVec) throws SVGException
-    {
-        StyleAttribute styleAttrib = new StyleAttribute();
-//        if (getStyle(styleAttrib.setName("fill")) && getShape().contains(point))
-        if ((boundingBox ? getBoundingBox() : getShape()).contains(point))
-        {
-            retVec.add(getPath(null));
-        }
-    }
-
-    void pick(Rectangle2D pickArea, AffineTransform ltw, boolean boundingBox, List retVec) throws SVGException
-    {
-        StyleAttribute styleAttrib = new StyleAttribute();
-//        if (getStyle(styleAttrib.setName("fill")) && getShape().contains(point))
-        if (ltw.createTransformedShape((boundingBox ? getBoundingBox() : getShape())).intersects(pickArea))
-        {
-            retVec.add(getPath(null));
-        }
-    }
-
-    protected void renderShape(Graphics2D g, Shape shape) throws SVGException
-    {
-//g.setColor(Color.green);
-
-        StyleAttribute styleAttrib = new StyleAttribute();
-        
-        //Don't process if not visible
-        if (getStyle(styleAttrib.setName("visibility")))
-        {
-            if (!styleAttrib.getStringValue().equals("visible")) return;
-        }
-
-        if (getStyle(styleAttrib.setName("display")))
-        {
-            if (styleAttrib.getStringValue().equals("none")) return;
-        }
-
-        //None, solid color, gradient, pattern
-        Paint fillPaint = Color.black;  //Default to black.  Must be explicitly set to none for no fill.
-        if (getStyle(styleAttrib.setName("fill")))
-        {
-            if (styleAttrib.getStringValue().equals("none")) fillPaint = null;
-            else
-            {
-                fillPaint = styleAttrib.getColorValue();
-            }
-        }
-
-        //Default opacity
-        float opacity = 1f;
-        if (getStyle(styleAttrib.setName("opacity")))
-        {
-            opacity = styleAttrib.getRatioValue();
-        }
-        
-        float fillOpacity = opacity;
-        if (getStyle(styleAttrib.setName("fill-opacity")))
-        {
-            fillOpacity *= styleAttrib.getRatioValue();
-        }
-
-
-        Paint strokePaint = null;  //Default is to stroke with none
-        if (getStyle(styleAttrib.setName("stroke")))
-        {
-            if (styleAttrib.getStringValue().equals("none")) strokePaint = null;
-            else
-            {
-                strokePaint = styleAttrib.getColorValue();
-            }
-        }
-
-        float[] strokeDashArray = null;
-        if (getStyle(styleAttrib.setName("stroke-dasharray")))
-        {
-            strokeDashArray = styleAttrib.getFloatList();
-            if (strokeDashArray.length == 0) strokeDashArray = null;
-        }
-
-        float strokeDashOffset = 0f;
-        if (getStyle(styleAttrib.setName("stroke-dashoffset")))
-        {
-            strokeDashOffset = styleAttrib.getFloatValueWithUnits();
-        }
-
-        int strokeLinecap = BasicStroke.CAP_BUTT;
-        if (getStyle(styleAttrib.setName("stroke-linecap")))
-        {
-            String val = styleAttrib.getStringValue();
-            if (val.equals("round"))
-            {
-                strokeLinecap = BasicStroke.CAP_ROUND;
-            }
-            else if (val.equals("square"))
-            {
-                strokeLinecap = BasicStroke.CAP_SQUARE;
-            }
-        }
-
-        int strokeLinejoin = BasicStroke.JOIN_MITER;
-        if (getStyle(styleAttrib.setName("stroke-linejoin")))
-        {
-            String val = styleAttrib.getStringValue();
-            if (val.equals("round"))
-            {
-                strokeLinejoin = BasicStroke.JOIN_ROUND;
-            }
-            else if (val.equals("bevel"))
-            {
-                strokeLinejoin = BasicStroke.JOIN_BEVEL;
-            }
-        }
-
-        float strokeMiterLimit = 4f;
-        if (getStyle(styleAttrib.setName("stroke-miterlimit")))
-        {
-            strokeMiterLimit = Math.max(styleAttrib.getFloatValueWithUnits(), 1);
-        }
-
-        float strokeOpacity = opacity;
-        if (getStyle(styleAttrib.setName("stroke-opacity")))
-        {
-            strokeOpacity *= styleAttrib.getRatioValue();
-        }
-
-        float strokeWidth = 1f;
-        if (getStyle(styleAttrib.setName("stroke-width")))
-        {
-            strokeWidth = styleAttrib.getFloatValueWithUnits();
-        }
-//        if (strokeWidthScalar != 1f)
-//        {
-            strokeWidth *= strokeWidthScalar;
-//        }
-
-
-
-        //Draw the shape
-        if (fillPaint != null && fillOpacity != 0f)
-        {
-            if (fillOpacity <= 0)
-            {
-                //Do nothing
-            }
-            else if (fillOpacity < 1f)
-            {
-                Composite cachedComposite = g.getComposite();
-                g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, fillOpacity));
-
-                g.setPaint(fillPaint);
-                g.fill(shape);
-            
-                g.setComposite(cachedComposite);
-            }
-            else
-            {
-                g.setPaint(fillPaint);
-                g.fill(shape);
-            }
-        }
-
-
-        if (strokePaint != null && strokeOpacity != 0f)
-        {
-            BasicStroke stroke;
-            if (strokeDashArray == null)
-            {
-                stroke = new BasicStroke(strokeWidth, strokeLinecap, strokeLinejoin, strokeMiterLimit);
-            }
-            else
-            {
-                stroke = new BasicStroke(strokeWidth, strokeLinecap, strokeLinejoin, strokeMiterLimit, strokeDashArray, strokeDashOffset);
-            }
-
-            Shape strokeShape = stroke.createStrokedShape(shape);
-
-            if (strokeOpacity <= 0)
-            {
-                //Do nothing
-            }
-            else if (strokeOpacity < 1f)
-            {
-                Composite cachedComposite = g.getComposite();
-                g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, strokeOpacity));
-
-                g.setPaint(strokePaint);
-                g.fill(strokeShape);
-
-                g.setComposite(cachedComposite);
-            }
-            else
-            {
-                g.setPaint(strokePaint);
-                g.fill(strokeShape);
-            }
-
-        }
-
-    }
-    
-    abstract public Shape getShape();
-
-    protected Rectangle2D includeStrokeInBounds(Rectangle2D rect) throws SVGException
-    {
-        StyleAttribute styleAttrib = new StyleAttribute();
-        if (!getStyle(styleAttrib.setName("stroke"))) return rect;
-
-        double strokeWidth = 1;
-        if (getStyle(styleAttrib.setName("stroke-width"))) strokeWidth = styleAttrib.getDoubleValue();
-
-        rect.setRect(
-            rect.getX() - strokeWidth / 2,
-            rect.getY() - strokeWidth / 2,
-            rect.getWidth() + strokeWidth,
-            rect.getHeight() + strokeWidth);
-
-        return rect;
-    }
-
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/Stop.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/Stop.java	(revision 26683)
+++ 	(revision )
@@ -1,129 +1,0 @@
-/*
- * Stop.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 1:56 AM
- */
-
-package com.kitfox.svg;
-
-import com.kitfox.svg.xml.StyleAttribute;
-import java.awt.*;
-import java.util.*;
-
-import com.kitfox.svg.xml.*;
-import org.xml.sax.*;
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class Stop extends SVGElement {
-
-    float offset = 0f;
-    float opacity = 1f;
-    Color color = Color.black;
-
-    /** Creates a new instance of Stop */
-    public Stop() {
-    }
-/*
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent)
-    {
-		//Load style string
-        super.loaderStartElement(helper, attrs, parent);
-
-        String offset = attrs.getValue("offset");
-        this.offset = (float)XMLParseUtil.parseRatio(offset);
-
-        buildStop();
-    }
-    */
-    
-    protected void build() throws SVGException
-    {
-        super.build();
-        
-        StyleAttribute sty = new StyleAttribute();
-        
-        if (getPres(sty.setName("offset")))
-        {
-            offset = sty.getFloatValue();
-            String units = sty.getUnits();
-            if (units != null && units.equals("%")) offset /= 100f;
-            if (offset > 1) offset = 1;
-            if (offset < 0) offset = 0;
-        }
-        
-        if (getStyle(sty.setName("stop-color"))) color = sty.getColorValue();
-
-        if (getStyle(sty.setName("stop-opacity"))) opacity = sty.getRatioValue();
-    }
-
-    /**
-     * Updates all attributes in this diagram associated with a time event.
-     * Ie, all attributes with track information.
-     * @return - true if this node has changed state as a result of the time
-     * update
-     */
-    public boolean updateTime(double curTime) throws SVGException
-    {
-//        if (trackManager.getNumTracks() == 0) return false;
-
-        //Get current values for parameters
-        StyleAttribute sty = new StyleAttribute();
-        boolean shapeChange = false;
-        
-        if (getPres(sty.setName("offset")))
-        {
-            float newVal = sty.getFloatValue();
-            if (newVal != offset)
-            {
-                offset = newVal;
-                shapeChange = true;
-            }
-        }
-        
-        if (getPres(sty.setName("stop-color")))
-        {
-            Color newVal = sty.getColorValue();
-            if (newVal != color)
-            {
-                color = newVal;
-                shapeChange = true;
-            }
-        }
-        
-        if (getPres(sty.setName("stop-opacity")))
-        {
-            float newVal = sty.getFloatValue();
-            if (newVal != opacity)
-            {
-                opacity = newVal;
-                shapeChange = true;
-            }
-        }
-        
-        return shapeChange;
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/Style.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/Style.java	(revision 26683)
+++ 	(revision )
@@ -1,83 +1,0 @@
-/*
- * Stop.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on September 19, 2004, 1:56 AM
- */
-
-package com.kitfox.svg;
-
-import com.kitfox.svg.xml.StyleAttribute;
-import com.kitfox.svg.xml.*;
-import org.xml.sax.*;
-
-
-/**
- * Holds title textual information within tree
- *
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class Style extends SVGElement {
-
-    //Should be set to "text/css"
-    String type;
-    StringBuffer text = new StringBuffer();
-
-    /** Creates a new instance of Stop */
-    public Style() {
-    }
-/*
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent)
-    {
-		//Load style string
-        super.loaderStartElement(helper, attrs, parent);
-
-        this.type = attrs.getValue("type");
-    }
-*/
-    /**
-     * Called during load process to add text scanned within a tag
-     */
-    public void loaderAddText(SVGLoaderHelper helper, String text)
-    {
-        this.text.append(text);
-    }
-
-    
-    protected void build() throws SVGException
-    {
-        super.build();
-        
-        StyleAttribute sty = new StyleAttribute();
-        
-        if (getPres(sty.setName("type"))) type = sty.getStringValue();
-    }
-    
-    public boolean updateTime(double curTime) throws SVGException
-    {
-        //Style sheet doesn't change
-        return false;
-    }    
-    
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/Symbol.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/Symbol.java	(revision 26683)
+++ 	(revision )
@@ -1,158 +1,0 @@
-/*
- * Stop.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 1:56 AM
- */
-
-package com.kitfox.svg;
-
-import com.kitfox.svg.xml.StyleAttribute;
-import java.awt.*;
-import java.awt.geom.*;
-import java.util.*;
-
-import com.kitfox.svg.xml.*;
-import org.xml.sax.*;
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class Symbol extends Group
-{
-    AffineTransform viewXform;
-    Rectangle2D viewBox;
-
-    /** Creates a new instance of Stop */
-    public Symbol() {
-    }
-/*
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent)
-    {
-		//Load style string
-        super.loaderStartElement(helper, attrs, parent);
-
-        String viewBoxStrn = attrs.getValue("viewBox");
-        if (viewBoxStrn != null)
-        {
-            float[] dim = XMLParseUtil.parseFloatList(viewBoxStrn);
-            viewBox = new Rectangle2D.Float(dim[0], dim[1], dim[2], dim[3]);
-        }
-    }
-*/
-    /*
-    public void loaderEndElement(SVGLoaderHelper helper)
-    {
-        if (viewBox == null)
-        {
-            viewBox = super.getBoundingBox();
-        }
-
-        //Transform pattern onto unit square
-        viewXform = new AffineTransform();
-        viewXform.scale(1.0 / viewBox.getWidth(), 1.0 / viewBox.getHeight());
-        viewXform.translate(-viewBox.getX(), -viewBox.getY());
-    }
-*/
-    
-    protected void build() throws SVGException
-    {
-        super.build();
-        
-        StyleAttribute sty = new StyleAttribute();
-        
-//        sty = getPres("unicode");
-//        if (sty != null) unicode = sty.getStringValue();
-
-
-        if (getPres(sty.setName("viewBox")))
-        {
-            float[] dim = sty.getFloatList();
-            viewBox = new Rectangle2D.Float(dim[0], dim[1], dim[2], dim[3]);
-        }
-        
-        if (viewBox == null)
-        {
-//            viewBox = super.getBoundingBox();
-            viewBox = new Rectangle(0, 0, 1, 1);
-        }
-
-        //Transform pattern onto unit square
-        viewXform = new AffineTransform();
-        viewXform.scale(1.0 / viewBox.getWidth(), 1.0 / viewBox.getHeight());
-        viewXform.translate(-viewBox.getX(), -viewBox.getY());
-    }
-
-    protected boolean outsideClip(Graphics2D g) throws SVGException
-    {
-        g.getClipBounds(clipBounds);
-        Rectangle2D rect = super.getBoundingBox();
-        if (rect.intersects(clipBounds))
-        {
-            return false;
-        }
-
-        return true;
-
-    }
-
-    public void render(Graphics2D g) throws SVGException
-    {
-        AffineTransform oldXform = g.getTransform();
-        g.transform(viewXform);
-
-        super.render(g);
-
-        g.setTransform(oldXform);
-    }
-
-    public Shape getShape()
-    {
-        Shape shape = super.getShape();
-        return viewXform.createTransformedShape(shape);
-    }
-
-    public Rectangle2D getBoundingBox() throws SVGException
-    {
-        Rectangle2D rect = super.getBoundingBox();
-        return viewXform.createTransformedShape(rect).getBounds2D();
-    }
-
-    /**
-     * Updates all attributes in this diagram associated with a time event.
-     * Ie, all attributes with track information.
-     * @return - true if this node has changed state as a result of the time
-     * update
-     */
-    public boolean updateTime(double curTime) throws SVGException
-    {
-//        if (trackManager.getNumTracks() == 0) return false;
-        boolean changeState = super.updateTime(curTime);
-        
-        //View box properties do not change
-        
-        return changeState;
-    }
-
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/Title.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/Title.java	(revision 26683)
+++ 	(revision )
@@ -1,65 +1,0 @@
-/*
- * Stop.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on September 19, 2004, 1:56 AM
- */
-
-package com.kitfox.svg;
-
-/**
- * Holds title textual information within tree
- *
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class Title extends SVGElement {
-
-    StringBuffer text = new StringBuffer();
-
-    /** Creates a new instance of Stop */
-    public Title() {
-    }
-
-    /**
-     * Called during load process to add text scanned within a tag
-     */
-    public void loaderAddText(SVGLoaderHelper helper, String text)
-    {
-        this.text.append(text);
-    }
-
-    public String getText() { return text.toString(); }
-    
-    /**
-     * Updates all attributes in this diagram associated with a time event.
-     * Ie, all attributes with track information.
-     * @return - true if this node has changed state as a result of the time
-     * update
-     */
-    public boolean updateTime(double curTime) throws SVGException
-    {
-        //Title does not change
-        return false;
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/TransformableElement.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/TransformableElement.java	(revision 26683)
+++ 	(revision )
@@ -1,116 +1,0 @@
-/*
- * BoundedElement.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 9:00 AM
- */
-
-package com.kitfox.svg;
-
-import com.kitfox.svg.xml.StyleAttribute;
-import java.awt.Shape;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.Rectangle2D;
-
-
-/**
- * Maintains bounding box for this element
- *
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class TransformableElement extends SVGElement 
-{
-
-    AffineTransform xform = null;
-//    AffineTransform invXform = null;
-
-    /** Creates a new instance of BoundedElement */
-    public TransformableElement() {
-    }
-
-    public TransformableElement(String id, SVGElement parent)
-    {
-        super(id, parent);
-    }
-/*
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent)
-    {
-		//Load style string
-        super.loaderStartElement(helper, attrs, parent);
-
-        String transform = attrs.getValue("transform");
-        if (transform != null)
-        {
-            xform = parseTransform(transform);
-        }
-    }
-*/
-    
-    protected void build() throws SVGException
-    {
-        super.build();
-        
-        StyleAttribute sty = new StyleAttribute();
-        
-        if (getPres(sty.setName("transform")))
-        {
-            xform = parseTransform(sty.getStringValue());
-        }
-    }
-    
-    protected Shape shapeToParent(Shape shape)
-    {
-        if (xform == null) return shape;
-        return xform.createTransformedShape(shape);
-    }
-
-    protected Rectangle2D boundsToParent(Rectangle2D rect)
-    {
-        if (xform == null) return rect;
-        return xform.createTransformedShape(rect).getBounds2D();
-    }
-
-    /**
-     * Updates all attributes in this diagram associated with a time event.
-     * Ie, all attributes with track information.
-     * @return - true if this node has changed state as a result of the time
-     * update
-     */
-    public boolean updateTime(double curTime) throws SVGException
-    {
-        StyleAttribute sty = new StyleAttribute();
-        
-        if (getPres(sty.setName("transform")))
-        {
-            AffineTransform newXform = parseTransform(sty.getStringValue());
-            if (!newXform.equals(xform))
-            {
-                xform = newXform;
-                return true;
-            }
-        }
-        
-        return false;
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/Use.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/Use.java	(revision 26683)
+++ 	(revision )
@@ -1,255 +1,0 @@
-/*
- * LinearGradient.java
- *
- *
- *  The Salamander Project - 2D and 3D graphics libraries in Java
- *  Copyright (C) 2004 Mark McKay
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *  Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
- *  projects can be found at http://www.kitfox.com
- *
- * Created on January 26, 2004, 1:54 AM
- */
-
-package com.kitfox.svg;
-
-import com.kitfox.svg.xml.StyleAttribute;
-import java.awt.Graphics2D;
-import java.awt.Shape;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.Rectangle2D;
-import java.net.URI;
-
-/**
- * @author Mark McKay
- * @author <a href="mailto:mark@kitfox.com">Mark McKay</a>
- */
-public class Use extends ShapeElement {
-
-    float x = 0f;
-    float y = 0f;
-    float width = 1f;
-    float height = 1f;
-
-    SVGElement href = null;
-
-    AffineTransform refXform;
-
-    /** Creates a new instance of LinearGradient */
-    public Use() {
-    }
-/*
-    public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent)
-    {
-		//Load style string
-        super.loaderStartElement(helper, attrs, parent);
-
-        String x = attrs.getValue("x");
-        String y = attrs.getValue("y");
-        String width = attrs.getValue("width");
-        String height = attrs.getValue("height");
-        String href = attrs.getValue("xlink:href");
-
-        if (x != null) this.x = (float)XMLParseUtil.parseRatio(x);
-        if (y != null) this.y = (float)XMLParseUtil.parseRatio(y);
-        if (width != null) this.width = (float)XMLParseUtil.parseRatio(width);
-        if (height != null) this.height = (float)XMLParseUtil.parseRatio(height);
-
-
-        if (href != null)
-        {
-            try {
-                URI src = getXMLBase().resolve(href);
-                this.href = helper.universe.getElement(src);
-            }
-            catch (Exception e)
-            {
-                e.printStackTrace();
-            }
-        }
-
-        //Determine use offset/scale
-        refXform = new AffineTransform();
-        refXform.translate(this.x, this.y);
-        refXform.scale(this.width, this.height);
-    }
-*/
-    protected void build() throws SVGException
-    {
-        super.build();
-        
-        StyleAttribute sty = new StyleAttribute();
-        
-        if (getPres(sty.setName("x"))) x = sty.getFloatValueWithUnits();
-
-        if (getPres(sty.setName("y"))) y = sty.getFloatValueWithUnits();
-
-        if (getPres(sty.setName("width"))) width = sty.getFloatValueWithUnits();
-
-        if (getPres(sty.setName("height"))) height = sty.getFloatValueWithUnits();
-
-        if (getPres(sty.setName("xlink:href")))
-        {
-            URI src = sty.getURIValue(getXMLBase());
-            href = diagram.getElement(src.getFragment());
-        }
-        
-        //Determine use offset/scale
-        refXform = new AffineTransform();
-        refXform.translate(this.x, this.y);
-    }
-    
-    public void render(Graphics2D g) throws SVGException
-    {
-        beginLayer(g);
-
-        //AffineTransform oldXform = g.getTransform();
-        AffineTransform oldXform = g.getTransform();
-        g.transform(refXform);
-
-        if (href == null || !(href instanceof RenderableElement)) return;
-
-        RenderableElement rendEle = (RenderableElement)href;
-        rendEle.pushParentContext(this);
-        rendEle.render(g);
-        rendEle.popParentContext();
-
-        g.setTransform(oldXform);
-
-        finishLayer(g);
-    }
-
-    public Shape getShape()
-    {
-        if (href instanceof ShapeElement)
-        {
-            Shape shape = ((ShapeElement)href).getShape();
-            shape = refXform.createTransformedShape(shape);
-            shape = shapeToParent(shape);
-            return shape;
-        }
-
-        return null;
-    }
-
-    public Rectangle2D getBoundingBox() throws SVGException
-    {
-        if (href instanceof ShapeElement)
-        {
-            ShapeElement shapeEle = (ShapeElement)href;
-            shapeEle.pushParentContext(this);
-            Rectangle2D bounds = shapeEle.getBoundingBox();
-            shapeEle.popParentContext();
-            
-            bounds = refXform.createTransformedShape(bounds).getBounds2D();
-            bounds = boundsToParent(bounds);
-
-            return bounds;
-        }
-
-        return null;
-    }
-
-    /**
-     * Updates all attributes in this diagram associated with a time event.
-     * Ie, all attributes with track information.
-     * @return - true if this node has changed state as a result of the time
-     * update
-     */
-    public boolean updateTime(double curTime) throws SVGException
-    {
-//        if (trackManager.getNumTracks() == 0) return false;
-        boolean changeState = super.updateTime(curTime);
-
-        //Get current values for parameters
-        StyleAttribute sty = new StyleAttribute();
-        boolean shapeChange = false;
-        
-        if (getPres(sty.setName("x")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != x)
-            {
-                x = newVal;
-                shapeChange = true;
-            }
-        }
-
-        if (getPres(sty.setName("y")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != y)
-            {
-                y = newVal;
-                shapeChange = true;
-            }
-        }
-
-        if (getPres(sty.setName("width")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != width)
-            {
-                width = newVal;
-                shapeChange = true;
-            }
-        }
-
-        if (getPres(sty.setName("height")))
-        {
-            float newVal = sty.getFloatValueWithUnits();
-            if (newVal != height)
-            {
-                height = newVal;
-                shapeChange = true;
-            }
-        }
-        
-        /*if (getPres(sty.setName("xlink:href")))
-        {
-            URI src = sty.getURIValue(getXMLBase());
-            SVGElement newVal = diagram.getUniverse().getElement(src);
-            if (newVal != href)
-            {
-                href = newVal;
-                shapeChange = true;
-            }
-        }*/
-/*
-        if (getPres(sty.setName("xlink:href")))
-        {
-            URI src = sty.getURIValue(getXMLBase());
-            href = diagram.getUniverse().getElement(src);
-        }
-        
-        //Determine use offset/scale
-        refXform = new AffineTransform();
-        refXform.translate(this.x, this.y);
-        refXform.scale(this.width, this.height);
-*/        
-        if (shapeChange)
-        {
-            build();
-            //Determine use offset/scale
-//            refXform.setToTranslation(this.x, this.y);
-//            refXform.scale(this.width, this.height);
-//            return true;
-        }
-        
-        return changeState || shapeChange;
-    }
-}
Index: plications/editors/josm/plugins/importvec/src/com/kitfox/svg/package-info.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/com/kitfox/svg/package-info.java	(revision 26683)
+++ 	(revision )
@@ -1,13 +1,0 @@
-/**
- * Provides the nodes of an SVG scene graph.  This graph can be queried, updated
- * and picked against at runtime.  See the online docs for instructions on
- * how to use SVGSalamander
- *
- * @author <a href="mailto:kitfox@kitfox.com">Mark McKay</a> (C) 2005
- * 
- * Package was simplified by Upliner by removing anything that is not needed
- * for importing SVGs in JOSM
- * <a href="xvmv@mail.ru">Upliner</a> (C) 2010
- */
-
-package com.kitfox.svg;
Index: /applications/editors/josm/plugins/importvec/src/org/openstreetmap/josm/plugins/importvec/ImportVectorAction.java
===================================================================
--- /applications/editors/josm/plugins/importvec/src/org/openstreetmap/josm/plugins/importvec/ImportVectorAction.java	(revision 26683)
+++ /applications/editors/josm/plugins/importvec/src/org/openstreetmap/josm/plugins/importvec/ImportVectorAction.java	(revision 26684)
@@ -3,14 +3,13 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.awt.Shape;
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
+import java.awt.geom.AffineTransform;
 import java.awt.geom.PathIterator;
 import java.awt.geom.Point2D;
 import java.awt.geom.Rectangle2D;
-import java.io.ByteArrayInputStream;
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
-import java.net.URI;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -35,14 +34,9 @@
 import org.openstreetmap.josm.io.OsmTransferException;
 import org.openstreetmap.josm.tools.Shortcut;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLReaderFactory;
 
 import com.kitfox.svg.Group;
 import com.kitfox.svg.SVGDiagram;
 import com.kitfox.svg.SVGElement;
-import com.kitfox.svg.SVGLoader;
+import com.kitfox.svg.SVGUniverse;
 import com.kitfox.svg.ShapeElement;
 
@@ -197,12 +191,23 @@
                     cube(1-t)*ay+3*sqr(1-t)*t*by+3*(1-t)*t*t*cy+t*t*t*dy);
         }
-
-        private void processElement(SVGElement el) throws IOException {
+        private void processElement(SVGElement el, AffineTransform transform) throws IOException {
             if (el instanceof Group) {
-                for (SVGElement child : ((Group)el).getChildren(null)) {
-                    processElement(child);
-                }
+                AffineTransform oldTransform = transform;
+                AffineTransform xform = ((Group)el).getXForm();
+                if (transform == null)
+                {
+                    transform = xform;
+                } else if (xform != null) {
+                    transform = new AffineTransform(transform);
+                    transform.concatenate(xform);
+                }
+                for (Object child : ((Group)el).getChildren(null)) {
+                    processElement((SVGElement)child, transform);
+                }
+                transform = oldTransform;
             } else if (el instanceof ShapeElement) {
-                PathIterator it = ((ShapeElement)el).getShape().getPathIterator(null);
+                Shape shape = ((ShapeElement)el).getShape();
+                if (transform != null) shape = transform.createTransformedShape(shape);
+                PathIterator it = shape.getPathIterator(null);
                 while (!it.isDone()) {
                     double[] coords = new double[6];
@@ -244,29 +249,13 @@
         }
         @Override
-        protected void realRun() throws SAXException, IOException, OsmTransferException {
-            LatLon center = Main.proj.eastNorth2latlon(Main.map.mapView.getCenter());
+        protected void realRun() throws IOException, OsmTransferException {
+            LatLon center = Main.getProjection().eastNorth2latlon(Main.map.mapView.getCenter());
             scale = Settings.getScaleNumerator() / Settings.getScaleDivisor() / Math.cos(Math.toRadians(center.lat()));
             this.center = projection.latlon2eastNorth(center);
             try {
+                SVGUniverse universe = new SVGUniverse();
                 for (File f : files) {
                     if (canceled) return;
-                    SVGLoader loader = new SVGLoader(new URI("about:blank"),true);
-                    XMLReader rdr = XMLReaderFactory.createXMLReader();
-                    rdr.setContentHandler(loader);
-                    rdr.setEntityResolver(new EntityResolver() {
-                                @Override
-                                public InputSource resolveEntity(String publicId, String systemId) {
-                                    //Ignore all DTDs
-                                    return new InputSource(new ByteArrayInputStream(new byte[0]));
-                                }
-                            });
-                    FileInputStream in = new FileInputStream(f);
-                    try {
-                        rdr.parse(new InputSource(in));
-                    } finally {
-                        in.close();
-                    }
-
-                    SVGDiagram diagram = loader.getLoadedDiagram();
+                    SVGDiagram diagram = universe.getDiagram(f.toURI());
                     ShapeElement root = diagram.getRoot();
                     if (root == null) throw new IOException("Can't find root SVG element");
@@ -274,8 +263,6 @@
                     this.center = this.center.add(-bbox.getCenterX()*scale, bbox.getCenterY()*scale);
 
-                    processElement(root);
-                }
-            } catch(SAXException e) {
-                throw e;
+                    processElement(root, null);
+                }
             } catch(IOException e) {
                 throw e;
