From d6f3fb4902d63eeb385cb9c312ac63cc5abf4f76 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Mon, 7 Feb 2005 10:53:26 +0000 Subject: [PATCH] Method for determining if there's a background at all. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198383 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/fo/properties/CommonBorderPaddingBackground.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java b/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java index 0a6083530..03cf70c2d 100755 --- a/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java +++ b/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java @@ -272,4 +272,11 @@ public class CommonBorderPaddingBackground implements Cloneable { "Padding: (" + getPaddingBefore(false) + ", " + getPaddingAfter(false) + ", " + getPaddingStart(false) + ", " + getPaddingEnd(false) + ")\n"; } + + /** + * @return true if there is any kind of background to be painted + */ + public boolean hasBackground() { + return ((backgroundColor != null || getFopImage() != null)); + } } -- 2.39.5