Index: trunk/src/com/kitfox/svg/RadialGradient.java
===================================================================
--- trunk/src/com/kitfox/svg/RadialGradient.java	(revision 8084)
+++ trunk/src/com/kitfox/svg/RadialGradient.java	(revision 10787)
@@ -4,14 +4,14 @@
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or 
+ * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
  * conditions are met:
  *
- *   - Redistributions of source code must retain the above 
+ *   - Redistributions of source code must retain the above
  *     copyright notice, this list of conditions and the following
  *     disclaimer.
  *   - Redistributions in binary form must reproduce the above
  *     copyright notice, this list of conditions and the following
- *     disclaimer in the documentation and/or other materials 
+ *     disclaimer in the documentation and/or other materials
  *     provided with the distribution.
  *
@@ -27,6 +27,6 @@
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE. 
- * 
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
  * Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
  * projects can be found at http://www.kitfox.com
@@ -36,10 +36,13 @@
 package com.kitfox.svg;
 
-import com.kitfox.svg.xml.StyleAttribute;
-import java.awt.Color;
+import java.awt.MultipleGradientPaint;
 import java.awt.Paint;
+import java.awt.RadialGradientPaint;
 import java.awt.geom.AffineTransform;
 import java.awt.geom.Point2D;
 import java.awt.geom.Rectangle2D;
+import java.util.Arrays;
+
+import com.kitfox.svg.xml.StyleAttribute;
 
 /**
@@ -53,6 +56,7 @@
     float cx = 0.5f;
     float cy = 0.5f;
-    float fx = 0.5f;
-    float fy = 0.5f;
+    boolean hasFocus = false;
+    float fx = 0f;
+    float fy = 0f;
     float r = 0.5f;
 
@@ -64,4 +68,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -69,4 +74,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -85,7 +91,9 @@
         }
 
+        hasFocus = false;
         if (getPres(sty.setName("fx")))
         {
             fx = sty.getFloatValueWithUnits();
+            hasFocus = true;
         }
 
@@ -93,4 +101,5 @@
         {
             fy = sty.getFloatValueWithUnits();
+            hasFocus = true;
         }
 
@@ -101,18 +110,19 @@
     }
 
+    @Override
     public Paint getPaint(Rectangle2D bounds, AffineTransform xform)
     {
-        com.kitfox.svg.batik.MultipleGradientPaint.CycleMethodEnum method;
+        MultipleGradientPaint.CycleMethod method;
         switch (spreadMethod)
         {
             default:
             case SM_PAD:
-                method = com.kitfox.svg.batik.MultipleGradientPaint.NO_CYCLE;
+                method = MultipleGradientPaint.CycleMethod.NO_CYCLE;
                 break;
             case SM_REPEAT:
-                method = com.kitfox.svg.batik.MultipleGradientPaint.REPEAT;
+                method = MultipleGradientPaint.CycleMethod.REPEAT;
                 break;
             case SM_REFLECT:
-                method = com.kitfox.svg.batik.MultipleGradientPaint.REFLECT;
+                method = MultipleGradientPaint.CycleMethod.REFLECT;
                 break;
         }
@@ -120,8 +130,8 @@
         Paint paint;
         Point2D.Float pt1 = new Point2D.Float(cx, cy);
-        Point2D.Float pt2 = new Point2D.Float(fx, fy);
+        Point2D.Float pt2 = hasFocus ? new Point2D.Float(fx, fy) : pt1;
         if (gradientUnits == GU_USER_SPACE_ON_USE)
         {
-            paint = new com.kitfox.svg.batik.RadialGradientPaint(
+            paint = new RadialGradientPaint(
                 pt1,
                 r,
@@ -130,5 +140,5 @@
                 getStopColors(),
                 method,
-                com.kitfox.svg.batik.MultipleGradientPaint.SRGB,
+                MultipleGradientPaint.ColorSpaceType.SRGB,
                 gradientTransform);
         } else
@@ -140,5 +150,5 @@
             viewXform.concatenate(gradientTransform);
 
-            paint = new com.kitfox.svg.batik.RadialGradientPaint(
+            paint = new RadialGradientPaint(
                 pt1,
                 r,
@@ -147,5 +157,5 @@
                 getStopColors(),
                 method,
-                com.kitfox.svg.batik.MultipleGradientPaint.SRGB,
+                MultipleGradientPaint.ColorSpaceType.SRGB,
                 viewXform);
         }
@@ -161,4 +171,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
