From: Karen Lease Date: Sun, 14 Oct 2001 20:44:37 +0000 (+0000) Subject: Account for padding and border when calculating space remaining for content X-Git-Tag: fop-0_20_3~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=10f1a6a4047c3f0ddc3e8ba69e4660d8cf907f83;p=xmlgraphics-fop.git Account for padding and border when calculating space remaining for content git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194511 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/layout/BlockArea.java b/src/org/apache/fop/layout/BlockArea.java index 44f6f0c22..fe73f6e99 100644 --- a/src/org/apache/fop/layout/BlockArea.java +++ b/src/org/apache/fop/layout/BlockArea.java @@ -201,8 +201,18 @@ public class BlockArea extends Area { - endIndent; } + /** + * Return the maximum space remaining for this area's content in + * the block-progression-dimension. + * Remove top and bottom padding and spacing since these reduce + * available space for content and they are not yet accounted for + * in the positioning of the object. + */ public int spaceLeft() { - return maxHeight - currentHeight; + // return maxHeight - currentHeight ; + return maxHeight - currentHeight - + (getPaddingTop() + getPaddingBottom() + + getBorderTopWidth() + getBorderBottomWidth()); } public int getHalfLeading() {