summaryrefslogtreecommitdiff
path: root/cui/source/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r--cui/source/dialogs/cuigrfflt.cxx51
-rw-r--r--cui/source/dialogs/grfflt.hrc7
-rw-r--r--cui/source/dialogs/grfflt.src72
3 files changed, 130 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 -
// ------------------
diff --git a/cui/source/dialogs/grfflt.hrc b/cui/source/dialogs/grfflt.hrc
index 94d7f8fe392f..c0a980f9a8e3 100644
--- a/cui/source/dialogs/grfflt.hrc
+++ b/cui/source/dialogs/grfflt.hrc
@@ -49,6 +49,13 @@
#define DLG_FILTERMOSAIC_CBX_EDGES 5
// ----------------------
+// - DLG_FILTERSMOOTH -
+// ----------------------
+
+#define DLG_FILTERSMOOTH_FT_RADIUS 1
+#define DLG_FILTERSMOOTH_MTR_RADIUS 2
+
+// ----------------------
// - DLG_FILTERSOLARIZE -
// ----------------------
diff --git a/cui/source/dialogs/grfflt.src b/cui/source/dialogs/grfflt.src
index c13eaf373b2a..8bb22b9d247e 100644
--- a/cui/source/dialogs/grfflt.src
+++ b/cui/source/dialogs/grfflt.src
@@ -428,3 +428,75 @@ ModalDialog RID_SVX_GRFFILTER_DLG_EMBOSS
TabStop = TRUE ;
};
};
+
+// --------------------
+// - DLG_FILTERSMOOTH -
+// --------------------
+
+ModalDialog RID_SVX_GRFFILTER_DLG_SMOOTH
+{
+ HelpID = CMD_SID_GRFFILTER_SMOOTH;
+ OutputSize = TRUE ;
+ Moveable = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 250, 100 ) ;
+
+ Text [ en-US ] = "Smooth" ;
+
+ FixedLine FL_PARAMETER
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 182, RSC_CD_FIXEDLINE_HEIGHT ) ;
+ Text [ en-US ] = "Parameters";
+ };
+ Control CTL_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 104 , 3 + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP ) ;
+ Size = MAP_APPFONT ( 81, 73 ) ;
+ };
+#define MA_Y14 3 + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP
+ FixedText DLG_FILTERSMOOTH_FT_RADIUS
+ {
+ Pos = MAP_APPFONT ( 12 , MA_Y14 ) ;
+ Size = MAP_APPFONT ( 77 , 10 ) ;
+ Text [ en-US ] = "Smooth Radius" ;
+ };
+#define MA_Y15 MA_Y14 + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_DESC_Y
+ NumericField DLG_FILTERSMOOTH_MTR_RADIUS
+ {
+ HelpID = "cui:NumericField:RID_SVX_GRFFILTER_DLG_SMOOTH:DLG_FILTERSMOOTH_MTR_RADIUS";
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , MA_Y15 );
+ Size = MAP_APPFONT ( 35 , 12 );
+ TabStop = TRUE;
+ Right = TRUE;
+ Repeat = TRUE;
+ Spin = TRUE;
+ Minimum = 0;
+ Maximum = 1000;
+ StrictFormat = TRUE;
+ First = 1;
+ DecimalDigits = 1;
+ Last = 1000;
+ SpinSize = 2;
+ };
+ OKButton BTN_OK
+ {
+ Pos = MAP_APPFONT ( 194, 6 ) ;
+ Size = MAP_APPFONT ( 50, 14 ) ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 194, 23 ) ;
+ Size = MAP_APPFONT ( 50, 14 ) ;
+ TabStop = TRUE ;
+ };
+ HelpButton BTN_HELP
+ {
+ Pos = MAP_APPFONT ( 194, 43 ) ;
+ Size = MAP_APPFONT ( 50, 14 ) ;
+ TabStop = TRUE ;
+ };
+};