diff options
author | Keiron Liddle <keiron@apache.org> | 2000-08-07 06:14:06 +0000 |
---|---|---|
committer | Keiron Liddle <keiron@apache.org> | 2000-08-07 06:14:06 +0000 |
commit | 337a90309c7691be009a27760fe42cdf897d0f5e (patch) | |
tree | 73bf67007173d6bf603d53f0fa3b87dae502440c /src/org/apache/fop/svg/SVG.java | |
parent | 45312bb884255d4e07d4658dd5750f4df0734666 (diff) | |
download | xmlgraphics-fop-337a90309c7691be009a27760fe42cdf897d0f5e.tar.gz xmlgraphics-fop-337a90309c7691be009a27760fe42cdf897d0f5e.zip |
handles page breaking better
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193607 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/svg/SVG.java')
-rw-r--r-- | src/org/apache/fop/svg/SVG.java | 65 |
1 files changed, 1 insertions, 64 deletions
diff --git a/src/org/apache/fop/svg/SVG.java b/src/org/apache/fop/svg/SVG.java index 3a7e6b416..9c2959224 100644 --- a/src/org/apache/fop/svg/SVG.java +++ b/src/org/apache/fop/svg/SVG.java @@ -96,12 +96,8 @@ public class SVG extends FObj implements GraphicsCreator { } FontState fs; - int breakBefore; - int breakAfter; float width; float height; - int spaceBefore; - int spaceAfter; /** * constructs an SVG object (called by Maker). @@ -191,42 +187,10 @@ public class SVG extends FObj implements GraphicsCreator { this.fs = new FontState(area.getFontInfo(), fontFamily, fontStyle, fontWeight, fontSize); - this.breakBefore = this.properties.get("break-before").getEnum(); - this.breakAfter = this.properties.get("break-after").getEnum(); - Property prop = this.properties.get("width"); this.width = ((SVGLengthProperty)this.properties.get("width")).getSVGLength().getValue(); - prop = this.properties.get("height"); this.height = ((SVGLengthProperty)this.properties.get("height")).getSVGLength().getValue(); - this.spaceBefore = - this.properties.get("space-before.optimum").getLength().mvalue(); - this.spaceAfter = - this.properties.get("space-after.optimum").getLength().mvalue(); - /* if the SVG is embedded in a block area */ -// if (area instanceof BlockArea) { - /* temporarily end the block area */ -// area.end(); -// } - this.marker = 0; - -/* if (breakBefore == BreakBefore.PAGE || ((this.height * 1000 + area.getHeight()) > area.getMaxHeight())) { - return new Status(Status.FORCE_PAGE_BREAK); - } - - if (breakBefore == BreakBefore.ODD_PAGE) { - return new Status(Status.FORCE_PAGE_BREAK_ODD); - } - - if (breakBefore == BreakBefore.EVEN_PAGE) { - return new Status(Status.FORCE_PAGE_BREAK_EVEN); - }*/ - } - - /* if there is a space-before */ - if (spaceBefore != 0) { - /* add a display space */ - area.addDisplaySpace(spaceBefore); } /* create an SVG area */ @@ -253,36 +217,9 @@ public class SVG extends FObj implements GraphicsCreator { svg.end(); /* increase the height of the containing area accordingly */ - area.setHeight(svg.getHeight()); + area.increaseHeight(svg.getHeight()); // area.setWidth(svg.getWidth()); - /* if there is a space-after */ -// if (spaceAfter != 0) { - /* add a display space */ -// area.addDisplaySpace(spaceAfter); -// } - - /* if the SVG is embedded in a block area */ -// if (area instanceof BlockArea) { - /* re-start the block area */ -// area.start(); -// } - -/* if (breakAfter == BreakAfter.PAGE) { - this.marker = BREAK_AFTER; - return new Status(Status.FORCE_PAGE_BREAK); - } - - if (breakAfter == BreakAfter.ODD_PAGE) { - this.marker = BREAK_AFTER; - return new Status(Status.FORCE_PAGE_BREAK_ODD); - } - - if (breakAfter == BreakAfter.EVEN_PAGE) { - this.marker = BREAK_AFTER; - return new Status(Status.FORCE_PAGE_BREAK_EVEN); - }*/ - /* return status */ return new Status(Status.OK); } |