summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2020-12-26 11:26:37 +1100
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-08 08:24:42 +0100
commitc8d564094ecb6e82ed924217651a8f88ce5039c8 (patch)
tree11fe3d95bdbe4547e0a442e6bd4027036cf52224 /include/vcl
parentf2171af6ce3516598d9f8bac8294025a21a5b1a2 (diff)
vcl: migrate OutputDevice::DrawShadowBitmapEx() to BitmapShadowFilter
Change-Id: I5d8b92d91530feed92dcdf2e384448b05eebdb0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108315 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/BitmapShadowFilter.hxx31
-rw-r--r--include/vcl/outdev.hxx3
2 files changed, 31 insertions, 3 deletions
diff --git a/include/vcl/BitmapShadowFilter.hxx b/include/vcl/BitmapShadowFilter.hxx
new file mode 100644
index 000000000000..d4a3207a13b1
--- /dev/null
+++ b/include/vcl/BitmapShadowFilter.hxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+#include <vcl/BitmapFilter.hxx>
+
+/** If the alpha is beyond a certain threshold, make it fully transparent
+ */
+class VCL_DLLPUBLIC BitmapShadowFilter final : public BitmapFilter
+{
+public:
+ BitmapShadowFilter(Color aShadowColor)
+ : maShadowColor(aShadowColor)
+ {
+ }
+
+ virtual BitmapEx execute(BitmapEx const& rBitmapEx) const override;
+
+private:
+ Color maShadowColor;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index b909875a380f..d2e21fb0324c 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1482,9 +1482,6 @@ public:
const basegfx::B2DHomMatrix& rTransformation,
const BitmapEx& rBitmapEx);
- void DrawShadowBitmapEx(
- const BitmapEx& rBitmapEx,
- ::Color aShadowColor);
protected:
virtual void DrawDeviceBitmap(