diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-05-12 20:05:54 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-05-13 23:29:29 +0200 |
commit | cbc13ac0624685582ebd4634812681274db803aa (patch) | |
tree | f9a5e856161f4ea5290cc31ea892843a75d8bcc0 /svx/inc | |
parent | 4907531966880f2bb4bb14b1c159865909000842 (diff) |
tdf#49247: draw soft edges
This factors out the common code for blurring used both in glow and
soft edges into ProcessAndBlurAlphaMask.
Also this reverts commit a98bdbae459ad7341bf7f484c402e77e4062cd16,
since its use was removed from VclPixelProcessor2D.
Change-Id: Icd7fdb06bef3932ff3b9ce7e283b515b15d246a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94087
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx/inc')
4 files changed, 14 insertions, 3 deletions
diff --git a/svx/inc/sdr/attribute/sdreffectstextattribute.hxx b/svx/inc/sdr/attribute/sdreffectstextattribute.hxx index 1c02eda63dd2..7a209c739199 100644 --- a/svx/inc/sdr/attribute/sdreffectstextattribute.hxx +++ b/svx/inc/sdr/attribute/sdreffectstextattribute.hxx @@ -37,11 +37,15 @@ namespace drawinglayer // glow effect SdrGlowAttribute maGlow; + // soft edge + sal_Int32 mnSoftEdgeRadius = 0; + public: SdrEffectsTextAttribute( const SdrShadowAttribute& rShadow, const SdrTextAttribute& rTextAttribute, - const SdrGlowAttribute& rGlow); + const SdrGlowAttribute& rGlow, + sal_Int32 nSoftEdgeRadius); SdrEffectsTextAttribute(); SdrEffectsTextAttribute(const SdrEffectsTextAttribute& rCandidate); SdrEffectsTextAttribute& operator=(const SdrEffectsTextAttribute& rCandidate); @@ -56,6 +60,7 @@ namespace drawinglayer const SdrShadowAttribute& getShadow() const { return maShadow; } const SdrTextAttribute& getText() const { return maTextAttribute; } const SdrGlowAttribute& getGlow() const { return maGlow; } + sal_Int32 getSoftEdgeRadius() const { return mnSoftEdgeRadius; } }; } // end of namespace attribute } // end of namespace drawinglayer diff --git a/svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx b/svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx index ce9e0223c201..c53650bfcff2 100644 --- a/svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx +++ b/svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx @@ -41,7 +41,8 @@ namespace drawinglayer const SdrLineStartEndAttribute& rLineStartEnd, const SdrShadowAttribute& rShadow, const SdrTextAttribute& rTextAttribute, - const SdrGlowAttribute& rGlow); + const SdrGlowAttribute& rGlow, + sal_Int32 nSoftEdgeRadius); SdrLineEffectsTextAttribute(); SdrLineEffectsTextAttribute(const SdrLineEffectsTextAttribute& rCandidate); SdrLineEffectsTextAttribute& operator=(const SdrLineEffectsTextAttribute& rCandidate); diff --git a/svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx b/svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx index d590378bf4c5..7fb25a4f5936 100644 --- a/svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx +++ b/svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx @@ -42,7 +42,8 @@ namespace drawinglayer const SdrShadowAttribute& rShadow, const FillGradientAttribute& rFillFloatTransGradient, const SdrTextAttribute& rTextAttribute, - const SdrGlowAttribute& rGlow); + const SdrGlowAttribute& rGlow, + sal_Int32 nSoftEdgeRadius); SdrLineFillEffectsTextAttribute(); SdrLineFillEffectsTextAttribute(const SdrLineFillEffectsTextAttribute& rCandidate); SdrLineFillEffectsTextAttribute& operator=(const SdrLineFillEffectsTextAttribute& rCandidate); diff --git a/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx b/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx index d991eb4ed2f3..e619206303ca 100644 --- a/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx +++ b/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx @@ -78,6 +78,10 @@ namespace drawinglayer const Primitive2DContainer& rContent, const attribute::SdrGlowAttribute& rGlow); + Primitive2DContainer SVXCORE_DLLPUBLIC createEmbeddedSoftEdgePrimitive( + const Primitive2DContainer& rContent, + sal_Int32 nRadius); + } // end of namespace primitive2d } // end of namespace drawinglayer |