diff options
-rw-r--r-- | src/java/org/apache/fop/area/BlockAllocationRectangle.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/area/BlockAllocationRectangle.java b/src/java/org/apache/fop/area/BlockAllocationRectangle.java index 9bc2d987c..ca66ddf78 100644 --- a/src/java/org/apache/fop/area/BlockAllocationRectangle.java +++ b/src/java/org/apache/fop/area/BlockAllocationRectangle.java @@ -27,6 +27,10 @@ package org.apache.fop.area; public class BlockAllocationRectangle extends AreaFrame implements AllocationRectangle { + private PaddingRectangle padding; + private BorderRectangle borders; + private SpacesRectangle spaces; + /** * @param area * @param contents @@ -43,13 +47,16 @@ public class BlockAllocationRectangle extends AreaFrame implements // Now extend the AreaFrame to co-incide with the // edges of the border rectangle in the BPDir, and with the edges of // the spaces rectangle in the IPDir. - PaddingRectangle padding = area.getPadding(); - BorderRectangle borders = area.getBorders(); - SpacesRectangle spaces = area.getSpaces(); + padding = area.getPadding(); + borders = area.getBorders(); + spaces = area.getSpaces(); + setAllocationFrame(); + } + + public void setAllocationFrame() { setStart(spaces.getStart() + borders.getStart() + padding.getStart()); setEnd(spaces.getEnd() + borders.getEnd() + padding.getEnd()); setBefore(borders.getBefore() + padding.getBefore()); setAfter(borders.getAfter() + padding.getAfter()); } - } |