]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Method for determining if there's a background at all.
authorJeremias Maerki <jeremias@apache.org>
Mon, 7 Feb 2005 10:53:26 +0000 (10:53 +0000)
committerJeremias Maerki <jeremias@apache.org>
Mon, 7 Feb 2005 10:53:26 +0000 (10:53 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198383 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java

index 0a6083530baef7322e15703872b5451e85c5ece2..03cf70c2d34a29bc9efc5ad568996c997374f766 100755 (executable)
@@ -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));
+    }
 }