aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFinn Bock <bckfnn@apache.org>2004-01-29 19:37:02 +0000
committerFinn Bock <bckfnn@apache.org>2004-01-29 19:37:02 +0000
commit312993b66dba88c364833ee8a83c3b46740ce73c (patch)
tree5a5624102edea63466d1cebeda511447a7fc16fe
parent977d7d0b6e2422742404aabb44b6726edc7fa1e2 (diff)
downloadxmlgraphics-fop-312993b66dba88c364833ee8a83c3b46740ce73c.tar.gz
xmlgraphics-fop-312993b66dba88c364833ee8a83c3b46740ce73c.zip
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
-rw-r--r--src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java13
1 files changed, 12 insertions, 1 deletions
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) + ", " +