You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ke...@locus.apache.org on 2000/07/12 03:48:34 UTC
cvs commit: xml-fop/src/org/apache/fop/datatypes StyleData.java
keiron 00/07/11 18:48:34
Modified: src/org/apache/fop/datatypes StyleData.java
Log:
extra style options for the lines
none, miterlimit, linecap, line join
Revision Changes Path
1.2 +17 -10 xml-fop/src/org/apache/fop/datatypes/StyleData.java
Index: StyleData.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/datatypes/StyleData.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StyleData.java 2000/07/11 05:22:21 1.1
+++ StyleData.java 2000/07/12 01:48:33 1.2
@@ -1,4 +1,4 @@
-/*-- $Id: StyleData.java,v 1.1 2000/07/11 05:22:21 keiron Exp $ --
+/*-- $Id: StyleData.java,v 1.2 2000/07/12 01:48:33 keiron Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -89,7 +89,9 @@
if(value.startsWith("url(")) {
table.put(type, new String(value));
} else if(!value.equals("none")) {
- table.put(type, new ColorType(value));
+ table.put(type, new ColorType(value));
+ } else if(value.equals("none")) {
+ table.put(type, value);
}
} else if(type.equals("color")) {
// if(!value.equals("none"))
@@ -100,15 +102,19 @@
} else if(type.equals("stroke-linejoin")) {
table.put(type, value);
} else if(type.equals("stroke-miterlimit")) {
+ table.put(type, new SVGLengthImpl(value));
} else if(type.equals("stroke-dasharray")) {
// array of space or comma separated numbers
- Vector list = new Vector();
- StringTokenizer array = new StringTokenizer(value, " ,");
- while(array.hasMoreTokens()) {
- String intstr = array.nextToken();
- list.addElement(new Integer(Integer.parseInt(intstr)));
+ if(!value.equals("none")) {
+ Vector list = new Vector();
+ StringTokenizer array = new StringTokenizer(value, " ,");
+ while(array.hasMoreTokens()) {
+ String intstr = array.nextToken();
+ list.addElement(new Integer(Integer.parseInt(intstr)));
+ }
+ table.put(type, list);
}
- table.put(type, list);
+ // else leave ??
} else if(type.equals("stroke-dashoffset")) {
table.put(type, new SVGLengthImpl(value));
} else if(type.equals("stroke-opacity")) {
@@ -117,11 +123,12 @@
table.put(type, new String(value));
} else if(!value.equals("none")) {
table.put(type, new ColorType(value));
+ } else {
+ table.put(type, value);
}
-// else
-// table.put(type, null);
} else if(type.equals("fill-rule")) {
// nonzero
+ table.put(type, value);
} else if(type.equals("font")) {
table.put(type, value);
} else if(type.equals("font-size")) {