aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/svg/G.java
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2000-08-28 23:54:26 +0000
committerKeiron Liddle <keiron@apache.org>2000-08-28 23:54:26 +0000
commit439f2e573db6508b7a42c70bbdb1e69c5c118bf3 (patch)
treeae6cfac1bb3c63f05500564494e270d765b9773e /src/org/apache/fop/svg/G.java
parent63c75fe06d7ea5c2b25a5c3bfed74c5f1d021efc (diff)
downloadxmlgraphics-fop-439f2e573db6508b7a42c70bbdb1e69c5c118bf3.tar.gz
xmlgraphics-fop-439f2e573db6508b7a42c70bbdb1e69c5c118bf3.zip
remove layout and makes all elements return an SVGElement
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193674 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/svg/G.java')
-rw-r--r--src/org/apache/fop/svg/G.java38
1 files changed, 10 insertions, 28 deletions
diff --git a/src/org/apache/fop/svg/G.java b/src/org/apache/fop/svg/G.java
index 8adcdb32b..f857a91f1 100644
--- a/src/org/apache/fop/svg/G.java
+++ b/src/org/apache/fop/svg/G.java
@@ -59,11 +59,14 @@ import org.apache.fop.apps.FOPException;
import org.apache.fop.dom.svg.*;
import org.apache.fop.dom.svg.SVGArea;
+
+import org.w3c.dom.svg.SVGElement;
+
/**
* class representing svg:G pseudo flow object.
*
*/
-public class G extends FObj implements GraphicsCreator {
+public class G extends SVGObj {
/**
* inner class for making G objects.
@@ -106,44 +109,23 @@ public class G extends FObj implements GraphicsCreator {
SVGGElementImpl ggraphic = new SVGGElementImpl();
- public GraphicImpl createGraphic()
+ public SVGElement createGraphic()
{
- ggraphic.setTransform(((SVGTransform)this.properties.get("transform")).oldgetTransform());
+ ggraphic.setTransform(((SVGTransform)this.properties.get("transform")).getTransform());
ggraphic.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
ggraphic.setId(this.properties.get("id").getString());
int numChildren = this.children.size();
for (int i = 0; i < numChildren; i++) {
FONode child = (FONode) children.elementAt(i);
if(child instanceof GraphicsCreator) {
- GraphicImpl impl = ((GraphicsCreator)child).createGraphic();
- ggraphic.addGraphic(impl);
+ SVGElement impl = ((GraphicsCreator)child).createGraphic();
+ if(impl != null)
+ ggraphic.appendChild(impl);
} else if(child instanceof Defs) {
// System.out.println(child);
- ggraphic.addDefs(((Defs)child).createDefs());
+// ggraphic.addDefs(((Defs)child).createDefs());
}
}
return ggraphic;
}
-
- /**
- * layout this formatting object.
- *
- * @param area the area to layout the object into
- *
- * @return the status of the layout
- */
- public Status layout(Area area) throws FOPException
- {
- /* if the area this is being put into is an SVGArea */
- if (area instanceof SVGArea) {
- /* add a G to the SVGArea */
- ((SVGArea) area).addGraphic(createGraphic());
- } else {
- /* otherwise generate a warning */
- System.err.println("WARNING: svg:g outside svg:svg");
- }
-
- /* return status */
- return new Status(Status.OK);
- }
}