summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkitfox2013-10-06 06:22:42 +0200
committerkitfox2013-10-06 06:22:42 +0200
commitd494100757586f1fc654dd838e984cdd3027d6ba (patch)
tree68d148406b57af6bbd8b003cc76b165465ad57ed
parentChecking for null before TransformableElement.getXForm() (diff)
downloadsvg-salamander-core-d494100757586f1fc654dd838e984cdd3027d6ba.tar.gz
svg-salamander-core-d494100757586f1fc654dd838e984cdd3027d6ba.tar.xz
svg-salamander-core-d494100757586f1fc654dd838e984cdd3027d6ba.zip
Fixing radial gradients where center and focal point are coincident.
git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@161 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b
-rwxr-xr-xnbproject/build-impl.xml17
-rwxr-xr-xnbproject/genfiles.properties4
-rw-r--r--src/main/java/com/kitfox/svg/RadialGradient.java6
3 files changed, 17 insertions, 10 deletions
diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml
index 2765c04..6ec1a11 100755
--- a/nbproject/build-impl.xml
+++ b/nbproject/build-impl.xml
@@ -405,6 +405,11 @@ is divided into following sections:
</and>
</condition>
</target>
+ <target name="-init-test-properties">
+ <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
+ <property name="test.binarytestincludes" value=""/>
+ <property name="test.binaryexcludes" value=""/>
+ </target>
<target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
@@ -428,7 +433,7 @@ is divided into following sections:
</sequential>
</macrodef>
</target>
- <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
+ <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
@@ -445,6 +450,9 @@ is divided into following sections:
<fileset dir="${test.res.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
<filename name="@{testincludes}"/>
</fileset>
+ <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
+ <filename name="${test.binarytestincludes}"/>
+ </fileset>
</batchtest>
<syspropertyset>
<propertyref prefix="test-sys-prop."/>
@@ -575,7 +583,7 @@ is divided into following sections:
</sequential>
</macrodef>
</target>
- <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
+ <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
@@ -592,6 +600,9 @@ is divided into following sections:
<fileset dir="${test.res.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
<filename name="@{testincludes}"/>
</fileset>
+ <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
+ <filename name="${test.binarytestincludes}"/>
+ </fileset>
</batchtest>
<syspropertyset>
<propertyref prefix="test-sys-prop."/>
@@ -968,7 +979,7 @@ is divided into following sections:
<target if="has.persistence.xml" name="-copy-persistence-xml">
<mkdir dir="${build.classes.dir}/META-INF"/>
<copy todir="${build.classes.dir}/META-INF">
- <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
+ <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
</copy>
</target>
<target name="-post-compile">
diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties
index 48f9095..5b86bc4 100755
--- a/nbproject/genfiles.properties
+++ b/nbproject/genfiles.properties
@@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=be360661
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=478066e1
-nbproject/build-impl.xml.script.CRC32=b2cc318c
-nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
+nbproject/build-impl.xml.script.CRC32=1f28feac
+nbproject/build-impl.xml.stylesheet.CRC32=c6d2a60f@1.56.1.46
diff --git a/src/main/java/com/kitfox/svg/RadialGradient.java b/src/main/java/com/kitfox/svg/RadialGradient.java
index b93612c..000534d 100644
--- a/src/main/java/com/kitfox/svg/RadialGradient.java
+++ b/src/main/java/com/kitfox/svg/RadialGradient.java
@@ -120,11 +120,7 @@ public class RadialGradient extends Gradient
Paint paint;
Point2D.Float pt1 = new Point2D.Float(cx, cy);
Point2D.Float pt2 = new Point2D.Float(fx, fy);
- if (pt1.equals(pt2))
- {
- Color[] colors = getStopColors();
- paint = colors.length > 0 ? colors[0] : Color.black;
- } else if (gradientUnits == GU_USER_SPACE_ON_USE)
+ if (gradientUnits == GU_USER_SPACE_ON_USE)
{
paint = new com.kitfox.svg.batik.RadialGradientPaint(
pt1,