summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorA_GAN <ganzouri97@gmail.com>2020-05-17 00:51:09 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-05-29 09:09:58 +0200
commit4c48de44ad933ef6dd19777b3ebf1a51db5e14e3 (patch)
tree3c6089cea08528d59adeb4270c8d289e59b155ae /drawinglayer
parentc05d3f377054f5a7d4f4fb7bc23b0398d6b19347 (diff)
Add blur attributies and definitons into shadow classes and properities
Change-Id: I365f4bcfc8d772ea77cec1e4ce139b9fc16d9d7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95000 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/attribute/sdrshadowattribute.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/drawinglayer/source/attribute/sdrshadowattribute.cxx b/drawinglayer/source/attribute/sdrshadowattribute.cxx
index 01ff66162ea5..9e379acaae28 100644
--- a/drawinglayer/source/attribute/sdrshadowattribute.cxx
+++ b/drawinglayer/source/attribute/sdrshadowattribute.cxx
@@ -32,16 +32,19 @@ namespace drawinglayer::attribute
basegfx::B2DVector maOffset; // shadow offset 1/100th mm
basegfx::B2DVector maSize; // [0.0 .. 2.0]
double mfTransparence; // [0.0 .. 1.0], 0.0==no transp.
+ sal_Int32 mnBlur; // [0 .. 180], radius of the blur
basegfx::BColor maColor; // color of shadow
ImpSdrShadowAttribute(
const basegfx::B2DVector& rOffset,
const basegfx::B2DVector& rSize,
double fTransparence,
+ sal_Int32 nBlur,
const basegfx::BColor& rColor)
: maOffset(rOffset),
maSize(rSize),
mfTransparence(fTransparence),
+ mnBlur(nBlur),
maColor(rColor)
{
}
@@ -50,6 +53,7 @@ namespace drawinglayer::attribute
: maOffset(basegfx::B2DVector()),
maSize(basegfx::B2DVector()),
mfTransparence(0.0),
+ mnBlur(0),
maColor(basegfx::BColor())
{
}
@@ -58,6 +62,7 @@ namespace drawinglayer::attribute
const basegfx::B2DVector& getOffset() const { return maOffset; }
const basegfx::B2DVector& getSize() const { return maSize; }
double getTransparence() const { return mfTransparence; }
+ sal_Int32 getBlur() const { return mnBlur; }
const basegfx::BColor& getColor() const { return maColor; }
bool operator==(const ImpSdrShadowAttribute& rCandidate) const
@@ -65,6 +70,7 @@ namespace drawinglayer::attribute
return (getOffset() == rCandidate.getOffset()
&& getSize() == rCandidate.getSize()
&& getTransparence() == rCandidate.getTransparence()
+ && getBlur() == rCandidate.getBlur()
&& getColor() == rCandidate.getColor());
}
};
@@ -80,9 +86,10 @@ namespace drawinglayer::attribute
const basegfx::B2DVector& rOffset,
const basegfx::B2DVector& rSize,
double fTransparence,
+ sal_Int32 nBlur,
const basegfx::BColor& rColor)
: mpSdrShadowAttribute(ImpSdrShadowAttribute(
- rOffset, rSize, fTransparence, rColor))
+ rOffset, rSize, fTransparence,nBlur, rColor))
{
}
@@ -130,6 +137,11 @@ namespace drawinglayer::attribute
return mpSdrShadowAttribute->getTransparence();
}
+ sal_Int32 SdrShadowAttribute::getBlur() const
+ {
+ return mpSdrShadowAttribute->getBlur();
+ }
+
const basegfx::BColor& SdrShadowAttribute::getColor() const
{
return mpSdrShadowAttribute->getColor();