You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by kl...@apache.org on 2001/10/14 22:44:37 UTC
cvs commit: xml-fop/src/org/apache/fop/layout BlockArea.java
klease 01/10/14 13:44:37
Modified: src/org/apache/fop/layout BlockArea.java
Log:
Account for padding and border when calculating space remaining for content
Revision Changes Path
1.31 +12 -2 xml-fop/src/org/apache/fop/layout/BlockArea.java
Index: BlockArea.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/BlockArea.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- BlockArea.java 2001/07/30 20:29:27 1.30
+++ BlockArea.java 2001/10/14 20:44:37 1.31
@@ -1,5 +1,5 @@
/*
- * $Id: BlockArea.java,v 1.30 2001/07/30 20:29:27 tore Exp $
+ * $Id: BlockArea.java,v 1.31 2001/10/14 20:44:37 klease Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
@@ -201,8 +201,18 @@
- 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() {
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org