diff options
author | A_GAN <ganzouri97@gmail.com> | 2020-06-03 05:55:46 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-06-04 18:43:51 +0200 |
commit | b90d0a9dc8e7b4e6a683b35939a7ce0c3090e888 (patch) | |
tree | 23a05ec72ca8785a2f2ed305f196f16eab8f8656 /include/drawinglayer | |
parent | da8ea444b004a0be36964ae9a778f73e752b2673 (diff) |
Update ShadowPrimitive2D to support shadow blur
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 <quikee@gmail.com>
Diffstat (limited to 'include/drawinglayer')
-rw-r--r-- | include/drawinglayer/primitive2d/shadowprimitive2d.hxx | 10 |
1 files changed, 8 insertions, 2 deletions
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 <drawinglayer/primitive2d/groupprimitive2d.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/color/bcolor.hxx> +#include <tools/color.hxx> 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; |