diff options
author | Keiron Liddle <keiron@apache.org> | 2000-11-08 05:08:34 +0000 |
---|---|---|
committer | Keiron Liddle <keiron@apache.org> | 2000-11-08 05:08:34 +0000 |
commit | d9a4798d5dd355f282f13ade19addbf19f7a954a (patch) | |
tree | af9d3d2d290f45eb56837b94ac799f86ac702bd9 /src/org/apache | |
parent | 35dae507c6e3064bbb05ecc2db183db08ce453b9 (diff) | |
download | xmlgraphics-fop-d9a4798d5dd355f282f13ade19addbf19f7a954a.tar.gz xmlgraphics-fop-d9a4798d5dd355f282f13ade19addbf19f7a954a.zip |
creates pattern graphic
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193747 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache')
-rw-r--r-- | src/org/apache/fop/svg/Pattern.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/org/apache/fop/svg/Pattern.java b/src/org/apache/fop/svg/Pattern.java index 73ae9ae4d..9d8da25ad 100644 --- a/src/org/apache/fop/svg/Pattern.java +++ b/src/org/apache/fop/svg/Pattern.java @@ -59,6 +59,8 @@ import org.apache.fop.apps.FOPException; import org.apache.fop.dom.svg.*; import org.apache.fop.dom.svg.SVGArea; + +import org.w3c.dom.svg.*; /** * class representing svg:Pattern pseudo flow object. * @@ -103,4 +105,27 @@ public class Pattern extends SVGObj { super(parent, propertyList); this.name = "svg:pattern"; } + + public SVGElement createGraphic() { + SVGPatternElement pattern = new SVGPatternElementImpl(); +// pattern.setStyle( +// ((SVGStyle) this.properties.get("style")).getStyle()); +// pattern.setTransform( +// ((SVGTransform) this.properties.get("transform")). +// getTransform()); + pattern.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) { + SVGElement impl = ((GraphicsCreator)child).createGraphic(); + if(impl != null) { + if(impl instanceof SVGElementImpl) + ((SVGElementImpl)impl).setClassName(new SVGAnimatedStringImpl(((FObj)child).getProperty("class").getString())); + pattern.appendChild(impl); + } + } + } + return pattern; + } } |