diff options
author | Karen Lease <klease@apache.org> | 2001-10-14 20:44:37 +0000 |
---|---|---|
committer | Karen Lease <klease@apache.org> | 2001-10-14 20:44:37 +0000 |
commit | 10f1a6a4047c3f0ddc3e8ba69e4660d8cf907f83 (patch) | |
tree | 88bff2a424b60d7b1387edf300a03b56d491c565 /src/org/apache/fop/layout | |
parent | 93f018a104010262c09115de87dfb6013279b393 (diff) | |
download | xmlgraphics-fop-10f1a6a4047c3f0ddc3e8ba69e4660d8cf907f83.tar.gz xmlgraphics-fop-10f1a6a4047c3f0ddc3e8ba69e4660d8cf907f83.zip |
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
Diffstat (limited to 'src/org/apache/fop/layout')
-rw-r--r-- | src/org/apache/fop/layout/BlockArea.java | 12 |
1 files changed, 11 insertions, 1 deletions
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() { |