diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2020-12-24 10:13:09 +1100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-26 19:23:42 +0100 |
commit | 43978d8f25a41c20c72d93cc3cb972c93c52674a (patch) | |
tree | 27dff744dc494a4ca500de87a2d1ede886e08090 /include/tools/color.hxx | |
parent | a5c1a64555ed0aebc2610ae874bff4713be366a7 (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/color.hxx')
-rw-r--r-- | include/tools/color.hxx | 8 |
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 */ |