From: Finn Bock Date: Thu, 29 Jan 2004 19:37:02 +0000 (+0000) Subject: Added getBPPaddingAndBorder() to return the border and padding length in X-Git-Tag: Root_Temp_KnuthStylePageBreaking~882 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=312993b66dba88c364833ee8a83c3b46740ce73c;p=xmlgraphics-fop.git Added getBPPaddingAndBorder() to return the border and padding length in the BP direction. PR: 25802. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197292 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java b/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java index 077b9033c..6f6420fd9 100644 --- a/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java +++ b/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java @@ -213,7 +213,18 @@ public class CommonBorderAndPadding implements Cloneable { return padding[side].iLength; } } - + + /** + * Return all the border and padding height in the block progression + * dimension. + * @param bDiscard the discard flag. + * @return all the padding and border height. + */ + public int getBPPaddingAndBorder(boolean bDiscard) { + return getPaddingBefore(bDiscard) + getPaddingAfter(bDiscard) + + getBorderBeforeWidth(bDiscard) + getBorderAfterWidth(bDiscard); + } + public String toString() { return "CommonBordersAndPadding (Before, After, Start, End):\n" + "Borders: (" + getBorderBeforeWidth(false) + ", " + getBorderAfterWidth(false) + ", " +