summaryrefslogtreecommitdiff
path: root/include/tools
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2020-12-24 10:13:09 +1100
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-26 19:23:42 +0100
commit43978d8f25a41c20c72d93cc3cb972c93c52674a (patch)
tree27dff744dc494a4ca500de87a2d1ede886e08090 /include/tools
parenta5c1a64555ed0aebc2610ae874bff4713be366a7 (diff)
tools: add Color::IsTransparent()
This removes the need for OutputDevice::ImplIsColorTransparent(). Change-Id: I8f98199c5ce1c171c453b6897f27eacbd53f1eea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108248 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/tools')
-rw-r--r--include/tools/color.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/tools/color.hxx b/include/tools/color.hxx
index 99966c65d779..964e8ca8d157 100644
--- a/include/tools/color.hxx
+++ b/include/tools/color.hxx
@@ -142,6 +142,14 @@ public:
return A;
}
+ /** Is the color transparent?
+ * @returns true or false
+ */
+ bool IsTransparent() const
+ {
+ return (GetTransparency() != 0);
+ }
+
/** Sets the red value.
* @param nRed
*/