aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/svg
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2000-08-10 06:46:54 +0000
committerKeiron Liddle <keiron@apache.org>2000-08-10 06:46:54 +0000
commit11fae5f8d1b29d3ef2ebeba5eb123f5f577d4dd4 (patch)
treef769080fee95753be84d9350a38bc9bc5efd2b53 /src/org/apache/fop/svg
parent80cdbad0cd86d16bad8415d166b765deae88fb85 (diff)
downloadxmlgraphics-fop-11fae5f8d1b29d3ef2ebeba5eb123f5f577d4dd4.tar.gz
xmlgraphics-fop-11fae5f8d1b29d3ef2ebeba5eb123f5f577d4dd4.zip
added better size handling
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193625 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/svg')
-rw-r--r--src/org/apache/fop/svg/SVG.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/org/apache/fop/svg/SVG.java b/src/org/apache/fop/svg/SVG.java
index 9c2959224..660af2647 100644
--- a/src/org/apache/fop/svg/SVG.java
+++ b/src/org/apache/fop/svg/SVG.java
@@ -194,13 +194,17 @@ public class SVG extends FObj implements GraphicsCreator {
}
/* create an SVG area */
+ /* if width and height are zero, may want to get the bounds of the content. */
SVGArea svg = new SVGArea(fs, width, height);
svg.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
svg.setTransform(((SVGTransform)this.properties.get("transform")).oldgetTransform());
svg.start();
/* add the SVG area to the containing area */
- ((ForeignObjectArea)area).setObject(svg);
+ ForeignObjectArea foa = (ForeignObjectArea)area;
+ foa.setObject(svg);
+ foa.setIntrinsicWidth(svg.getWidth());
+ foa.setIntrinsicHeight(svg.getHeight());
/* iterate over the child formatting objects and lay them out
into the SVG area */
@@ -216,10 +220,6 @@ public class SVG extends FObj implements GraphicsCreator {
/* finish off the SVG area */
svg.end();
- /* increase the height of the containing area accordingly */
- area.increaseHeight(svg.getHeight());
-// area.setWidth(svg.getWidth());
-
/* return status */
return new Status(Status.OK);
}