From 162183a065be98ec28f9a93125776d4cf8139a1d Mon Sep 17 00:00:00 2001 From: Keiron Liddle Date: Fri, 15 Sep 2000 00:14:35 +0000 Subject: [PATCH] added some more properties to elements git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193697 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/svg/A.java | 2 +- src/org/apache/fop/svg/SVG.java | 9 +++++++++ src/org/apache/fop/svg/SVGElementMapping.java | 4 ++-- src/org/apache/fop/svg/SVGPropertyListMapping.java | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/org/apache/fop/svg/A.java b/src/org/apache/fop/svg/A.java index 8ab3ad016..a3f9cd1db 100644 --- a/src/org/apache/fop/svg/A.java +++ b/src/org/apache/fop/svg/A.java @@ -118,7 +118,7 @@ public class A extends SVGObj { FONode child = (FONode) children.elementAt(i); if(child instanceof GraphicsCreator) { SVGElement impl = ((GraphicsCreator)child).createGraphic(); - graphic.appendChild((GraphicElement)impl); + graphic.appendChild(impl); } else if(child instanceof Defs) { } } diff --git a/src/org/apache/fop/svg/SVG.java b/src/org/apache/fop/svg/SVG.java index e8067faaf..24cc09c4c 100644 --- a/src/org/apache/fop/svg/SVG.java +++ b/src/org/apache/fop/svg/SVG.java @@ -124,6 +124,15 @@ public class SVG extends FObj implements GraphicsCreator { sal = new SVGAnimatedLengthImpl(h); sal.setBaseVal(h); svgArea.setHeight(sal); + SVGLength x = ((SVGLengthProperty)this.properties.get("x")).getSVGLength(); + sal = new SVGAnimatedLengthImpl(x); + sal.setBaseVal(x); + svgArea.setX(sal); + SVGLength y = ((SVGLengthProperty)this.properties.get("y")).getSVGLength(); + sal = new SVGAnimatedLengthImpl(y); + sal.setBaseVal(y); + svgArea.setY(sal); + svgArea.setStyle(((SVGStyle)this.properties.get("style")).getStyle()); svgArea.setTransform(((SVGTransform)this.properties.get("transform")).getTransform()); svgArea.setId(this.properties.get("id").getString()); diff --git a/src/org/apache/fop/svg/SVGElementMapping.java b/src/org/apache/fop/svg/SVGElementMapping.java index 43e5ce005..bdedf174e 100644 --- a/src/org/apache/fop/svg/SVGElementMapping.java +++ b/src/org/apache/fop/svg/SVGElementMapping.java @@ -77,6 +77,7 @@ public class SVGElementMapping implements ElementMapping { builder.addMapping(uri, "tspan", TSpan.maker()); builder.addMapping(uri, "tref", TRef.maker()); builder.addMapping(uri, "image", Image.maker()); + builder.addMapping(uri, "style", Style.maker()); // elements in progress builder.addMapping(uri, "textPath", TextPath.maker()); @@ -87,6 +88,7 @@ public class SVGElementMapping implements ElementMapping { builder.addMapping(uri, "stop", Stop.maker()); builder.addMapping(uri, "a", A.maker()); builder.addMapping(uri, "switch", Switch.maker()); + builder.addMapping(uri, "symbol", Symbol.maker()); // elements below will not work builder.addMapping(uri, "pattern", Pattern.maker()); @@ -99,12 +101,10 @@ public class SVGElementMapping implements ElementMapping { builder.addMapping(uri, "missing-glyph", MissingGlyph.maker()); builder.addMapping(uri, "hkern", HKern.maker()); builder.addMapping(uri, "vkern", VKern.maker()); - builder.addMapping(uri, "symbol", Symbol.maker()); builder.addMapping(uri, "set", Set.maker()); builder.addMapping(uri, "animateMotion", AnimateMotion.maker()); builder.addMapping(uri, "animateColor", AnimateColor.maker()); builder.addMapping(uri, "animateTransform", AnimateTransform.maker()); - builder.addMapping(uri, "style", Style.maker()); builder.addMapping(uri, "cursor", Cursor.maker()); builder.addMapping(uri, "filter", Filter.maker()); } diff --git a/src/org/apache/fop/svg/SVGPropertyListMapping.java b/src/org/apache/fop/svg/SVGPropertyListMapping.java index 10d838410..6be973d17 100644 --- a/src/org/apache/fop/svg/SVGPropertyListMapping.java +++ b/src/org/apache/fop/svg/SVGPropertyListMapping.java @@ -93,7 +93,7 @@ public class SVGPropertyListMapping implements PropertyListMapping { propertyTable.put("transform",SVGTransform.maker()); propertyTable.put("d",SVGD.maker()); propertyTable.put("points",SVGPoints.maker()); -// propertyTable.put("viewBox",SVGBox.maker()); + propertyTable.put("viewBox",ViewBox.maker()); propertyTable.put("xml:space",XMLSpace.maker()); propertyTable.put("font-family",FontFamily.maker()); -- 2.39.5