diff options
author | kitfox | 2014-04-25 12:02:36 +0200 |
---|---|---|
committer | kitfox | 2014-04-25 12:02:36 +0200 |
commit | 5b97319a2f24a89865e8493bbc519c570362597f (patch) | |
tree | 3eebe22a0531e7316f7eb83dbaa755da93ed26f6 /src | |
parent | Picking now takes viewport transform into account. (diff) | |
download | svg-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
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/kitfox/svg/app/beans/SVGIcon.java | 5 | ||||
-rw-r--r-- | src/main/java/com/kitfox/svg/xml/ColorTable.java | 5 |
2 files changed, 6 insertions, 4 deletions
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);
|