summaryrefslogtreecommitdiffstats
path: root/kdeui/krootpixmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdeui/krootpixmap.cpp')
-rw-r--r--kdeui/krootpixmap.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/kdeui/krootpixmap.cpp b/kdeui/krootpixmap.cpp
index d583a243d..8dbdf6149 100644
--- a/kdeui/krootpixmap.cpp
+++ b/kdeui/krootpixmap.cpp
@@ -59,6 +59,8 @@ void KRootPixmap::init()
{
d = new KRootPixmapData;
m_Fade = 0;
+ m_BlurRadius = 0;
+ m_BlurSigma = 0;
m_pPixmap = new KSharedPixmap; //ordinary KPixmap on win32
m_pTimer = new TQTimer( this );
m_bInit = false;
@@ -137,6 +139,11 @@ void KRootPixmap::setFadeEffect(double fade, const TQColor &color)
if ( m_bActive && m_bInit ) tqrepaint(true);
}
+void KRootPixmap::setBlurEffect(double radius, double sigma)
+{
+ m_BlurRadius = radius;
+ m_BlurSigma = sigma;
+}
bool KRootPixmap::eventFilter(TQObject *, TQEvent *event)
{
@@ -312,6 +319,14 @@ void KRootPixmap::updateBackground( KSharedPixmap *spm )
pm = io.convertToPixmap(img);
}
+ if ((m_BlurRadius > 1e-6) || (m_BlurSigma > 1e-6))
+ {
+ KPixmapIO io;
+ TQImage img = io.convertToImage(pm);
+ img = KImageEffect::blur(img, m_BlurRadius, m_BlurSigma);
+ pm = io.convertToPixmap(img);
+ }
+
if ( !m_bCustomPaint )
m_pWidget->setBackgroundPixmap( pm );
else {