summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkitfox2014-04-25 12:02:36 +0200
committerkitfox2014-04-25 12:02:36 +0200
commit5b97319a2f24a89865e8493bbc519c570362597f (patch)
tree3eebe22a0531e7316f7eb83dbaa755da93ed26f6
parentPicking now takes viewport transform into account. (diff)
downloadsvg-salamander-core-5b97319a2f24a89865e8493bbc519c570362597f.tar.gz
svg-salamander-core-5b97319a2f24a89865e8493bbc519c570362597f.tar.xz
svg-salamander-core-5b97319a2f24a89865e8493bbc519c570362597f.zip
Can now parse colors set to the empty string.
git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@173 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b
-rwxr-xr-xnbproject/build-impl.xml26
-rwxr-xr-xnbproject/genfiles.properties4
-rw-r--r--src/main/java/com/kitfox/svg/app/beans/SVGIcon.java5
-rw-r--r--src/main/java/com/kitfox/svg/xml/ColorTable.java5
4 files changed, 24 insertions, 16 deletions
diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml
index 0b8e1ca..61e0dc1 100755
--- a/nbproject/build-impl.xml
+++ b/nbproject/build-impl.xml
@@ -105,9 +105,12 @@ is divided into following sections:
</and>
</condition>
<condition property="do.archive">
- <not>
- <istrue value="${jar.archive.disabled}"/>
- </not>
+ <or>
+ <not>
+ <istrue value="${jar.archive.disabled}"/>
+ </not>
+ <istrue value="${not.archive.disabled}"/>
+ </or>
</condition>
<condition property="do.mkdist">
<and>
@@ -1247,23 +1250,26 @@ is divided into following sections:
</not>
</and>
</condition>
- <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
+ <condition else="" property="bug5101868workaround" value="*.java">
+ <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
+ </condition>
+ <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
<classpath>
<path path="${javac.classpath}"/>
</classpath>
- <fileset dir="${src.www.dir}" excludes="*.java,${excludes}" includes="${includes}">
+ <fileset dir="${src.www.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
<filename name="**/*.java"/>
</fileset>
- <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
+ <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
<filename name="**/*.java"/>
</fileset>
- <fileset dir="${src.java.dir}" excludes="*.java,${excludes}" includes="${includes}">
+ <fileset dir="${src.java.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
<filename name="**/*.java"/>
</fileset>
- <fileset dir="${src.res.dir}" excludes="*.java,${excludes}" includes="${includes}">
+ <fileset dir="${src.res.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
<filename name="**/*.java"/>
</fileset>
- <fileset dir="${res.dir}" excludes="*.java,${excludes}" includes="${includes}">
+ <fileset dir="${res.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
<filename name="**/*.java"/>
</fileset>
<fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
@@ -1351,7 +1357,7 @@ is divided into following sections:
<mkdir dir="${build.test.results.dir}"/>
</target>
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
- <j2seproject3:test testincludes="**/*Test.java"/>
+ <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
</target>
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties
index d96dd94..2f80f91 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=99b9f3f7
-nbproject/build-impl.xml.stylesheet.CRC32=5a01deb7@1.68.1.46
+nbproject/build-impl.xml.script.CRC32=c34f2ef4
+nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.74.1.48
diff --git a/src/main/java/com/kitfox/svg/app/beans/SVGIcon.java b/src/main/java/com/kitfox/svg/app/beans/SVGIcon.java
index 30380e5..266e3a4 100644
--- a/src/main/java/com/kitfox/svg/app/beans/SVGIcon.java
+++ b/src/main/java/com/kitfox/svg/app/beans/SVGIcon.java
@@ -53,7 +53,7 @@ public class SVGIcon implements Icon
public static final String PROP_AUTOSIZE = "PROP_AUTOSIZE";
- private PropertyChangeSupport changes = new PropertyChangeSupport(this);
+ private final PropertyChangeSupport changes = new PropertyChangeSupport(this);
SVGUniverse svgUniverse = SVGCache.getSVGUniverse();
public static final int INTERP_NEAREST_NEIGHBOR = 0;
@@ -64,7 +64,6 @@ public class SVGIcon implements Icon
private int interpolation = INTERP_NEAREST_NEIGHBOR;
private boolean clipToViewbox;
-// private String svgPath;
URI svgURI;
// private boolean scaleToFit;
@@ -77,7 +76,6 @@ public class SVGIcon implements Icon
public static final int AUTOSIZE_STRETCH = 4;
private int autosize = AUTOSIZE_NONE;
-// Dimension preferredSize = new Dimension(100, 100);
Dimension preferredSize;
/** Creates a new instance of SVGIcon */
@@ -184,7 +182,6 @@ public class SVGIcon implements Icon
}
-
if (autosize == AUTOSIZE_NONE)
{
try
diff --git a/src/main/java/com/kitfox/svg/xml/ColorTable.java b/src/main/java/com/kitfox/svg/xml/ColorTable.java
index 84a0409..32788a4 100644
--- a/src/main/java/com/kitfox/svg/xml/ColorTable.java
+++ b/src/main/java/com/kitfox/svg/xml/ColorTable.java
@@ -224,6 +224,11 @@ public class ColorTable
{
Color retVal = null;
+ if ("".equals(val))
+ {
+ return null;
+ }
+
if (val.charAt(0) == '#')
{
String hexStrn = val.substring(1);