From b90d0a9dc8e7b4e6a683b35939a7ce0c3090e888 Mon Sep 17 00:00:00 2001 From: A_GAN Date: Wed, 3 Jun 2020 05:55:46 +0200 Subject: Update ShadowPrimitive2D to support shadow blur MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add attribute for the blur radius and get function. give more range for the shadow depends on the size of the blur radius. update the blur radius to be imported in Hmm and the test function. Change-Id: I32faaf02884d9a6b2f11a9033178b3b6bb419580 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95388 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- include/drawinglayer/primitive2d/shadowprimitive2d.hxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/drawinglayer') diff --git a/include/drawinglayer/primitive2d/shadowprimitive2d.hxx b/include/drawinglayer/primitive2d/shadowprimitive2d.hxx index 4bff4c7aa89c..f384049862a9 100644 --- a/include/drawinglayer/primitive2d/shadowprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/shadowprimitive2d.hxx @@ -24,6 +24,7 @@ #include #include #include +#include namespace drawinglayer::primitive2d @@ -51,17 +52,22 @@ namespace drawinglayer::primitive2d /// the shadow color to which all geometry is to be forced basegfx::BColor maShadowColor; - public: + /// the blur radius of the shadow + double mfShadowBlur; + + + public: /// constructor ShadowPrimitive2D( const basegfx::B2DHomMatrix& rShadowTransform, const basegfx::BColor& rShadowColor, + double fShadowBlur, const Primitive2DContainer& rChildren); /// data read access const basegfx::B2DHomMatrix& getShadowTransform() const { return maShadowTransform; } const basegfx::BColor& getShadowColor() const { return maShadowColor; } - + double getShadowBlur() const { return mfShadowBlur; } /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; -- cgit