aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2000-09-15 00:21:35 +0000
committerKeiron Liddle <keiron@apache.org>2000-09-15 00:21:35 +0000
commit3b4d27ab77fbd9f0e4db530d776d99fee7953f03 (patch)
tree81ab8d0f9558e4422f38652474e7c8e5cb71c504
parent3924271082ba2f46ebe0b4c0ece91552cdca3785 (diff)
downloadxmlgraphics-fop-3b4d27ab77fbd9f0e4db530d776d99fee7953f03.tar.gz
xmlgraphics-fop-3b4d27ab77fbd9f0e4db530d776d99fee7953f03.zip
better handling of symbol and use elements
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193701 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/org/apache/fop/dom/svg/SVGAnimatedRectImpl.java78
-rw-r--r--src/org/apache/fop/dom/svg/SVGDocumentImpl.java2
-rw-r--r--src/org/apache/fop/dom/svg/SVGListImpl.java5
-rw-r--r--src/org/apache/fop/dom/svg/SVGSVGElementImpl.java16
-rw-r--r--src/org/apache/fop/dom/svg/SVGSymbolElementImpl.java8
-rw-r--r--src/org/apache/fop/dom/svg/SVGUseElementImpl.java16
6 files changed, 116 insertions, 9 deletions
diff --git a/src/org/apache/fop/dom/svg/SVGAnimatedRectImpl.java b/src/org/apache/fop/dom/svg/SVGAnimatedRectImpl.java
new file mode 100644
index 000000000..5ddc97a62
--- /dev/null
+++ b/src/org/apache/fop/dom/svg/SVGAnimatedRectImpl.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 org.w3c.dom.svg.*;
+
+public class SVGAnimatedRectImpl implements SVGAnimatedRect {
+ SVGRect rect = null;
+
+ public SVGAnimatedRectImpl(SVGRect r)
+ {
+ rect = r;
+ }
+
+ public SVGRect getBaseVal( )
+ {
+ return rect;
+ }
+
+ public void setBaseVal( SVGRect baseVal )
+ {
+ rect = baseVal;
+ }
+
+ public SVGRect getAnimVal( )
+ {
+ return rect;
+ }
+}
diff --git a/src/org/apache/fop/dom/svg/SVGDocumentImpl.java b/src/org/apache/fop/dom/svg/SVGDocumentImpl.java
index 15b5589b1..70be48f48 100644
--- a/src/org/apache/fop/dom/svg/SVGDocumentImpl.java
+++ b/src/org/apache/fop/dom/svg/SVGDocumentImpl.java
@@ -63,7 +63,7 @@ import org.w3c.dom.events.*;
*/
public class SVGDocumentImpl extends ElementImpl implements SVGDocument {
String title;
- public static final String namespaceURI = "http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd";
+ public static final String namespaceURI = "http://www.w3.org/2000/svg";
public SVGDocumentImpl()
{
diff --git a/src/org/apache/fop/dom/svg/SVGListImpl.java b/src/org/apache/fop/dom/svg/SVGListImpl.java
index 360f757ac..2f519193c 100644
--- a/src/org/apache/fop/dom/svg/SVGListImpl.java
+++ b/src/org/apache/fop/dom/svg/SVGListImpl.java
@@ -115,4 +115,9 @@ public class SVGListImpl implements SVGList {
list.addElement(newItem);
return null;
}
+
+ public String toString()
+ {
+ return list.toString();
+ }
}
diff --git a/src/org/apache/fop/dom/svg/SVGSVGElementImpl.java b/src/org/apache/fop/dom/svg/SVGSVGElementImpl.java
index fc1fb3b8f..8c5c69f40 100644
--- a/src/org/apache/fop/dom/svg/SVGSVGElementImpl.java
+++ b/src/org/apache/fop/dom/svg/SVGSVGElementImpl.java
@@ -71,6 +71,8 @@ import org.w3c.dom.*;
*
*/
public class SVGSVGElementImpl extends GraphicElement implements SVGSVGElement {
+ SVGAnimatedLength x;
+ SVGAnimatedLength y;
SVGAnimatedLength width;
SVGAnimatedLength height;
@@ -80,12 +82,12 @@ public class SVGSVGElementImpl extends GraphicElement implements SVGSVGElement {
public SVGAnimatedLength getX( )
{
- return null;
+ return x;
}
public SVGAnimatedLength getY( )
{
- return null;
+ return y;
}
public SVGAnimatedLength getWidth( )
@@ -108,6 +110,16 @@ public class SVGSVGElementImpl extends GraphicElement implements SVGSVGElement {
height = h;
}
+ public void setX(SVGAnimatedLength x)
+ {
+ this.x = x;
+ }
+
+ public void setY(SVGAnimatedLength y)
+ {
+ this.y = y;
+ }
+
public SVGRect getViewport( )
{
return null;
diff --git a/src/org/apache/fop/dom/svg/SVGSymbolElementImpl.java b/src/org/apache/fop/dom/svg/SVGSymbolElementImpl.java
index cf0e4a7a7..5cc318de5 100644
--- a/src/org/apache/fop/dom/svg/SVGSymbolElementImpl.java
+++ b/src/org/apache/fop/dom/svg/SVGSymbolElementImpl.java
@@ -57,6 +57,8 @@ import org.w3c.dom.svg.*;
*
*/
public class SVGSymbolElementImpl extends GraphicElement implements SVGSymbolElement {
+ SVGAnimatedRect viewBox;
+ SVGAnimatedPreserveAspectRatio preserveAspectRatio;
public SVGSymbolElementImpl()
{
@@ -64,19 +66,21 @@ public class SVGSymbolElementImpl extends GraphicElement implements SVGSymbolEle
public SVGAnimatedRect getViewBox()
{
- return null;
+ return viewBox;
}
public void setViewBox(SVGAnimatedRect viewBox)
{
+ this.viewBox = viewBox;
}
public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio( )
{
- return null;
+ return preserveAspectRatio;
}
public void setPreserveAspectRatio(SVGAnimatedPreserveAspectRatio preserveAspectRatio)
{
+ this.preserveAspectRatio = preserveAspectRatio;
}
}
diff --git a/src/org/apache/fop/dom/svg/SVGUseElementImpl.java b/src/org/apache/fop/dom/svg/SVGUseElementImpl.java
index 4ddb21278..6de276cbf 100644
--- a/src/org/apache/fop/dom/svg/SVGUseElementImpl.java
+++ b/src/org/apache/fop/dom/svg/SVGUseElementImpl.java
@@ -60,6 +60,10 @@ import org.w3c.dom.svg.*;
public class SVGUseElementImpl extends GraphicElement implements SVGUseElement {
public String link;
String xlinkArcRole;
+ SVGAnimatedLength x;
+ SVGAnimatedLength y;
+ SVGAnimatedLength width;
+ SVGAnimatedLength height;
public SVGUseElementImpl(String s)
{
@@ -132,38 +136,42 @@ public class SVGUseElementImpl extends GraphicElement implements SVGUseElement {
public SVGAnimatedLength getX( )
{
- return null;
+ return x;
}
public void setX( SVGAnimatedLength x )
{
+ this.x = x;
}
public SVGAnimatedLength getY( )
{
- return null;
+ return y;
}
public void setY( SVGAnimatedLength y )
{
+ this.y = y;
}
public SVGAnimatedLength getWidth( )
{
- return null;
+ return width;
}
public void setWidth( SVGAnimatedLength width )
{
+ this.width = width;
}
public SVGAnimatedLength getHeight( )
{
- return null;
+ return height;
}
public void setHeight( SVGAnimatedLength height )
{
+ this.height = height;
}
public SVGElementInstance getInstanceRoot( )