aboutsummaryrefslogtreecommitdiffstats
path: root/src/org
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2000-07-11 00:46:57 +0000
committerKeiron Liddle <keiron@apache.org>2000-07-11 00:46:57 +0000
commit360b32f48e47eb65ffab1778d7459eadfaa02e8a (patch)
tree39b58515c31494aa61d7c9c3d34d8012913fe700 /src/org
parent30a99f36218787ec39f347962a52f9e528321df2 (diff)
downloadxmlgraphics-fop-360b32f48e47eb65ffab1778d7459eadfaa02e8a.tar.gz
xmlgraphics-fop-360b32f48e47eb65ffab1778d7459eadfaa02e8a.zip
svg dom implementation to hold svg data for rendering
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193466 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org')
-rw-r--r--src/org/apache/fop/dom/svg/GraphicElement.java168
-rw-r--r--src/org/apache/fop/dom/svg/GraphicImpl.java74
-rw-r--r--src/org/apache/fop/dom/svg/SVGAElementImpl.java62
-rw-r--r--src/org/apache/fop/dom/svg/SVGAltGlyphElementImpl.java62
-rw-r--r--src/org/apache/fop/dom/svg/SVGAngleImpl.java188
-rw-r--r--src/org/apache/fop/dom/svg/SVGAnimateColorElementImpl.java63
-rw-r--r--src/org/apache/fop/dom/svg/SVGAnimateElementImpl.java63
-rw-r--r--src/org/apache/fop/dom/svg/SVGAnimateMotionElementImpl.java62
-rw-r--r--src/org/apache/fop/dom/svg/SVGAnimateTransformElementImpl.java62
-rw-r--r--src/org/apache/fop/dom/svg/SVGArea.java231
-rw-r--r--src/org/apache/fop/dom/svg/SVGCircleElementImpl.java108
-rw-r--r--src/org/apache/fop/dom/svg/SVGClipPathElementImpl.java83
-rw-r--r--src/org/apache/fop/dom/svg/SVGCursorElementImpl.java86
-rw-r--r--src/org/apache/fop/dom/svg/SVGDefsElementImpl.java64
-rw-r--r--src/org/apache/fop/dom/svg/SVGDescElementImpl.java64
-rw-r--r--src/org/apache/fop/dom/svg/SVGDocumentImpl.java157
-rw-r--r--src/org/apache/fop/dom/svg/SVGElementImpl.java444
-rw-r--r--src/org/apache/fop/dom/svg/SVGEllipseElementImpl.java112
-rw-r--r--src/org/apache/fop/dom/svg/SVGExceptionImpl.java68
-rw-r--r--src/org/apache/fop/dom/svg/SVGFilterElementImpl.java125
-rw-r--r--src/org/apache/fop/dom/svg/SVGFontElementImpl.java64
-rw-r--r--src/org/apache/fop/dom/svg/SVGGElementImpl.java89
-rw-r--r--src/org/apache/fop/dom/svg/SVGGlyphElementImpl.java62
-rw-r--r--src/org/apache/fop/dom/svg/SVGGradientElementImpl.java90
-rw-r--r--src/org/apache/fop/dom/svg/SVGHKernElementImpl.java62
-rw-r--r--src/org/apache/fop/dom/svg/SVGImageElementImpl.java72
-rw-r--r--src/org/apache/fop/dom/svg/SVGLengthImpl.java203
-rw-r--r--src/org/apache/fop/dom/svg/SVGLengthListImpl.java169
-rw-r--r--src/org/apache/fop/dom/svg/SVGLineElementImpl.java126
-rw-r--r--src/org/apache/fop/dom/svg/SVGLinearGradientElementImpl.java121
-rw-r--r--src/org/apache/fop/dom/svg/SVGListImpl.java118
-rw-r--r--src/org/apache/fop/dom/svg/SVGMarkerElementImpl.java144
-rw-r--r--src/org/apache/fop/dom/svg/SVGMaskElementImpl.java70
-rw-r--r--src/org/apache/fop/dom/svg/SVGMatrixImpl.java305
-rw-r--r--src/org/apache/fop/dom/svg/SVGMissingGlyphElementImpl.java61
-rw-r--r--src/org/apache/fop/dom/svg/SVGNumberImpl.java83
-rw-r--r--src/org/apache/fop/dom/svg/SVGPathElementImpl.java113
-rw-r--r--src/org/apache/fop/dom/svg/SVGPathSegImpl.java185
-rw-r--r--src/org/apache/fop/dom/svg/SVGPatternElementImpl.java135
-rw-r--r--src/org/apache/fop/dom/svg/SVGPolygonElementImpl.java74
-rw-r--r--src/org/apache/fop/dom/svg/SVGPolylineElementImpl.java74
-rw-r--r--src/org/apache/fop/dom/svg/SVGRadialGradientElementImpl.java119
-rw-r--r--src/org/apache/fop/dom/svg/SVGRectElementImpl.java158
-rw-r--r--src/org/apache/fop/dom/svg/SVGRectImpl.java111
-rw-r--r--src/org/apache/fop/dom/svg/SVGSetElementImpl.java64
-rw-r--r--src/org/apache/fop/dom/svg/SVGStopElementImpl.java75
-rw-r--r--src/org/apache/fop/dom/svg/SVGStyleElementImpl.java75
-rw-r--r--src/org/apache/fop/dom/svg/SVGSwitchElementImpl.java68
-rw-r--r--src/org/apache/fop/dom/svg/SVGSymbolElementImpl.java82
-rw-r--r--src/org/apache/fop/dom/svg/SVGTRefElementImpl.java65
-rw-r--r--src/org/apache/fop/dom/svg/SVGTSpanElementImpl.java78
-rw-r--r--src/org/apache/fop/dom/svg/SVGTextElementImpl.java78
-rw-r--r--src/org/apache/fop/dom/svg/SVGTextPathElementImpl.java66
-rw-r--r--src/org/apache/fop/dom/svg/SVGTitleElementImpl.java63
-rw-r--r--src/org/apache/fop/dom/svg/SVGTransformImpl.java122
-rw-r--r--src/org/apache/fop/dom/svg/SVGTransformListImpl.java86
-rw-r--r--src/org/apache/fop/dom/svg/SVGURIReferenceImpl.java123
-rw-r--r--src/org/apache/fop/dom/svg/SVGUseElementImpl.java157
-rw-r--r--src/org/apache/fop/dom/svg/SVGVKernElementImpl.java65
59 files changed, 6421 insertions, 0 deletions
diff --git a/src/org/apache/fop/dom/svg/GraphicElement.java b/src/org/apache/fop/dom/svg/GraphicElement.java
new file mode 100644
index 000000000..c8f466a96
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/GraphicElement.java
@@ -0,0 +1,168 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+import java.util.Enumeration;
+
+import org.apache.fop.datatypes.*;
+
+import org.w3c.dom.svg.*;
+import org.w3c.dom.*;
+import org.w3c.dom.events.*;
+
+/**
+ * base class for SVG graphic objects.
+ *
+ * Graphic objects include rectangles, lines and text
+ *
+ */
+public abstract class GraphicElement extends SVGElementImpl implements SVGTransformable, SVGLangSpace, SVGTests, EventTarget {
+ public SVGElement getNearestViewportElement( )
+ {
+ return null;
+ }
+
+ public SVGElement getFarthestViewportElement( )
+ {
+ return null;
+ }
+
+ public SVGTransformList getTransform()
+ {
+ if(trans != null) {
+ SVGTransformList stl = new SVGTransformListImpl();
+ for(Enumeration e = trans.elements(); e.hasMoreElements(); ) {
+ stl.append((SVGTransform)e.nextElement());
+ }
+ return stl;
+ }
+ return null;
+ }
+
+ public void setTransform(SVGTransformList transform)
+ {
+ }
+
+ public SVGRect getBBox()
+ {
+ return null;
+ }
+
+ public SVGMatrix getCTM()
+ {
+ return null;
+ }
+
+ public SVGMatrix getScreenCTM()
+ {
+ return null;
+ }
+
+ public SVGMatrix getTransformToElement(SVGElement element)
+ throws SVGException
+ {
+ return null;
+ }
+
+ public String getXMLlang()
+ {
+ return null;
+ }
+
+ public void setXMLlang(String xmllang)
+ {
+ }
+
+ public String getXMLspace()
+ {
+ return null;
+ }
+
+ public void setXMLspace(String xmlspace)
+ {
+ }
+
+ public String getSystemRequired()
+ {
+ return null;
+ }
+
+ public void setSystemRequired(String systemRequired)
+ {
+ }
+
+ public String getSystemLanguage()
+ {
+ return null;
+ }
+
+ public void setSystemLanguage(String systemLanguage)
+ {
+ }
+
+ public void addEventListener(String type,
+ EventListener listener,
+ boolean useCapture)
+ {
+ }
+
+ public void removeEventListener(String type,
+ EventListener listener,
+ boolean useCapture)
+ {
+ }
+
+ public boolean dispatchEvent(Event evt)
+// throws EventException
+ {
+ return false;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/GraphicImpl.java b/src/org/apache/fop/dom/svg/GraphicImpl.java
new file mode 100644
index 000000000..772e8ec92
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/GraphicImpl.java
@@ -0,0 +1,74 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+import org.apache.fop.datatypes.*;
+
+import java.util.*;
+
+/**
+ * base class for SVG graphic objects.
+ *
+ * Graphic objects include rectangles, lines and text
+ *
+ */
+// use this so that the SVGArea can also hold style, defs and transform etc.
+public interface GraphicImpl {
+ public Hashtable getStyle();
+ public void setParent(GraphicImpl g);
+ public GraphicImpl getGraphicParent();
+ public Vector oldgetTransform(); // ??
+ public Hashtable getDefs();
+ public GraphicImpl locateDef(String str);
+ public void setStyle(Hashtable st);
+ public void addDefs(Hashtable st);
+ public void setTransform(Vector tr); // ??
+}
diff --git a/src/org/apache/fop/dom/svg/SVGAElementImpl.java b/src/org/apache/fop/dom/svg/SVGAElementImpl.java
new file mode 100644
index 000000000..2ae15246e
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGAElementImpl.java
@@ -0,0 +1,62 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+/**
+ * class representing a line in an SVG Area
+ *
+ */
+public class SVGAElementImpl extends SVGElementImpl {
+ public SVGAElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGAltGlyphElementImpl.java b/src/org/apache/fop/dom/svg/SVGAltGlyphElementImpl.java
new file mode 100644
index 000000000..f1bec3848
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGAltGlyphElementImpl.java
@@ -0,0 +1,62 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+/**
+ * class representing a line in an SVG Area
+ *
+ */
+public class SVGAltGlyphElementImpl extends SVGElementImpl {
+ public SVGAltGlyphElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGAngleImpl.java b/src/org/apache/fop/dom/svg/SVGAngleImpl.java
new file mode 100644
index 000000000..c3201eaae
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGAngleImpl.java
@@ -0,0 +1,188 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Fop" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.datatypes;
+
+import org.apache.fop.fo.Property;
+
+import java.util.*;
+import java.text.*;
+
+import org.w3c.dom.svg.*;
+
+/**
+ * SVG Angle.
+ *
+ */
+public class SVGAngleImpl implements SVGAngle {
+ float value = 0;
+ short unitType = SVG_ANGLETYPE_UNKNOWN;
+
+ SVGAngleImpl()
+ {
+ }
+
+ public short getUnitType( )
+ {
+ return unitType;
+ }
+
+ public float getValue( )
+ {
+ return value;
+ }
+
+ public void setValue( float value )
+ {
+ this.value = value;
+ }
+
+ public float getValueInSpecifiedUnits( )
+ {
+ switch(unitType) {
+ case SVG_ANGLETYPE_UNKNOWN:
+ throw new SVGExceptionImpl(SVGException.SVG_WRONG_TYPE_ERR, "unknown unit type");
+// break;
+ case SVG_ANGLETYPE_UNSPECIFIED:
+ throw new SVGExceptionImpl(SVGException.SVG_WRONG_TYPE_ERR, "unknown unit type");
+// break;
+ case SVG_ANGLETYPE_DEG:
+ break;
+ case SVG_ANGLETYPE_RAD:
+ break;
+ case SVG_ANGLETYPE_GRAD:
+ break;
+ }
+ return 0;
+ }
+
+ public void setValueInSpecifiedUnits( float valueInSpecifiedUnits )
+ {
+ switch(unitType) {
+ case SVG_ANGLETYPE_UNKNOWN:
+ throw new SVGExceptionImpl(SVGException.SVG_WRONG_TYPE_ERR, "unknown unit type");
+// break;
+ case SVG_ANGLETYPE_UNSPECIFIED:
+ throw new SVGExceptionImpl(SVGException.SVG_WRONG_TYPE_ERR, "unknown unit type");
+// break;
+ case SVG_ANGLETYPE_DEG:
+ break;
+ case SVG_ANGLETYPE_RAD:
+ break;
+ case SVG_ANGLETYPE_GRAD:
+ break;
+ }
+ }
+
+ public String getValueAsString( )
+ {
+ NumberFormat nf = NumberFormat.getInstance();
+ return nf.format(value);
+ }
+
+ public void setValueAsString( String valueAsString )
+ {
+ NumberFormat nf = NumberFormat.getInstance();
+ try {
+ value = nf.parse(valueAsString).floatValue();
+ value = (float)(value * Math.PI / 90f);
+ } catch(ParseException pe) {
+ value = 0;
+ }
+ }
+
+ public float getAnimatedValue( )
+ {
+ return 0;
+ }
+
+ public void newValueSpecifiedUnits ( short unitType, float valueInSpecifiedUnits )
+ throws SVGException
+ {
+ switch(unitType) {
+ case SVG_ANGLETYPE_UNKNOWN:
+ throw new SVGExceptionImpl(SVGException.SVG_WRONG_TYPE_ERR, "unknown unit type");
+// break;
+ case SVG_ANGLETYPE_UNSPECIFIED:
+ throw new SVGExceptionImpl(SVGException.SVG_WRONG_TYPE_ERR, "unknown unit type");
+// break;
+ case SVG_ANGLETYPE_DEG:
+ value = (float)(valueInSpecifiedUnits * Math.PI / 90.0);
+ break;
+ case SVG_ANGLETYPE_RAD:
+ value = valueInSpecifiedUnits;
+ break;
+ case SVG_ANGLETYPE_GRAD:
+ value = (float)(valueInSpecifiedUnits * Math.PI / 90.0);
+ break;
+ }
+ this.unitType = unitType;
+ }
+
+ public void convertToSpecifiedUnits ( short unitType )
+ throws SVGException
+ {
+ switch(unitType) {
+ case SVG_ANGLETYPE_UNKNOWN:
+ throw new SVGExceptionImpl(SVGException.SVG_WRONG_TYPE_ERR, "unknown unit type");
+// break;
+ case SVG_ANGLETYPE_UNSPECIFIED:
+ throw new SVGExceptionImpl(SVGException.SVG_WRONG_TYPE_ERR, "unknown unit type");
+// break;
+ case SVG_ANGLETYPE_DEG:
+ break;
+ case SVG_ANGLETYPE_RAD:
+ break;
+ case SVG_ANGLETYPE_GRAD:
+ break;
+ }
+ this.unitType = unitType;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGAnimateColorElementImpl.java b/src/org/apache/fop/dom/svg/SVGAnimateColorElementImpl.java
new file mode 100644
index 000000000..e39f1bf5b
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGAnimateColorElementImpl.java
@@ -0,0 +1,63 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+/**
+ *
+ *
+ */
+public class SVGAnimateColorElementImpl extends SVGElementImpl {
+
+ public SVGAnimateColorElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGAnimateElementImpl.java b/src/org/apache/fop/dom/svg/SVGAnimateElementImpl.java
new file mode 100644
index 000000000..6c45033d2
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGAnimateElementImpl.java
@@ -0,0 +1,63 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+/**
+ *
+ *
+ */
+public class SVGAnimateElementImpl extends SVGElementImpl {
+
+ public SVGAnimateElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGAnimateMotionElementImpl.java b/src/org/apache/fop/dom/svg/SVGAnimateMotionElementImpl.java
new file mode 100644
index 000000000..a6c98546e
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGAnimateMotionElementImpl.java
@@ -0,0 +1,62 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+/**
+ *
+ */
+public class SVGAnimateMotionElementImpl extends SVGElementImpl {
+
+ public SVGAnimateMotionElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGAnimateTransformElementImpl.java b/src/org/apache/fop/dom/svg/SVGAnimateTransformElementImpl.java
new file mode 100644
index 000000000..99512eedf
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGAnimateTransformElementImpl.java
@@ -0,0 +1,62 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+/**
+ *
+ */
+public class SVGAnimateTransformElementImpl extends SVGElementImpl {
+
+ public SVGAnimateTransformElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGArea.java b/src/org/apache/fop/dom/svg/SVGArea.java
new file mode 100644
index 000000000..f14509c4c
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGArea.java
@@ -0,0 +1,231 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Fop" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+// FOP
+import org.apache.fop.render.Renderer;
+import org.apache.fop.layout.FontState;
+import org.apache.fop.layout.Area;
+import org.apache.fop.dom.svg.*;
+
+import java.util.*;
+
+import org.w3c.dom.svg.*;
+import org.w3c.dom.*;
+
+
+/**
+ * class representing an SVG area in which the SVG graphics sit
+ */
+public class SVGArea extends Area implements GraphicImpl, GetSVGDocument {//, SVGSVGElement {
+
+ public SVGDocument getSVGDocument() throws DOMException
+ {
+ return null;
+ }
+
+ /**
+ * construct an SVG area
+ *
+ * @param fontState the font state
+ * @param width the width of the area
+ * @param height the height of the area
+ */
+ public SVGArea(FontState fontState, float width, float height) {
+ super(fontState, (int)width * 1000, (int)height * 1000);
+ currentHeight = (int)height * 1000;
+ contentRectangleWidth = (int)width * 1000;
+ }
+
+ /**
+ * add a graphic.
+ *
+ * Graphics include SVG Rectangles, Lines and Text
+ *
+ * @param graphic the Graphic to add
+ */
+ public void addGraphic(GraphicImpl graphic) {
+ graphic.setParent(this);
+ this.children.addElement(graphic);
+ }
+
+ /**
+ * render the SVG.
+ *
+ * @param renderer the Renderer to use
+ */
+ public void render(Renderer renderer) {
+ renderer.renderSVGArea(this);
+ }
+
+
+ Hashtable defs = new Hashtable();
+ public void addDefs(Hashtable table)
+ {
+ for(Enumeration e = table.keys(); e.hasMoreElements(); ) {
+ String str = (String)e.nextElement();
+ defs.put(str, table.get(str));
+ }
+ }
+
+ public Hashtable getDefs()
+ {
+ Hashtable ret = null;
+ if(parent != null) {
+ ret = parent.getDefs();
+ if(ret != null)
+ ret = (Hashtable)ret.clone();
+ }
+ if(ret == null) {
+ ret = defs;
+ } else {
+ if(defs != null) {
+ for(Enumeration e = defs.keys(); e.hasMoreElements(); ) {
+ String str = (String)e.nextElement();
+ ret.put(str, defs.get(str));
+ }
+ }
+ }
+ return ret;
+ }
+
+ public GraphicImpl locateDef(String str)
+ {
+ Object obj = null;
+ if(defs != null) {
+ obj = defs.get(str);
+ }
+ if(obj == null) {
+ Enumeration e = getChildren().elements();
+ while (e.hasMoreElements()) {
+ Object o = e.nextElement();
+ if(o instanceof SVGElement) {
+ String s;
+ s = ((SVGElement)o).getId();
+ if(str.equals(s)) {
+ obj = o;
+ break;
+ }
+ }
+ }
+ }
+ if(obj == null && parent != null) {
+ obj = parent.locateDef(str);
+ }
+ return (GraphicImpl)obj;
+ }
+
+ public Hashtable getStyle()
+ {
+ Hashtable ret = null;
+ if(parent != null) {
+ ret = parent.getStyle();
+ if(ret != null)
+ ret = (Hashtable)ret.clone();
+ }
+ if(ret == null) {
+ ret = style;
+ } else {
+ if(style != null) {
+ for(Enumeration e = style.keys(); e.hasMoreElements(); ) {
+ String str = (String)e.nextElement();
+ ret.put(str, style.get(str));
+ }
+ }
+ }
+ return ret;
+ }
+
+ public Vector oldgetTransform()
+ {
+ return trans;
+/* Vector ret = null;
+ if(parent != null) {
+ ret = parent.oldgetTransform();
+ if(ret != null)
+ ret = (Vector)ret.clone();
+ }
+ if(ret == null) {
+ ret = trans;
+ } else {
+ if(trans != null) {
+ for(Enumeration e = trans.elements(); e.hasMoreElements(); ) {
+ Object o = e.nextElement();
+ ret.addElement(o);
+ }
+ }
+ }
+ return ret;*/
+ }
+
+ Hashtable style = null;
+ public void setStyle(Hashtable st)
+ {
+ style = st;
+ }
+
+ Vector trans = null;
+ public void setTransform(Vector tr)
+ {
+ trans = tr;
+ }
+
+ GraphicImpl parent = null;
+ public void setParent(GraphicImpl g)
+ {
+ parent = g;
+ }
+
+ public GraphicImpl getGraphicParent()
+ {
+ return parent;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGCircleElementImpl.java b/src/org/apache/fop/dom/svg/SVGCircleElementImpl.java
new file mode 100644
index 000000000..d8dc0df78
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGCircleElementImpl.java
@@ -0,0 +1,108 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGCircleElementImpl extends GraphicElement implements SVGCircleElement {
+ private SVGLength cx;
+ private SVGLength cy;
+ private SVGLength r;
+
+ /**
+ */
+ public SVGCircleElementImpl()
+ {
+ }
+
+ public String getClassName( )
+ {
+ return null;
+ }
+
+ public void setClassName( String className )
+ {
+ }
+
+ public SVGLength getCx( )
+ {
+ return cx;
+ }
+
+ public void setCx( SVGLength cx )
+ {
+ this.cx = cx;
+ }
+
+ public SVGLength getCy( )
+ {
+ return cy;
+ }
+
+ public void setCy( SVGLength cy )
+ {
+ this.cy = cy;
+ }
+
+ public SVGLength getR( )
+ {
+ return r;
+ }
+
+ public void setR( SVGLength r )
+ {
+ this.r = r;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGClipPathElementImpl.java b/src/org/apache/fop/dom/svg/SVGClipPathElementImpl.java
new file mode 100644
index 000000000..37cf9f7fb
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGClipPathElementImpl.java
@@ -0,0 +1,83 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import java.util.Vector;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGClipPathElementImpl extends GraphicElement implements SVGClipPathElement {
+ public Vector elements;
+ short units;
+
+ public void addElement(GraphicImpl g)
+ {
+ elements.addElement(g);
+ }
+
+ public SVGClipPathElementImpl()
+ {
+ }
+
+ public short getClipPathUnits( )
+ {
+ return units;
+ }
+
+ public void setClipPathUnits(short clipPathUnits)
+ {
+ units = clipPathUnits;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGCursorElementImpl.java b/src/org/apache/fop/dom/svg/SVGCursorElementImpl.java
new file mode 100644
index 000000000..770145c74
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGCursorElementImpl.java
@@ -0,0 +1,86 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGCursorElementImpl extends SVGURIReferenceImpl implements SVGCursorElement {
+ SVGLength x;
+ SVGLength y;
+
+ public SVGCursorElementImpl()
+ {
+ }
+
+ public SVGLength getX( )
+ {
+ return x;
+ }
+
+ public void setX( SVGLength x )
+ {
+ this.x = x;
+ }
+
+ public SVGLength getY( )
+ {
+ return y;
+ }
+
+ public void setY( SVGLength y )
+ {
+ this.y = y;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGDefsElementImpl.java b/src/org/apache/fop/dom/svg/SVGDefsElementImpl.java
new file mode 100644
index 000000000..79766a989
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGDefsElementImpl.java
@@ -0,0 +1,64 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ * class representing a line in an SVG Area
+ */
+public class SVGDefsElementImpl extends GraphicElement implements SVGDefsElement {
+
+ public SVGDefsElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGDescElementImpl.java b/src/org/apache/fop/dom/svg/SVGDescElementImpl.java
new file mode 100644
index 000000000..7784b94fd
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGDescElementImpl.java
@@ -0,0 +1,64 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ * class representing a line in an SVG Area
+ */
+public class SVGDescElementImpl extends GraphicElement implements SVGDescElement {
+
+ public SVGDescElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGDocumentImpl.java b/src/org/apache/fop/dom/svg/SVGDocumentImpl.java
new file mode 100644
index 000000000..99b934c1a
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGDocumentImpl.java
@@ -0,0 +1,157 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+import java.util.*;
+
+import org.w3c.dom.svg.*;
+import org.w3c.dom.*;
+import org.w3c.dom.events.*;
+
+/**
+ *
+ */
+class SVGDocumentImpl extends SVGElementImpl implements SVGDocument {
+ public String getTitle()
+ {
+ return null;
+ }
+
+ public void setTitle(String title)
+ {
+ }
+
+ public String getReferrer()
+ {
+ return null;
+ }
+
+ public String getDomain()
+ {
+ return null;
+ }
+
+ public String getURL()
+ {
+ return null;
+ }
+
+ public SVGSVGElement getRootElement()
+ {
+ return null;
+ }
+
+ public Element getElementById(String elementId)
+ {
+ return null;
+ }
+
+ public Event createEvent(String eventType)
+ throws DOMException
+ {
+ return null;
+ }
+
+ public DOMImplementation getImplementation()
+ {
+ return null;
+ }
+
+ public EntityReference createEntityReference(String str)
+ {
+ return null;
+ }
+
+ public DocumentFragment createDocumentFragment()
+ {
+ return null;
+ }
+
+ public Text createTextNode(String str)
+ {
+ return null;
+ }
+
+ public Element createElement(String str)
+ {
+ return null;
+ }
+
+ public ProcessingInstruction createProcessingInstruction(String s1, String s2)
+ {
+ return null;
+ }
+
+ public DocumentType getDoctype()
+ {
+ return null;
+ }
+
+ public CDATASection createCDATASection(String str)
+ {
+ return null;
+ }
+
+ public Comment createComment(String str)
+ {
+ return null;
+ }
+
+ public Attr createAttribute(String str)
+ {
+ return null;
+ }
+
+ public Element getDocumentElement()
+ {
+ return null;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGElementImpl.java b/src/org/apache/fop/dom/svg/SVGElementImpl.java
new file mode 100644
index 000000000..aaa9b6852
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGElementImpl.java
@@ -0,0 +1,444 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+import org.apache.fop.datatypes.*;
+
+import org.w3c.dom.svg.*;
+import org.w3c.dom.*;
+
+import java.util.*;
+
+/**
+ *
+ *
+ */
+class ElementImpl implements Element {
+ Vector childs = new Vector();
+ Node parent = null;
+
+ public Node replaceChild(Node n, Node no)
+ {
+ return null;
+ }
+
+ public String getNodeName()
+ {
+ return null;
+ }
+
+ public short getNodeType()
+ {
+ return 0;
+ }
+
+ public Node getParentNode()
+ {
+ return null;
+ }
+
+ public NodeList getChildNodes()
+ {
+ return new NodeListImpl(childs);
+ }
+
+ public Node getFirstChild()
+ {
+ return null;
+ }
+
+ public Node getLastChild()
+ {
+ return null;
+ }
+
+ public Node getPreviousSibling()
+ {
+ return null;
+ }
+
+ public Node getNextSibling()
+ {
+ return null;
+ }
+
+ public NamedNodeMap getAttributes()
+ {
+ return null;
+ }
+
+ public Document getOwnerDocument()
+ {
+ return null;
+ }
+
+ public Node insertBefore(Node newChild,
+ Node refChild)
+ throws DOMException
+ {
+ return null;
+ }
+
+ public Node removeChild(Node oldChild)
+ throws DOMException
+ {
+ return null;
+ }
+
+ public Node appendChild(Node newChild)
+ throws DOMException
+ {
+ childs.addElement(newChild);
+ return null;
+ }
+
+ public boolean hasChildNodes()
+ {
+ return false;
+ }
+
+ public Node cloneNode(boolean deep)
+ {
+ return null;
+ }
+
+ public void normalize()
+ {
+ }
+
+ public boolean supports(String feature,
+ String version)
+ {
+ return false;
+ }
+
+ public String getNamespaceURI()
+ {
+ return null;
+ }
+
+ public String getPrefix()
+ {
+ return null;
+ }
+
+ public void setPrefix(String prefix) throws DOMException
+ {
+ }
+
+ public String getLocalName()
+ {
+ return null;
+ }
+
+ public String getClassName()
+ {
+ return null;
+ }
+
+ public void setClassName(String n)
+ {
+ }
+
+ public String getNodeValue() throws DOMException
+ {
+ return null;
+ }
+
+ public void setNodeValue(String nodeValue) throws DOMException
+ {
+ }
+
+ public String getTagName()
+ {
+ return null;
+ }
+
+ public String getAttribute(String name)
+ {
+ return null;
+ }
+
+ public void setAttribute(String name, String value) throws DOMException
+ {
+ }
+
+ public void removeAttribute(String name) throws DOMException
+ {
+ }
+
+ public Attr getAttributeNode(String name)
+ {
+ return null;
+ }
+
+ public Attr setAttributeNode(Attr newAttr)
+ throws DOMException
+ {
+ return null;
+ }
+
+ public Attr removeAttributeNode(Attr oldAttr)
+ throws DOMException
+ {
+ return null;
+ }
+
+ public NodeList getElementsByTagName(String name)
+ {
+ return null;
+ }
+
+ public String getAttributeNS(String namespaceURI,
+ String localName)
+ {
+ return null;
+ }
+
+ public void setAttributeNS(String namespaceURI,
+ String qualifiedName,
+ String value)
+ throws DOMException
+ {
+ }
+
+ public void removeAttributeNS(String namespaceURI,
+ String localName)
+ throws DOMException
+ {
+ }
+
+ public Attr getAttributeNodeNS(String namespaceURI,
+ String localName)
+ {
+ return null;
+ }
+
+ public Attr setAttributeNodeNS(Attr newAttr)
+ throws DOMException
+ {
+ return null;
+ }
+
+ public NodeList getElementsByTagNameNS(String namespaceURI,
+ String localName)
+ {
+ return null;
+ }
+
+}
+
+class NodeListImpl implements NodeList
+{
+ Vector vect = null;
+
+ NodeListImpl(Vector v)
+ {
+ vect = v;
+ }
+
+ public int getLength()
+ {
+ return vect.size();
+ }
+
+ public Node item(int i)
+ {
+ return (Node)vect.elementAt(i);
+ }
+}
+
+public abstract class SVGElementImpl extends ElementImpl implements GraphicImpl, SVGElement {
+ String idString = "";
+
+ public String getId()
+ {
+ return idString;
+ }
+
+ public void setId(String id)
+ {
+ idString = id;
+ }
+
+ public SVGSVGElement getOwnerSVGElement( )
+ {
+ return null;
+ }
+
+ public SVGElement getViewportElement( )
+ {
+ return null;
+ }
+
+ GraphicImpl parent = null;
+ public GraphicImpl getGraphicParent()
+ {
+ return parent;
+ }
+
+ public void setParent(GraphicImpl graph)
+ {
+ parent = graph;
+ }
+
+ Hashtable style = null;
+ public void setStyle(Hashtable st)
+ {
+ style = st;
+ }
+
+ public Hashtable getStyle()
+ {
+ Hashtable ret = null;
+ if(parent != null) {
+ ret = parent.getStyle();
+ if(ret != null)
+ ret = (Hashtable)ret.clone();
+ }
+ if(ret == null) {
+ ret = style;
+ } else {
+ if(style != null) {
+ for(Enumeration e = style.keys(); e.hasMoreElements(); ) {
+ String str = (String)e.nextElement();
+ ret.put(str, style.get(str));
+ }
+ }
+ }
+ return ret;
+ }
+
+ Hashtable defs = new Hashtable();
+ public void addDefs(Hashtable table)
+ {
+// System.out.println("Adding defs : " + table);
+ for(Enumeration e = table.keys(); e.hasMoreElements(); ) {
+ String str = (String)e.nextElement();
+ defs.put(str, table.get(str));
+ }
+ }
+
+ public Hashtable getDefs()
+ {
+ Hashtable ret = null;
+ if(parent != null) {
+ ret = parent.getDefs();
+ if(ret != null)
+ ret = (Hashtable)ret.clone();
+ }
+ if(ret == null) {
+ ret = defs;
+ } else {
+ if(defs != null) {
+ for(Enumeration e = defs.keys(); e.hasMoreElements(); ) {
+ String str = (String)e.nextElement();
+ ret.put(str, defs.get(str));
+ }
+ }
+ }
+ return ret;
+ }
+
+ public GraphicImpl locateDef(String str)
+ {
+ Object obj = null;
+ if(defs != null) {
+ obj = defs.get(str);
+ }
+ if(obj == null) {
+ NodeList list = getChildNodes();
+ for(int count = 0; count < list.getLength(); count++) {
+ Object o = list.item(count);
+ if(o instanceof SVGElement) {
+ String s;
+ s = ((SVGElement)o).getId();
+ if(str.equals(s)) {
+ obj = o;
+ break;
+ }
+ }
+ }
+ }
+ if(obj == null && parent != null) {
+ obj = parent.locateDef(str);
+ }
+ return (GraphicImpl)obj;
+ }
+
+ Vector trans = null;
+ public void setTransform(Vector tr)
+ {
+ trans = tr;
+ }
+
+ public Vector oldgetTransform()
+ {
+ return trans;
+/* Vector ret = null;
+ if(parent != null) {
+ ret = parent.oldgetTransform();
+ if(ret != null)
+ ret = (Vector)ret.clone();
+ }
+ if(ret == null) {
+ ret = trans;
+ } else {
+ if(trans != null) {
+ for(Enumeration e = trans.elements(); e.hasMoreElements(); ) {
+ Object o = e.nextElement();
+ ret.addElement(o);
+ }
+ }
+ }
+ return ret;*/
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGEllipseElementImpl.java b/src/org/apache/fop/dom/svg/SVGEllipseElementImpl.java
new file mode 100644
index 000000000..7513b9af3
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGEllipseElementImpl.java
@@ -0,0 +1,112 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+import org.w3c.dom.*;
+import org.w3c.dom.events.*;
+
+/**
+ *
+ */
+public class SVGEllipseElementImpl extends GraphicElement implements SVGEllipseElement {
+ private SVGLength cx;
+ private SVGLength cy;
+ private SVGLength rx;
+ private SVGLength ry;
+
+ /**
+ */
+ public SVGEllipseElementImpl()
+ {
+ }
+
+ public String getClassName( )
+ {
+ return null;
+ }
+ public void setClassName( String className )
+ {
+ }
+ public SVGLength getCx( )
+ {
+ return cx;
+ }
+ public void setCx( SVGLength cx )
+ {
+ this.cx = cx;
+ }
+ public SVGLength getCy( )
+ {
+ return cy;
+ }
+ public void setCy( SVGLength cy )
+ {
+ this.cy = cy;
+ }
+ public SVGLength getRx( )
+ {
+ return rx;
+ }
+ public void setRx( SVGLength rx )
+ {
+ this.rx = rx;
+ }
+ public SVGLength getRy( )
+ {
+ return ry;
+ }
+ public void setRy( SVGLength ry )
+ {
+ this.ry = ry;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGExceptionImpl.java b/src/org/apache/fop/dom/svg/SVGExceptionImpl.java
new file mode 100644
index 000000000..b519faa5a
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGExceptionImpl.java
@@ -0,0 +1,68 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Fop" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.datatypes;
+
+import org.apache.fop.fo.Property;
+
+import java.util.*;
+import java.text.*;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGExceptionImpl extends SVGException {
+ public SVGExceptionImpl(short code, String message)
+ {
+ super(code, message);
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGFilterElementImpl.java b/src/org/apache/fop/dom/svg/SVGFilterElementImpl.java
new file mode 100644
index 000000000..4376a97a6
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGFilterElementImpl.java
@@ -0,0 +1,125 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGFilterElementImpl extends SVGURIReferenceImpl implements SVGFilterElement {
+
+ public SVGFilterElementImpl()
+ {
+ }
+
+ public short getFilterUnits( )
+ {
+ return 0;
+ }
+
+ public void setFilterUnits( short filterUnits )
+ {
+ }
+
+ public SVGLength getX( )
+ {
+ return null;
+ }
+
+ public void setX( SVGLength x )
+ {
+ }
+
+ public SVGLength getY( )
+ {
+ return null;
+ }
+
+ public void setY( SVGLength y )
+ {
+ }
+
+ public SVGLength getWidth( )
+ {
+ return null;
+ }
+
+ public void setWidth( SVGLength width )
+ {
+ }
+
+ public SVGLength getHeight( )
+ {
+ return null;
+ }
+
+ public void setHeight( SVGLength height )
+ {
+ }
+
+ public SVGInteger getFilterResX( )
+ {
+ return null;
+ }
+
+ public SVGInteger getFilterResY( )
+ {
+ return null;
+ }
+
+
+ public void setFilterRes ( int filterResX, int filterResY )
+ throws SVGException
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGFontElementImpl.java b/src/org/apache/fop/dom/svg/SVGFontElementImpl.java
new file mode 100644
index 000000000..dd45ce697
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGFontElementImpl.java
@@ -0,0 +1,64 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGFontElementImpl extends SVGElementImpl implements SVGFontElement {
+
+ public SVGFontElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGGElementImpl.java b/src/org/apache/fop/dom/svg/SVGGElementImpl.java
new file mode 100644
index 000000000..eb6c76168
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGGElementImpl.java
@@ -0,0 +1,89 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Fop" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+import org.apache.fop.layout.*;
+
+import java.util.*;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGGElementImpl extends GraphicElement implements SVGGElement {
+
+ protected Vector children = new Vector();
+
+ /**
+ */
+ public SVGGElementImpl()
+ {
+ }
+
+ /**
+ * add a graphic.
+ *
+ * Graphics include SVG Rectangles, Lines and Text
+ *
+ * @param graphic the GraphicImpl to add
+ */
+ public void addGraphic(GraphicImpl graphic)
+ {
+ this.children.addElement(graphic);
+ graphic.setParent(this);
+ }
+
+ public Vector getChildren()
+ {
+ return this.children;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGGlyphElementImpl.java b/src/org/apache/fop/dom/svg/SVGGlyphElementImpl.java
new file mode 100644
index 000000000..98938085a
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGGlyphElementImpl.java
@@ -0,0 +1,62 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+/**
+ *
+ */
+public class SVGGlyphElementImpl extends SVGElementImpl {
+
+ public SVGGlyphElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGGradientElementImpl.java b/src/org/apache/fop/dom/svg/SVGGradientElementImpl.java
new file mode 100644
index 000000000..de59425da
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGGradientElementImpl.java
@@ -0,0 +1,90 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGGradientElementImpl extends SVGURIReferenceImpl implements SVGGradientElement {
+/*
+SVG_UNIT_TYPE_UNKNOWN
+SVG_UNIT_TYPE_USERSPACE
+SVG_UNIT_TYPE_USERSPACEONUSE
+SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
+*/
+ short units = SVG_UNIT_TYPE_UNKNOWN;
+
+ public SVGGradientElementImpl()
+ {
+ }
+
+ public short getGradientUnits( )
+ {
+ return units;
+ }
+
+ public void setGradientUnits(short gradientUnits)
+ {
+ units = gradientUnits;
+ }
+
+ public SVGTransformList getGradientTransform()
+ {
+ return null;
+ }
+
+ public void setGradientTransform(SVGTransformList gradientTransform)
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGHKernElementImpl.java b/src/org/apache/fop/dom/svg/SVGHKernElementImpl.java
new file mode 100644
index 000000000..28a563270
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGHKernElementImpl.java
@@ -0,0 +1,62 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+/**
+ *
+ */
+public class SVGHKernElementImpl extends SVGElementImpl {
+
+ public SVGHKernElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGImageElementImpl.java b/src/org/apache/fop/dom/svg/SVGImageElementImpl.java
new file mode 100644
index 000000000..b59a463ac
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGImageElementImpl.java
@@ -0,0 +1,72 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+/**
+ *
+ */
+public class SVGImageElementImpl extends SVGElementImpl {
+ public String link;
+ public float x;
+ public float y;
+ public float width;
+ public float height;
+
+ public SVGImageElementImpl(String l, float x, float y, float w, float h)
+ {
+ link = l;
+ this.x = x;
+ this.y = y;
+ width = w;
+ height = h;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGLengthImpl.java b/src/org/apache/fop/dom/svg/SVGLengthImpl.java
new file mode 100644
index 000000000..4b95233f2
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGLengthImpl.java
@@ -0,0 +1,203 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Fop" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+import org.apache.fop.fo.Property;
+
+import java.util.*;
+
+import org.w3c.dom.svg.*;
+
+/**
+ * a length quantity in SVG
+ */
+public class SVGLengthImpl implements SVGLength {
+ short unitType = SVG_LENGTHTYPE_UNKNOWN;
+ protected float millipoints = 0;
+ protected float fontsize = 12; //??
+
+ public short getUnitType( )
+ {
+ return unitType;
+ }
+
+ public float getValue( )
+ {
+ return millipoints;
+ }
+
+ public void setValue( float value )
+ {
+ millipoints = value;
+ }
+
+ public float getValueInSpecifiedUnits()
+ {
+ return 0;
+ }
+
+ public void setValueInSpecifiedUnits(float valueInSpecifiedUnits)
+ {
+ }
+
+ public String getValueAsString()
+ {
+ return null;
+ }
+
+ public void setValueAsString( String valueAsString )
+ {
+ convert(valueAsString);
+ }
+
+ public float getAnimatedValue( )
+ {
+ return 0;
+ }
+
+ public void newValueSpecifiedUnits(short unitType, float valueInSpecifiedUnits) throws SVGException
+ {
+ }
+
+ public void convertToSpecifiedUnits(short unitType) throws SVGException
+ {
+ }
+
+ /**
+ * set the length given a particular String specifying length and units
+ */
+ public SVGLengthImpl (String len)
+ {
+ convert(len);
+ }
+
+ public SVGLengthImpl()
+ {
+ }
+
+ /**
+ * set the length given a particular String specifying length and units,
+ * and the font-size (necessary for an em)
+ *
+ public SVGLengthImpl(String len/*, int fontsize*)
+ {
+// this.fontsize = fontsize;
+ convert(len);
+ }*/
+
+ protected void convert(String len)
+ {
+ int l = len.length();
+
+ if (l == 0) {
+ System.err.println("WARNING: empty length");
+ this.millipoints = 0;
+ } else {
+ float dvalue = getFloatValue(len, l);
+ this.millipoints = dvalue;
+ }
+ }
+
+ protected float getFloatValue(String len, int l)
+ {
+ int assumed_resolution = 1; // points/pixel
+
+ float dvalue;
+ try {
+ if(len.endsWith("in")) {
+ dvalue = Float.valueOf(len.substring(0,(l-2))).floatValue();
+ dvalue = dvalue * 72;
+ unitType = SVG_LENGTHTYPE_IN;
+ } else if(len.endsWith("cm")) {
+ dvalue = Float.valueOf(len.substring(0,(l-2))).floatValue();
+ dvalue = dvalue * 28.35f;
+ unitType = SVG_LENGTHTYPE_CM;
+ } else if(len.endsWith("mm")) {
+ dvalue = Float.valueOf(len.substring(0,(l-2))).floatValue();
+ dvalue = dvalue * 2.84f;
+ unitType = SVG_LENGTHTYPE_MM;
+ } else if(len.endsWith("pt")) {
+ dvalue = Float.valueOf(len.substring(0,(l-2))).floatValue();
+// dvalue = dvalue;
+ unitType = SVG_LENGTHTYPE_PT;
+ } else if(len.endsWith("pc")) {
+ dvalue = Float.valueOf(len.substring(0,(l-2))).floatValue();
+ dvalue = dvalue * 12;
+ unitType = SVG_LENGTHTYPE_PC;
+ } else if(len.endsWith("em")) {
+ dvalue = Float.valueOf(len.substring(0,(l-2))).floatValue();
+ dvalue = dvalue * fontsize;
+ unitType = SVG_LENGTHTYPE_EMS;
+ } else if(len.endsWith("px")) {
+ dvalue = Float.valueOf(len.substring(0,(l-2))).floatValue();
+ dvalue = dvalue * assumed_resolution;
+ unitType = SVG_LENGTHTYPE_PX;
+ } else if(len.endsWith("%")) {
+ dvalue = Float.valueOf(len.substring(0,(l-1))).floatValue() / 100f;
+ unitType = SVG_LENGTHTYPE_PERCENTAGE;
+ } else {
+ dvalue = Float.valueOf(len).floatValue();
+ unitType = SVG_LENGTHTYPE_NUMBER;
+ }
+ } catch (Exception e) {
+ dvalue = 0;
+ unitType = SVG_LENGTHTYPE_UNKNOWN;
+ System.err.println("ERROR: unknown length units in " + len);
+ }
+ return dvalue;
+ }
+
+ public String toString()
+ {
+ String s = millipoints + "mpt";
+ return s;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGLengthListImpl.java b/src/org/apache/fop/dom/svg/SVGLengthListImpl.java
new file mode 100644
index 000000000..018820f5e
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGLengthListImpl.java
@@ -0,0 +1,169 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Fop" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+import org.apache.fop.fo.Property;
+
+import java.util.*;
+
+import org.w3c.dom.svg.*;
+
+/**
+ * a length quantity in XSL
+ */
+public class SVGLengthListImpl extends SVGListImpl implements SVGLengthList {
+
+ protected float millipoints = 0;
+ protected Vector valueList;
+
+ protected float fontsize = 12;
+
+ public void setValueAsString( String valueAsString )
+ {
+ convert(valueAsString);
+ }
+
+ /**
+ * set the length given a particular String specifying length and units
+ */
+ public SVGLengthListImpl (String len) {
+ convert(len);
+ }
+
+ public SVGLengthListImpl () {
+ }
+
+ /**
+ * set the length given a particular String specifying length and units,
+ * and the font-size (necessary for an em)
+ */
+ public SVGLengthListImpl (String len, int fontsize)
+ {
+ this.fontsize = fontsize;
+ convert(len);
+ }
+
+ protected void convert(String len)
+ {
+ int l = len.length();
+
+ if (l == 0) {
+ System.err.println("WARNING: empty length");
+ this.millipoints = 0;
+ } else {
+ // could be an array of points, as in for svg:text
+ int pos;
+ pos = len.trim().indexOf(" ");
+ this.valueList = new Vector();
+ if(pos != -1) {
+ this.millipoints = 0;
+ StringTokenizer st = new StringTokenizer(len.trim());
+ while(st.hasMoreTokens()) {
+ String val = st.nextToken();
+ float dvalue = getFloatValue(val, val.length());
+ float intValue = dvalue;
+ this.valueList.addElement(new Float(intValue));
+ }
+ } else {
+ float dvalue = getFloatValue(len, l);
+ this.millipoints = dvalue;
+ this.valueList.addElement(new Float(millipoints));
+ }
+ }
+ }
+
+ protected float getFloatValue(String len, int l)
+ {
+ int assumed_resolution = 1; // points/pixel
+
+ float dvalue;
+ try {
+ if(len.endsWith("in")) {
+ dvalue = Float.valueOf(len.substring(0,(l-2))).floatValue();
+ dvalue = dvalue * 72;
+ } else if(len.endsWith("cm")) {
+ dvalue = Float.valueOf(len.substring(0,(l-2))).floatValue();
+ dvalue = dvalue * 28.35f;
+ } else if(len.endsWith("mm")) {
+ dvalue = Float.valueOf(len.substring(0,(l-2))).floatValue();
+ dvalue = dvalue * 2.84f;
+ } else if(len.endsWith("pt")) {
+ dvalue = Float.valueOf(len.substring(0,(l-2))).floatValue();
+ dvalue = dvalue;
+ } else if(len.endsWith("pc")) {
+ dvalue = Float.valueOf(len.substring(0,(l-2))).floatValue();
+ dvalue = dvalue * 12;
+ } else if(len.endsWith("em")) {
+ dvalue = Float.valueOf(len.substring(0,(l-2))).floatValue();
+ dvalue = dvalue * fontsize;
+ } else if(len.endsWith("px")) {
+ dvalue = Float.valueOf(len.substring(0,(l-2))).floatValue();
+ dvalue = dvalue * assumed_resolution;
+ } else if(len.endsWith("%")) {
+ dvalue = Float.valueOf(len.substring(0,(l-1))).floatValue() / 100f; //??
+ } else {
+ dvalue = Float.valueOf(len).floatValue();
+ }
+ } catch (Exception e) {
+ dvalue = 0;
+ System.err.println("ERROR: unknown length units in " + len);
+ }
+ return dvalue;
+ }
+
+ /**
+ * return the length in 1/1000ths of a point
+ */
+ public Vector valueList()
+ {
+ return this.valueList;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGLineElementImpl.java b/src/org/apache/fop/dom/svg/SVGLineElementImpl.java
new file mode 100644
index 000000000..82ec1e0db
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGLineElementImpl.java
@@ -0,0 +1,126 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+import org.w3c.dom.*;
+import org.w3c.dom.events.*;
+
+/**
+ * class representing a line in an SVG Area
+ */
+public class SVGLineElementImpl extends GraphicElement implements SVGLineElement {
+
+ public SVGLength getX1( )
+ {
+ return x1;
+ }
+
+ public void setX1( SVGLength x1 )
+ {
+ this.x1 = x1;
+ }
+
+ public SVGLength getY1( )
+ {
+ return y1;
+ }
+
+ public void setY1( SVGLength y1 )
+ {
+ this.y1 = y1;
+ }
+
+ public SVGLength getX2( )
+ {
+ return x2;
+ }
+
+ public void setX2( SVGLength x2 )
+ {
+ this.x2 = x2;
+ }
+
+ public SVGLength getY2( )
+ {
+ return y2;
+ }
+
+ public void setY2( SVGLength y2 )
+ {
+ this.y2 = y2;
+ }
+
+ /** x-coordinate of start */
+ protected SVGLength x1;
+
+ /** y-coordinate of start */
+ protected SVGLength y1;
+
+ /** x-coordinate of end */
+ protected SVGLength x2;
+
+ /** y-coordinate of end */
+ protected SVGLength y2;
+
+ /**
+ * construct a line graphic
+ *
+ * @param x1 x-coordinate of start
+ * @param y1 y-coordinate of start
+ * @param x2 x-coordinate of end
+ * @param y2 y-coordinate of end
+ */
+ public SVGLineElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGLinearGradientElementImpl.java b/src/org/apache/fop/dom/svg/SVGLinearGradientElementImpl.java
new file mode 100644
index 000000000..d10a55ce1
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGLinearGradientElementImpl.java
@@ -0,0 +1,121 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGLinearGradientElementImpl extends SVGGradientElementImpl
+ implements SVGLinearGradientElement {
+
+ SVGLength x1;
+ SVGLength x2;
+ SVGLength y1;
+ SVGLength y2;
+ short spreadMethod;
+
+ public SVGLinearGradientElementImpl()
+ {
+ }
+
+ public SVGLength getX1()
+ {
+ return x1;
+ }
+
+ public void setX1(SVGLength x1)
+ {
+ this.x1 = x1;
+ }
+
+ public SVGLength getY1()
+ {
+ return y1;
+ }
+
+ public void setY1(SVGLength y1)
+ {
+ this.y1 = y1;
+ }
+
+ public SVGLength getX2()
+ {
+ return x2;
+ }
+
+ public void setX2(SVGLength x2)
+ {
+ this.x2 = x2;
+ }
+
+ public SVGLength getY2()
+ {
+ return y2;
+ }
+
+ public void setY2(SVGLength y2)
+ {
+ this.y2 = y2;
+ }
+
+ public short getSpreadMethod()
+ {
+ return spreadMethod;
+ }
+
+ public void setSpreadMethod(short spreadMethod)
+ {
+ this.spreadMethod = spreadMethod;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGListImpl.java b/src/org/apache/fop/dom/svg/SVGListImpl.java
new file mode 100644
index 000000000..97cec0870
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGListImpl.java
@@ -0,0 +1,118 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+import java.util.*;
+
+import org.w3c.dom.svg.*;
+import org.w3c.dom.*;
+
+/**
+ *
+ */
+class SVGListImpl implements SVGList {
+ Vector list = new Vector();
+
+ public int getNumberOfItems( )
+ {
+ return list.size();
+ }
+
+ public void clear()
+ {
+ list.removeAllElements();
+ }
+
+ public Object initialize ( Object newItem )
+ throws SVGException
+ {
+ return null;
+ }
+
+ public Object createItem()
+ {
+ return null;
+ }
+
+ public Object getItem(int index)
+ throws DOMException
+ {
+ Object obj = list.elementAt(index);
+ return obj;
+ }
+
+ public Object insertBefore(Object newItem, int index)
+ throws SVGException
+ {
+ return null;
+ }
+
+ public Object replace(Object newItem, int index)
+ throws DOMException, SVGException
+ {
+ return null;
+ }
+
+ public Object remove(int index)
+ throws DOMException
+ {
+ Object obj = list.elementAt(index);
+ list.removeElementAt(index);
+ return obj;
+ }
+
+ public Object append(Object newItem)
+ throws SVGException
+ {
+ list.addElement(newItem);
+ return null;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGMarkerElementImpl.java b/src/org/apache/fop/dom/svg/SVGMarkerElementImpl.java
new file mode 100644
index 000000000..9d8647a79
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGMarkerElementImpl.java
@@ -0,0 +1,144 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGMarkerElementImpl extends GraphicElement implements SVGMarkerElement {
+ short units;
+ short otype;
+
+ public SVGMarkerElementImpl()
+ {
+ }
+
+ public short getMarkerUnits( )
+ {
+ return units;
+ }
+
+ public short getOrientType( )
+ {
+ return otype;
+ }
+
+ public SVGAngle getOrientAngle( )
+ {
+ return null;
+ }
+
+ public SVGLength getRefX( )
+ {
+ return null;
+ }
+
+ public void setRefX( SVGLength refX )
+ {
+ }
+
+ public SVGLength getRefY( )
+ {
+ return null;
+ }
+
+ public void setRefY( SVGLength refY )
+ {
+ }
+
+ public SVGLength getMarkerWidth( )
+ {
+ return null;
+ }
+
+ public void setMarkerWidth( SVGLength markerWidth )
+ {
+ }
+
+ public SVGLength getMarkerHeight( )
+ {
+ return null;
+ }
+
+ public void setMarkerHeight( SVGLength markerHeight )
+ {
+ }
+
+ public void setOrientToAuto ( )
+ {
+ }
+
+ public void setOrientToAngle ( SVGAngle angle )
+ throws SVGException
+ {
+ }
+
+ public SVGRect getViewBox( )
+ {
+ return null;
+ }
+
+ public void setViewBox( SVGRect viewBox )
+ {
+ }
+
+ public SVGPreserveAspectRatio getPreserveAspectRatio( )
+ {
+ return null;
+ }
+
+ public void setPreserveAspectRatio( SVGPreserveAspectRatio preserveAspectRatio )
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGMaskElementImpl.java b/src/org/apache/fop/dom/svg/SVGMaskElementImpl.java
new file mode 100644
index 000000000..153fc7dba
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGMaskElementImpl.java
@@ -0,0 +1,70 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import java.util.Vector;
+
+/**
+ *
+ */
+public class SVGMaskElementImpl extends SVGElementImpl {
+ public Vector elements;
+
+ public void addElement(GraphicImpl g)
+ {
+ elements.addElement(g);
+ }
+
+ public SVGMaskElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGMatrixImpl.java b/src/org/apache/fop/dom/svg/SVGMatrixImpl.java
new file mode 100644
index 000000000..135c99094
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGMatrixImpl.java
@@ -0,0 +1,305 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Fop" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+import org.apache.fop.fo.Property;
+
+import java.util.*;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGMatrixImpl implements SVGMatrix {
+ float a = 1.0f;
+ float b = 0.0f;
+ float c = 0.0f;
+ float d = 1.0f;
+ SVGLength e = new SVGLengthImpl();
+ SVGLength f = new SVGLengthImpl();
+
+ public SVGMatrixImpl()
+ {
+ }
+
+ public float getA( )
+ {
+ return a;
+ }
+
+ public void setA( float a )
+ {
+ this.a = a;
+ }
+
+ public float getB( )
+ {
+ return b;
+ }
+
+ public void setB( float b )
+ {
+ this.b = b;
+ }
+
+ public float getC( )
+ {
+ return c;
+ }
+
+ public void setC( float c )
+ {
+ this.c = c;
+ }
+
+ public float getD( )
+ {
+ return d;
+ }
+
+ public void setD( float d )
+ {
+ this.d = d;
+ }
+
+ public SVGLength getE( )
+ {
+ return e;
+ }
+
+ public void setE( SVGLength e )
+ {
+ this.e = e;
+ }
+
+ public SVGLength getF( )
+ {
+ return f;
+ }
+
+ public void setF( SVGLength f )
+ {
+ this.f = f;
+ }
+
+ public SVGMatrix multiply ( SVGMatrix secondMatrix )
+ throws SVGException
+ {
+ SVGMatrix mat = new SVGMatrixImpl();
+ mat.setA(a * secondMatrix.getA() + b * secondMatrix.getC());
+ mat.setB(a * secondMatrix.getB() + b * secondMatrix.getD());
+ mat.setC(c * secondMatrix.getA() + d * secondMatrix.getC());
+ mat.setD(c * secondMatrix.getB() + d * secondMatrix.getD());
+ // e,f?
+ SVGLengthImpl len;
+ len = new SVGLengthImpl();
+ len.setValue(e.getValue() + secondMatrix.getE().getValue());
+ mat.setE(len);
+ len = new SVGLengthImpl();
+ len.setValue(f.getValue() + secondMatrix.getF().getValue());
+ mat.setF(len);
+ return mat;
+ }
+
+ public SVGMatrix inverse ( )
+ throws SVGException
+ {
+ SVGMatrix mat = new SVGMatrixImpl();
+ double det = Math.abs(a * d - b * c);
+ mat.setA((float)(d / det));
+ mat.setB((float)(b / det));
+ mat.setC((float)(-c / det));
+ mat.setD((float)(a / det));
+ // e,f?
+ SVGLengthImpl len;
+ len = new SVGLengthImpl();
+ len.setValue(-e.getValue());
+ mat.setE(len);
+ len = new SVGLengthImpl();
+ len.setValue(-f.getValue());
+ mat.setF(len);
+ return mat;
+ }
+
+/* switch(t.getType()) {
+ case SVGTransform.SVG_TRANSFORM_SCALE:
+ {
+ // to scale around the svg origin
+ // we need to translate before and after
+// Float len = (Float)t.getValue();
+// float val = len.floatValue();
+// if(Math.abs(val) < 0.001)
+// val = 0;
+// currentStream.add("1 0 0 1 " + -posx / 1000f + " " + posy / 1000f + " cm\n");
+// currentStream.add(val + " 0 0 " + val + " 0 0 cm\n");
+// currentStream.add("1 0 0 1 " + posx / 1000f + " " + -posy / 1000f + " cm\n");
+ }
+ break;
+ case SVGTransform.SVG_TRANSFORM_ROTATE:
+ {
+ // to rotate around the svg origin
+ // we need to translate before and after
+// SVGLength len = (SVGLength)t.getValue();
+// float val = len.getValue();
+// float cosval = (float)Math.cos(val * Math.PI / 90f);
+// if(Math.abs(cosval) < 0.001)
+// cosval = 0;
+// float sinval = (float)Math.sin(val * Math.PI / 90f);
+// if(Math.abs(sinval) < 0.001)
+// sinval = 0;
+// currentStream.add("1 0 0 1 " + -posx / 1000f + " " + posy / 1000f + " cm\n");
+// currentStream.add(cosval
+// + " " + sinval
+// + " " + -sinval
+// + " " + cosval
+// + " 0 0 cm\n");
+// currentStream.add("1 0 0 1 " + posx / 1000f + " " + -posy / 1000f + " cm\n");
+ }
+ break;
+ }*/
+
+ public SVGMatrix translate ( SVGLength x, SVGLength y )
+ throws SVGException
+ {
+ SVGMatrix matrix = new SVGMatrixImpl();
+ matrix.setA(a);
+ matrix.setB(b);
+ matrix.setC(c);
+ matrix.setD(d);
+ SVGLength len;
+ len = new SVGLengthImpl();
+ len.setValue(e.getValue() + x.getValue());
+ matrix.setE(len);
+ len = new SVGLengthImpl();
+ len.setValue(f.getValue() + y.getValue());
+ matrix.setF(len);
+ return matrix;
+ }
+
+ public SVGMatrix scale(float scaleFactor)
+ throws SVGException
+ {
+ SVGMatrix matrix = new SVGMatrixImpl();
+ matrix.setA(a * scaleFactor);
+ matrix.setB(b);
+ matrix.setC(c);
+ matrix.setD(d * scaleFactor);
+ matrix.setE(e);
+ matrix.setF(f);
+ return matrix;
+ }
+
+ public SVGMatrix scaleNonUniform(float scaleFactorX, float scaleFactorY)
+ throws SVGException
+ {
+ SVGMatrix matrix = new SVGMatrixImpl();
+ matrix.setA(a * scaleFactorX);
+ matrix.setB(b);
+ matrix.setC(c);
+ matrix.setD(d * scaleFactorY);
+ matrix.setE(e);
+ matrix.setF(f);
+ return matrix;
+ }
+
+ public SVGMatrix rotate ( SVGAngle angle )
+ throws SVGException
+ {
+ SVGMatrix matrix = new SVGMatrixImpl();
+ matrix.setA((float)Math.cos(angle.getValue()));
+ matrix.setB((float)Math.sin(angle.getValue()));
+ matrix.setC((float)-Math.sin(angle.getValue()));
+ matrix.setD((float)Math.cos(angle.getValue()));
+ return multiply(matrix);
+ }
+
+ public SVGMatrix rotateFromVector(SVGLength x, SVGLength y) throws SVGException
+ {
+ return null;
+ }
+
+ public SVGMatrix flipX()
+ {
+ return null;
+ }
+
+ public SVGMatrix flipY()
+ {
+ return null;
+ }
+
+ public SVGMatrix skewX(SVGAngle angle) throws SVGException
+ {
+ SVGMatrix matrix = new SVGMatrixImpl();
+ matrix.setA(1);
+ matrix.setB((float)Math.sin(angle.getValue()));
+ matrix.setC(0);
+ matrix.setD(1);
+ return multiply(matrix);
+ }
+
+ public SVGMatrix skewY(SVGAngle angle) throws SVGException
+ {
+ SVGMatrix matrix = new SVGMatrixImpl();
+ matrix.setA(1);
+ matrix.setB(0);
+ matrix.setC((float)-Math.sin(angle.getValue()));
+ matrix.setD(1);
+ return multiply(matrix);
+ }
+
+ public String toString()
+ {
+ return "[" + getA() + " " + getB() + " " + getC()
+ + " " + getD() + " " + getE().getValue() + " " + getF().getValue() + "]";
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGMissingGlyphElementImpl.java b/src/org/apache/fop/dom/svg/SVGMissingGlyphElementImpl.java
new file mode 100644
index 000000000..976a5468b
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGMissingGlyphElementImpl.java
@@ -0,0 +1,61 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+/**
+ *
+ */
+public class SVGMissingGlyphElementImpl extends SVGElementImpl {
+
+ public SVGMissingGlyphElementImpl() {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGNumberImpl.java b/src/org/apache/fop/dom/svg/SVGNumberImpl.java
new file mode 100644
index 000000000..f0cfd41d9
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGNumberImpl.java
@@ -0,0 +1,83 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Fop" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+import org.apache.fop.fo.Property;
+
+import java.util.*;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGNumberImpl implements SVGNumber {
+ float value = 0;
+
+ public SVGNumberImpl()
+ {
+ }
+
+ public float getValue()
+ {
+ return value;
+ }
+
+ public void setValue(float value)
+ {
+ this.value = value;
+ }
+
+ public float getAnimatedValue()
+ {
+ return 0;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGPathElementImpl.java b/src/org/apache/fop/dom/svg/SVGPathElementImpl.java
new file mode 100644
index 000000000..9b08fdadc
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGPathElementImpl.java
@@ -0,0 +1,113 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import java.util.*;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGPathElementImpl extends GraphicElement implements SVGPathElement {
+
+ public Vector pathElements;
+
+ /**
+ * construct a line graphic
+ */
+ public SVGPathElementImpl(Vector v)
+ {
+ this.pathElements = v;
+ }
+
+ public SVGNumber getLength()
+ {
+ return null;
+ }
+
+ public void setLength( SVGNumber length )
+ {
+ }
+
+ public SVGList getPathSegList()
+ {
+ return null;
+ }
+
+ public SVGList getNormalizedPathSegList()
+ {
+ return null;
+ }
+
+ public float getTotalLength()
+ {
+ return 0;
+ }
+
+ public SVGPoint getPointAtLength(float distance)
+ throws SVGException
+ {
+ return null;
+ }
+
+ public int getPathSegAtLength(float distance)
+ throws SVGException
+ {
+ return 0;
+ }
+
+ public SVGPathSeg createSVGPathSeg()
+ {
+ return null;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGPathSegImpl.java b/src/org/apache/fop/dom/svg/SVGPathSegImpl.java
new file mode 100644
index 000000000..9b37e6dd5
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGPathSegImpl.java
@@ -0,0 +1,185 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Fop" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+public class SVGPathSegImpl implements SVGPathSeg {
+ float[] values;
+ short commandType;
+ public SVGPathSegImpl(short type, float[] vals)
+ {
+ commandType = type;
+ values = vals;
+ }
+
+ public float[] getValues()
+ {
+ return values;
+ }
+
+ public short getPathSegType( )
+ {
+ return commandType;
+ }
+
+ public void setPathSegType( short pathSegType )
+ {
+ }
+
+ public String getPathSegTypeAsLetter( )
+ {
+ return null;
+ }
+
+ public void setPathSegTypeAsLetter( String pathSegTypeAsLetter )
+ {
+ }
+
+ public float getX( )
+ {
+ return 0;
+ }
+
+ public void setX( float x )
+ {
+ }
+
+ public float getY( )
+ {
+ return 0;
+ }
+
+ public void setY( float y )
+ {
+ }
+
+ public float getX1( )
+ {
+ return 0;
+ }
+
+ public void setX1( float x1 )
+ {
+ }
+
+ public float getY1( )
+ {
+ return 0;
+ }
+
+ public void setY1( float y1 )
+ {
+ }
+
+ public float getX2( )
+ {
+ return 0;
+ }
+
+ public void setX2( float x2 )
+ {
+ }
+
+ public float getY2( )
+ {
+ return 0;
+ }
+
+ public void setY2( float y2 )
+ {
+ }
+
+ public float getR1( )
+ {
+ return 0;
+ }
+
+ public void setR1( float r1 )
+ {
+ }
+
+ public float getR2( )
+ {
+ return 0;
+ }
+
+ public void setR2( float r2 )
+ {
+ }
+
+ public float getAngle( )
+ {
+ return 0;
+ }
+
+ public void setAngle( float angle )
+ {
+ }
+
+ public boolean getLargeArcFlag( )
+ {
+ return false;
+ }
+
+ public void setLargeArcFlag( boolean largeArcFlag )
+ {
+ }
+
+ public boolean getSweepFlag( )
+ {
+ return false;
+ }
+
+ public void setSweepFlag( boolean sweepFlag )
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGPatternElementImpl.java b/src/org/apache/fop/dom/svg/SVGPatternElementImpl.java
new file mode 100644
index 000000000..b7bea66df
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGPatternElementImpl.java
@@ -0,0 +1,135 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGPatternElementImpl extends SVGURIReferenceImpl implements SVGPatternElement {
+
+ public SVGPatternElementImpl() {
+ }
+
+ public short getPatternUnits( )
+ {
+ return 0;
+ }
+
+ public void setPatternUnits( short patternUnits )
+ {
+ }
+
+ public SVGTransformList getPatternTransform( )
+ {
+ return null;
+ }
+
+ public void setPatternTransform( SVGTransformList patternTransform )
+ {
+ }
+
+ public SVGLength getX( )
+ {
+ return null;
+ }
+
+ public void setX( SVGLength x )
+ {
+ }
+
+ public SVGLength getY( )
+ {
+ return null;
+ }
+
+ public void setY( SVGLength y )
+ {
+ }
+
+ public SVGLength getWidth( )
+ {
+ return null;
+ }
+
+ public void setWidth( SVGLength width )
+ {
+ }
+
+ public SVGLength getHeight( )
+ {
+ return null;
+ }
+
+ public void setHeight( SVGLength height )
+ {
+ }
+
+ public SVGRect getViewBox( )
+ {
+ return null;
+ }
+
+ public void setViewBox( SVGRect viewBox )
+ {
+ }
+
+ public SVGPreserveAspectRatio getPreserveAspectRatio( )
+ {
+ return null;
+ }
+
+ public void setPreserveAspectRatio( SVGPreserveAspectRatio preserveAspectRatio)
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGPolygonElementImpl.java b/src/org/apache/fop/dom/svg/SVGPolygonElementImpl.java
new file mode 100644
index 000000000..f2cd1eaf2
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGPolygonElementImpl.java
@@ -0,0 +1,74 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import java.util.*;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGPolygonElementImpl extends GraphicElement implements SVGPolygonElement {
+
+ public Vector points;
+
+ public SVGPolygonElementImpl(Vector p)
+ {
+ this.points = p;
+ }
+
+ public SVGList getPoints( )
+ {
+ return null;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGPolylineElementImpl.java b/src/org/apache/fop/dom/svg/SVGPolylineElementImpl.java
new file mode 100644
index 000000000..c8828b10b
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGPolylineElementImpl.java
@@ -0,0 +1,74 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import java.util.*;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGPolylineElementImpl extends GraphicElement implements SVGPolylineElement {
+
+ public Vector points;
+
+ public SVGPolylineElementImpl(Vector p)
+ {
+ this.points = p;
+ }
+
+ public SVGList getPoints()
+ {
+ return null;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGRadialGradientElementImpl.java b/src/org/apache/fop/dom/svg/SVGRadialGradientElementImpl.java
new file mode 100644
index 000000000..36c826dc5
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGRadialGradientElementImpl.java
@@ -0,0 +1,119 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGRadialGradientElementImpl extends SVGGradientElementImpl implements SVGRadialGradientElement {
+ SVGLength cx;
+ SVGLength cy;
+ SVGLength r;
+ SVGLength fx;
+ SVGLength fy;
+
+ public SVGRadialGradientElementImpl()
+ {
+ }
+
+ public SVGLength getCx()
+ {
+ return cx;
+ }
+
+ public void setCx(SVGLength cx)
+ {
+ this.cx = cx;
+ }
+
+ public SVGLength getCy()
+ {
+ return cy;
+ }
+
+ public void setCy(SVGLength cy)
+ {
+ this.cy = cy;
+ }
+
+ public SVGLength getR()
+ {
+ return r;
+ }
+
+ public void setR(SVGLength r)
+ {
+ this.r = r;
+ }
+
+ public SVGLength getFx()
+ {
+ return fx;
+ }
+
+ public void setFx(SVGLength fx)
+ {
+ this.fx = fx;
+ }
+
+ public SVGLength getFy()
+ {
+ return fy;
+ }
+
+ public void setFy(SVGLength fy)
+ {
+ this.fy = fy;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGRectElementImpl.java b/src/org/apache/fop/dom/svg/SVGRectElementImpl.java
new file mode 100644
index 000000000..321078293
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGRectElementImpl.java
@@ -0,0 +1,158 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Fop" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+import org.w3c.dom.*;
+import org.w3c.dom.events.*;
+
+/**
+ * class representing a rectangle in an SVG Area
+ */
+public class SVGRectElementImpl extends GraphicElement implements SVGRectElement {
+
+ /** x-coordinate of corner */
+ private SVGLength x;
+
+ /** y-coordinate of corner */
+ private SVGLength y;
+
+ /** width of rectangle */
+ private SVGLength width;
+
+ /** height of rectangle */
+ private SVGLength height;
+
+ /**
+ * construct a rectangle graphic.
+ *
+ * @param x x-coordinate of corner
+ * @param y y-coordinate of corner
+ * @param width width of rectangle
+ * @param height height of rectangle
+ */
+ public SVGRectElementImpl() {
+ }
+
+ public SVGRect getBBox()
+ {
+ SVGRect rect = new SVGRectImpl();
+ SVGNumber num;
+ num = new SVGNumberImpl();
+ num.setValue(x.getValue());
+ rect.setX(num);
+ num = new SVGNumberImpl();
+ num.setValue(y.getValue());
+ rect.setY(num);
+ num = new SVGNumberImpl();
+ num.setValue(width.getValue());
+ rect.setWidth(num);
+ num = new SVGNumberImpl();
+ num.setValue(height.getValue());
+ rect.setHeight(num);
+ return rect;
+ }
+
+ public SVGLength getX( )
+ {
+ return x;
+ }
+
+ public void setX( SVGLength x )
+ {
+ this.x = x;
+ }
+
+ public SVGLength getY( )
+ {
+ return y;
+ }
+
+ public void setY( SVGLength y )
+ {
+ this.y = y;
+ }
+
+ public SVGLength getWidth( )
+ {
+ return width;
+ }
+
+ public void setWidth( SVGLength width )
+ {
+ this.width = width;
+ }
+
+ public SVGLength getHeight( )
+ {
+ return height;
+ }
+
+ public void setHeight( SVGLength height )
+ {
+ this.height = height;
+ }
+
+ public SVGLength getRx( )
+ {
+ return null;
+ }
+ public void setRx( SVGLength rx )
+ {
+ }
+ public SVGLength getRy( )
+ {
+ return null;
+ }
+ public void setRy( SVGLength ry )
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGRectImpl.java b/src/org/apache/fop/dom/svg/SVGRectImpl.java
new file mode 100644
index 000000000..2b4c1646d
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGRectImpl.java
@@ -0,0 +1,111 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Fop" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+import org.apache.fop.fo.Property;
+
+import java.util.*;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGRectImpl implements SVGRect {
+ SVGNumber x;
+ SVGNumber y;
+ SVGNumber width;
+ SVGNumber height;
+
+ SVGRectImpl()
+ {
+ }
+
+ public SVGNumber getX( )
+ {
+ return x;
+ }
+
+ public void setX( SVGNumber x )
+ {
+ this.x = x;
+ }
+
+ public SVGNumber getY( )
+ {
+ return y;
+ }
+
+ public void setY( SVGNumber y )
+ {
+ this.y = y;
+ }
+
+ public SVGNumber getWidth( )
+ {
+ return width;
+ }
+
+ public void setWidth( SVGNumber width )
+ {
+ this.width = width;
+ }
+
+ public SVGNumber getHeight( )
+ {
+ return height;
+ }
+
+ public void setHeight( SVGNumber height )
+ {
+ this.height = height;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGSetElementImpl.java b/src/org/apache/fop/dom/svg/SVGSetElementImpl.java
new file mode 100644
index 000000000..e259d2170
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGSetElementImpl.java
@@ -0,0 +1,64 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGSetElementImpl extends GraphicElement {// implements SVGSetElement {
+
+ public SVGSetElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGStopElementImpl.java b/src/org/apache/fop/dom/svg/SVGStopElementImpl.java
new file mode 100644
index 000000000..bdc61a07e
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGStopElementImpl.java
@@ -0,0 +1,75 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGStopElementImpl extends SVGElementImpl implements SVGStopElement {
+ float offset;
+
+ public SVGStopElementImpl()
+ {
+ }
+
+ public float getOffset()
+ {
+ return offset;
+ }
+
+ public void setOffset(float offset)
+ {
+ this.offset = offset;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGStyleElementImpl.java b/src/org/apache/fop/dom/svg/SVGStyleElementImpl.java
new file mode 100644
index 000000000..51f7f0e2f
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGStyleElementImpl.java
@@ -0,0 +1,75 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGStyleElementImpl extends GraphicElement implements SVGStyleElement {
+ String type;
+
+ public SVGStyleElementImpl()
+ {
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGSwitchElementImpl.java b/src/org/apache/fop/dom/svg/SVGSwitchElementImpl.java
new file mode 100644
index 000000000..788c39f47
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGSwitchElementImpl.java
@@ -0,0 +1,68 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGSwitchElementImpl extends GraphicElement implements SVGSwitchElement {
+
+ public String sysr;
+ public String sysl;
+
+ public SVGSwitchElementImpl(String sr, String sl) {
+ sysr = sr;
+ sysl = sl;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGSymbolElementImpl.java b/src/org/apache/fop/dom/svg/SVGSymbolElementImpl.java
new file mode 100644
index 000000000..2eab714c2
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGSymbolElementImpl.java
@@ -0,0 +1,82 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGSymbolElementImpl extends GraphicElement implements SVGSymbolElement {
+
+ public SVGSymbolElementImpl()
+ {
+ }
+
+ public SVGRect getViewBox()
+ {
+ return null;
+ }
+
+ public void setViewBox(SVGRect viewBox)
+ {
+ }
+
+ public SVGPreserveAspectRatio getPreserveAspectRatio( )
+ {
+ return null;
+ }
+
+ public void setPreserveAspectRatio(SVGPreserveAspectRatio preserveAspectRatio)
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGTRefElementImpl.java b/src/org/apache/fop/dom/svg/SVGTRefElementImpl.java
new file mode 100644
index 000000000..59d4f7366
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGTRefElementImpl.java
@@ -0,0 +1,65 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import java.util.Vector;
+
+/**
+ *
+ */
+public class SVGTRefElementImpl extends SVGTSpanElementImpl {
+ public String ref;
+
+ public SVGTRefElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGTSpanElementImpl.java b/src/org/apache/fop/dom/svg/SVGTSpanElementImpl.java
new file mode 100644
index 000000000..fa16b1deb
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGTSpanElementImpl.java
@@ -0,0 +1,78 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import java.util.*;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGTSpanElementImpl extends SVGElementImpl {// implements SVGTSpanElement {
+ public String str;
+ public int dx = 0;
+ public int dy = 0;
+// public int x = 0;
+// public int y = 0;
+ public Vector xlist = null;
+ public Vector ylist = null;
+ public Vector dxlist = null;
+ public Vector dylist = null;
+
+ /**
+ *
+ */
+ public SVGTSpanElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGTextElementImpl.java b/src/org/apache/fop/dom/svg/SVGTextElementImpl.java
new file mode 100644
index 000000000..9c5857b03
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGTextElementImpl.java
@@ -0,0 +1,78 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Fop" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+import java.util.*;
+
+import org.w3c.dom.svg.*;
+
+/**
+ * class representing text in an SVG Area
+ *
+ */
+public class SVGTextElementImpl extends GraphicElement {//implements SVGTextElement {
+
+ /** x-coordinate of text */
+ public float x;
+
+ /** y-coordinate of text */
+ public float y;
+
+ /** vector of text elements, strings, tspan, tref */
+ public Vector textList;
+
+ /**
+ * construct a text element
+ */
+ public SVGTextElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGTextPathElementImpl.java b/src/org/apache/fop/dom/svg/SVGTextPathElementImpl.java
new file mode 100644
index 000000000..0394d1f4c
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGTextPathElementImpl.java
@@ -0,0 +1,66 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+/**
+ *
+ */
+public class SVGTextPathElementImpl extends SVGElementImpl {
+ public String pathLink;
+ public String str;
+
+ public SVGTextPathElementImpl(String s, String con)
+ {
+ pathLink = s;
+ str = con;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGTitleElementImpl.java b/src/org/apache/fop/dom/svg/SVGTitleElementImpl.java
new file mode 100644
index 000000000..935cbf693
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGTitleElementImpl.java
@@ -0,0 +1,63 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ * class representing a line in an SVG Area
+ */
+public class SVGTitleElementImpl extends GraphicElement implements SVGTitleElement {
+ public SVGTitleElementImpl()
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGTransformImpl.java b/src/org/apache/fop/dom/svg/SVGTransformImpl.java
new file mode 100644
index 000000000..d4d1d640e
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGTransformImpl.java
@@ -0,0 +1,122 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Fop" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+import org.apache.fop.fo.Property;
+
+import java.util.*;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ */
+public class SVGTransformImpl implements SVGTransform {
+ short type;
+ SVGMatrix matrix = new SVGMatrixImpl();
+
+ public SVGTransformImpl()
+ {
+ }
+
+ public short getType( )
+ {
+ return type;
+ }
+
+ public SVGMatrix getMatrix( )
+ {
+ return matrix;
+ }
+
+ public SVGAngle getAngle( )
+ {
+ return null;
+ }
+
+ public void setMatrix ( SVGMatrix matrix )
+ throws SVGException
+ {
+ this.matrix = matrix;
+ }
+
+ public void setTranslate ( SVGLength tx, SVGLength ty )
+ throws SVGException
+ {
+ matrix.setE(tx);
+ matrix.setF(ty);
+ }
+
+ public void setScale ( SVGNumber sx, SVGNumber sy )
+ throws SVGException
+ {
+ matrix.setA(sx.getValue());
+ matrix.setD(sy.getValue());
+ }
+
+ public void setRotate ( SVGAngle angle )
+ throws SVGException
+ {
+ matrix = matrix.rotate(angle);
+ }
+
+ public void setSkewX ( SVGAngle angle )
+ throws SVGException
+ {
+ matrix = matrix.skewX(angle);
+ }
+
+ public void setSkewY ( SVGAngle angle )
+ throws SVGException
+ {
+ matrix = matrix.skewY(angle);
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGTransformListImpl.java b/src/org/apache/fop/dom/svg/SVGTransformListImpl.java
new file mode 100644
index 000000000..c4a22d487
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGTransformListImpl.java
@@ -0,0 +1,86 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+package org.apache.fop.dom.svg;
+
+import java.util.*;
+
+import org.w3c.dom.svg.*;
+import org.w3c.dom.*;
+
+/**
+ * Transform List
+ */
+public class SVGTransformListImpl extends SVGListImpl implements SVGTransformList {
+ public SVGTransform createSVGTransformFromMatrix ( SVGMatrix matrix )
+ throws SVGException
+ {
+ SVGTransform st = new SVGTransformImpl();
+ st.setMatrix(matrix);
+ return st;
+ }
+
+ public SVGTransform consolidate()
+ {
+ SVGMatrix matrix = new SVGMatrixImpl();
+ for(int count = 0; count < getNumberOfItems(); count++) {
+ SVGMatrix mat = ((SVGTransform)getItem(count)).getMatrix();
+ matrix = matrix.multiply(mat);
+ }
+ SVGTransform trans = new SVGTransformImpl();
+ trans.setMatrix(matrix);
+ return trans;
+ }
+
+ public Object createItem()
+ {
+ return new SVGTransformImpl();
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGURIReferenceImpl.java b/src/org/apache/fop/dom/svg/SVGURIReferenceImpl.java
new file mode 100644
index 000000000..66bdf6cf1
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGURIReferenceImpl.java
@@ -0,0 +1,123 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+public class SVGURIReferenceImpl extends GraphicElement implements SVGURIReference {
+ String xlinkType;
+ String xlinkRole;
+ String xlinkTitle;
+ String xlinkShow;
+ String xlinkActuate;
+ String href;
+
+ public String getXlinkType( )
+ {
+ return xlinkType;
+ }
+
+ public void setXlinkType( String xlinkType )
+ {
+ this.xlinkType = xlinkType;
+ }
+
+ public String getXlinkRole( )
+ {
+ return xlinkRole;
+ }
+
+ public void setXlinkRole( String xlinkRole )
+ {
+ this.xlinkRole = xlinkRole;
+ }
+
+ public String getXlinkTitle( )
+ {
+ return xlinkTitle;
+ }
+
+ public void setXlinkTitle( String xlinkTitle )
+ {
+ this.xlinkTitle = xlinkTitle;
+ }
+
+ public String getXlinkShow( )
+ {
+ return xlinkShow;
+ }
+
+ public void setXlinkShow( String xlinkShow )
+ {
+ this.xlinkShow = xlinkShow;
+ }
+
+ public String getXlinkActuate( )
+ {
+ return xlinkActuate;
+ }
+
+ public void setXlinkActuate( String xlinkActuate )
+ {
+ this.xlinkActuate = xlinkActuate;
+ }
+
+ public String getHref( )
+ {
+ return href;
+ }
+
+ public void setHref( String href )
+ {
+ this.href = href;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGUseElementImpl.java b/src/org/apache/fop/dom/svg/SVGUseElementImpl.java
new file mode 100644
index 000000000..e871af69e
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGUseElementImpl.java
@@ -0,0 +1,157 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ * Use Element
+ *
+ */
+public class SVGUseElementImpl extends GraphicElement implements SVGUseElement {
+ public String link;
+
+ public SVGUseElementImpl(String s)
+ {
+ link = s;
+ }
+
+ public String getXlinkType( )
+ {
+ return null;
+ }
+
+ public void setXlinkType( String xlinkType )
+ {
+ }
+
+ public String getXlinkRole( )
+ {
+ return null;
+ }
+
+ public void setXlinkRole( String xlinkRole )
+ {
+ }
+
+ public String getXlinkTitle( )
+ {
+ return null;
+ }
+
+ public void setXlinkTitle( String xlinkTitle )
+ {
+ }
+
+ public String getXlinkShow( )
+ {
+ return null;
+ }
+
+ public void setXlinkShow( String xlinkShow )
+ {
+ }
+
+ public String getXlinkActuate( )
+ {
+ return null;
+ }
+
+ public void setXlinkActuate( String xlinkActuate )
+ {
+ }
+
+ public String getHref( )
+ {
+ return null;
+ }
+
+ public void setHref( String href )
+ {
+ }
+
+ public SVGLength getX( )
+ {
+ return null;
+ }
+
+ public void setX( SVGLength x )
+ {
+ }
+
+ public SVGLength getY( )
+ {
+ return null;
+ }
+
+ public void setY( SVGLength y )
+ {
+ }
+
+ public SVGLength getWidth( )
+ {
+ return null;
+ }
+
+ public void setWidth( SVGLength width )
+ {
+ }
+
+ public SVGLength getHeight( )
+ {
+ return null;
+ }
+
+ public void setHeight( SVGLength height )
+ {
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGVKernElementImpl.java b/src/org/apache/fop/dom/svg/SVGVKernElementImpl.java
new file mode 100644
index 000000000..befa97e76
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGVKernElementImpl.java
@@ -0,0 +1,65 @@
+/*-- $Id$ --
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+ */
+
+package org.apache.fop.dom.svg;
+
+import org.w3c.dom.svg.*;
+
+/**
+ *
+ *
+ */
+public class SVGVKernElementImpl extends SVGElementImpl implements SVGVKernElement {
+
+ public SVGVKernElementImpl()
+ {
+ }
+}