summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2020-04-14 15:49:28 +0300
committerMiklos Vajna <vmiklos@collabora.com>2020-05-12 09:56:10 +0200
commit7e54295440438b608cb12d5f62896839ca070fab (patch)
tree50fbb27fd2363fc1b4da8a2c2f3e8c5d684c6e2d /drawinglayer
parent42a4789a5acb260b819d51b1bd87747b81453b74 (diff)
tdf#130058 Import shadow size.
Change-Id: Ie1cee377a33567088fb76ea47f0e6fc51d47f0fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92188 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93419 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Miklos Vajna <vmiklos@collabora.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 0075cf4c2ba7..7957d4a5cc8e 100644
--- a/drawinglayer/source/attribute/sdrshadowattribute.cxx
+++ b/drawinglayer/source/attribute/sdrshadowattribute.cxx
@@ -32,14 +32,17 @@ namespace drawinglayer
public:
// shadow definitions
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.
basegfx::BColor maColor; // color of shadow
ImpSdrShadowAttribute(
const basegfx::B2DVector& rOffset,
+ const basegfx::B2DVector& rSize,
double fTransparence,
const basegfx::BColor& rColor)
: maOffset(rOffset),
+ maSize(rSize),
mfTransparence(fTransparence),
maColor(rColor)
{
@@ -47,6 +50,7 @@ namespace drawinglayer
ImpSdrShadowAttribute()
: maOffset(basegfx::B2DVector()),
+ maSize(basegfx::B2DVector()),
mfTransparence(0.0),
maColor(basegfx::BColor())
{
@@ -54,12 +58,14 @@ namespace drawinglayer
// data read access
const basegfx::B2DVector& getOffset() const { return maOffset; }
+ const basegfx::B2DVector& getSize() const { return maSize; }
double getTransparence() const { return mfTransparence; }
const basegfx::BColor& getColor() const { return maColor; }
bool operator==(const ImpSdrShadowAttribute& rCandidate) const
{
return (getOffset() == rCandidate.getOffset()
+ && getSize() == rCandidate.getSize()
&& getTransparence() == rCandidate.getTransparence()
&& getColor() == rCandidate.getColor());
}
@@ -74,10 +80,11 @@ namespace drawinglayer
SdrShadowAttribute::SdrShadowAttribute(
const basegfx::B2DVector& rOffset,
+ const basegfx::B2DVector& rSize,
double fTransparence,
const basegfx::BColor& rColor)
: mpSdrShadowAttribute(ImpSdrShadowAttribute(
- rOffset, fTransparence, rColor))
+ rOffset, rSize, fTransparence, rColor))
{
}
@@ -115,6 +122,11 @@ namespace drawinglayer
return mpSdrShadowAttribute->getOffset();
}
+ const basegfx::B2DVector& SdrShadowAttribute::getSize() const
+ {
+ return mpSdrShadowAttribute->getSize();
+ }
+
double SdrShadowAttribute::getTransparence() const
{
return mpSdrShadowAttribute->getTransparence();