From 312993b66dba88c364833ee8a83c3b46740ce73c Mon Sep 17 00:00:00 2001 From: Finn Bock Date: Thu, 29 Jan 2004 19:37:02 +0000 Subject: [PATCH] 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 --- .../fop/fo/properties/CommonBorderAndPadding.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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) + ", " + -- 2.39.5