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/09/11 05:12:03 UTC
cvs commit: xml-fop/src/org/apache/fop/svg Defs.java G.java SVG.java Style.java
keiron 00/09/10 20:12:03
Modified: src/org/apache/fop/svg Defs.java G.java SVG.java Style.java
Log:
handles style, class name
Revision Changes Path
1.3 +6 -6 xml-fop/src/org/apache/fop/svg/Defs.java
Index: Defs.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Defs.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Defs.java 2000/08/28 23:54:10 1.2
+++ Defs.java 2000/09/11 03:12:02 1.3
@@ -1,4 +1,4 @@
-/*-- $Id: Defs.java,v 1.2 2000/08/28 23:54:10 keiron Exp $ --
+/*-- $Id: Defs.java,v 1.3 2000/09/11 03:12:02 keiron Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -120,13 +120,13 @@
SVGElement gi = ((GraphicsCreator)child).createGraphic();
if(gi instanceof SVGElement) {
defs.appendChild((SVGElement)gi);
- String id = ((SVGElement)gi).getId();
- if(!id.equals("")) {
+// String id = ((SVGElement)gi).getId();
+// if(!id.equals("")) {
// defs.put(id, gi);
- } else {
+// } else {
// no id
- System.err.println("WARNING No ID for defs element : " + gi);
- }
+// System.err.println("WARNING No ID for defs element : " + gi);
+// }
}
}
}
1.3 +6 -2 xml-fop/src/org/apache/fop/svg/G.java
Index: G.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/G.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- G.java 2000/08/28 23:54:12 1.2
+++ G.java 2000/09/11 03:12:02 1.3
@@ -1,4 +1,4 @@
-/*-- $Id: G.java,v 1.2 2000/08/28 23:54:12 keiron Exp $ --
+/*-- $Id: G.java,v 1.3 2000/09/11 03:12:02 keiron Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -114,13 +114,17 @@
ggraphic.setTransform(((SVGTransform)this.properties.get("transform")).getTransform());
ggraphic.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
ggraphic.setId(this.properties.get("id").getString());
+ ggraphic.setClassName(new SVGAnimatedStringImpl(this.properties.get("class").getString()));
int numChildren = this.children.size();
for (int i = 0; i < numChildren; i++) {
FONode child = (FONode) children.elementAt(i);
if(child instanceof GraphicsCreator) {
SVGElement impl = ((GraphicsCreator)child).createGraphic();
- if(impl != null)
+ if(impl != null) {
+ if(impl instanceof SVGElementImpl)
+ ((SVGElementImpl)impl).setClassName(new SVGAnimatedStringImpl(((FObj)child).getProperty("class").getString()));
ggraphic.appendChild(impl);
+ }
} else if(child instanceof Defs) {
// System.out.println(child);
// ggraphic.addDefs(((Defs)child).createDefs());
1.12 +6 -2 xml-fop/src/org/apache/fop/svg/SVG.java
Index: SVG.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/SVG.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- SVG.java 2000/08/28 23:54:19 1.11
+++ SVG.java 2000/09/11 03:12:02 1.12
@@ -1,4 +1,4 @@
-/*-- $Id: SVG.java,v 1.11 2000/08/28 23:54:19 keiron Exp $ --
+/*-- $Id: SVG.java,v 1.12 2000/09/11 03:12:02 keiron Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -132,7 +132,11 @@
FONode fo = (FONode) children.elementAt(i);
if(fo instanceof GraphicsCreator) {
SVGElement impl = ((GraphicsCreator)fo).createGraphic();
- svgArea.appendChild((org.w3c.dom.Node)impl);
+ if(impl != null) {
+ if(impl instanceof SVGElementImpl)
+ ((SVGElementImpl)impl).setClassName(new SVGAnimatedStringImpl(((FObj)fo).getProperty("class").getString()));
+ svgArea.appendChild((org.w3c.dom.Node)impl);
+ }
// } else if(fo instanceof Defs) {
// svgArea.addDefs(((Defs)fo).createDefs());
}
1.3 +20 -1 xml-fop/src/org/apache/fop/svg/Style.java
Index: Style.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Style.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Style.java 2000/08/28 23:54:22 1.2
+++ Style.java 2000/09/11 03:12:02 1.3
@@ -1,4 +1,4 @@
-/*-- $Id: Style.java,v 1.2 2000/08/28 23:54:22 keiron Exp $ --
+/*-- $Id: Style.java,v 1.3 2000/09/11 03:12:02 keiron Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -59,6 +59,9 @@
import org.apache.fop.dom.svg.*;
import org.apache.fop.dom.svg.SVGArea;
+
+import org.w3c.dom.svg.*;
+
/**
* class representing svg:Style pseudo flow object.
*
@@ -102,5 +105,21 @@
protected Style(FObj parent, PropertyList propertyList) {
super(parent, propertyList);
this.name = "svg:style";
+ }
+
+ String styleText = "";
+ protected void addCharacters(char data[], int start, int length)
+ {
+ styleText += new String(data, start, length - start);
+ }
+
+ public SVGElement createGraphic()
+ {
+ SVGStyleElement sse = new SVGStyleElementImpl(styleText);
+// sse.setType(this.properties.get("type").getString());
+// sse.setMedia(this.properties.get("media").getString());
+// sse.setTitle(this.properties.get("title").getString());
+// sse.setStyle(styleText);
+ return sse;
}
}