summaryrefslogtreecommitdiff
path: root/cui/source/dialogs/cuigrfflt.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/dialogs/cuigrfflt.cxx')
-rw-r--r--cui/source/dialogs/cuigrfflt.cxx51
1 files changed, 51 insertions, 0 deletions
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index c1b3ad4067d1..f074e1779f66 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -245,6 +245,57 @@ Graphic GraphicFilterMosaic::GetFilteredGraphic( const Graphic& rGraphic,
}
// ------------------
+// - GraphicFilterSmooth -
+// ------------------
+
+GraphicFilterSmooth::GraphicFilterSmooth( Window* pParent, const Graphic& rGraphic, double nRadius) :
+ GraphicFilterDialog ( pParent, CUI_RES( RID_SVX_GRFFILTER_DLG_SMOOTH ), rGraphic ),
+ maFtRadius ( this, CUI_RES( DLG_FILTERSMOOTH_FT_RADIUS ) ),
+ maMtrRadius ( this, CUI_RES( DLG_FILTERSMOOTH_MTR_RADIUS ) )
+{
+ FreeResource();
+
+ maMtrRadius.SetValue( nRadius* 10 );
+ maMtrRadius.SetModifyHdl( GetModifyHdl() );
+ maMtrRadius.GrabFocus();
+}
+
+// -----------------------------------------------------------------------------
+
+GraphicFilterSmooth::~GraphicFilterSmooth()
+{
+}
+
+// -----------------------------------------------------------------------------
+
+Graphic GraphicFilterSmooth::GetFilteredGraphic( const Graphic& rGraphic, double /*fScaleX*/, double /*fScaleY*/ )
+{
+ Graphic aRet;
+ BmpFilterParam aParam( GetRadius() );
+
+ if( rGraphic.IsAnimated() )
+ {
+ Animation aAnim( rGraphic.GetAnimation() );
+
+ if( aAnim.Filter( BMP_FILTER_SMOOTH, &aParam ) )
+ {
+ aRet = aAnim;
+ }
+ }
+ else
+ {
+ BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
+
+ if( aBmpEx.Filter( BMP_FILTER_SMOOTH, &aParam ) )
+ {
+ aRet = aBmpEx;
+ }
+ }
+
+ return aRet;
+}
+
+// ------------------
// - GraphicFilterSolarize -
// ------------------