summaryrefslogtreecommitdiffstats
path: root/client/shadow.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2021-06-26 16:06:40 +0300
committerMavridis Philippe <mavridisf@gmail.com>2021-06-26 16:35:30 +0300
commit2bc11f9dc783f26bf99f44515e92e49e8d2348fc (patch)
treecf09be0be2bd1caea1d7faed0c0afdb7ccc3a45f /client/shadow.cpp
parent9ef5a045dd516e8223b7aa97a46ac94bbd5839ae (diff)
downloadtwin-style-dekorator-2bc11f9dc783f26bf99f44515e92e49e8d2348fc.tar.gz
twin-style-dekorator-2bc11f9dc783f26bf99f44515e92e49e8d2348fc.zip
Conversion Qt3→TQt
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'client/shadow.cpp')
-rw-r--r--client/shadow.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/client/shadow.cpp b/client/shadow.cpp
index d17c936..09b813a 100644
--- a/client/shadow.cpp
+++ b/client/shadow.cpp
@@ -32,7 +32,7 @@
///////////////////////////////////////////////////////////////////////
#include "shadow.h"
-#include <qcolor.h>
+#include <tqcolor.h>
ShadowEngine::ShadowEngine()
{
@@ -44,9 +44,9 @@ ShadowEngine::~ShadowEngine()
{
}
-QImage ShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColor)
+TQImage ShadowEngine::makeShadow(const TQPixmap& textPixmap, const TQColor &bgColor)
{
- QImage result;
+ TQImage result;
// create a new image for for the shaddow
int w = textPixmap.width();
@@ -62,7 +62,7 @@ QImage ShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColor
/*
* This is the source pixmap
*/
- QImage img = textPixmap.convertToImage().convertDepth(32);
+ TQImage img = textPixmap.convertToImage().convertDepth(32);
/*
* Resize the image if necessary
@@ -82,13 +82,13 @@ QImage ShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColor
alphaShadow = decay(img, i, j);
alphaShadow = (alphaShadow > 180.0) ? 180.0 : alphaShadow;
// update the shadow's i,j pixel.
- result.setPixel(i,j, qRgba(bgRed, bgGreen , bgBlue, (int) alphaShadow));
+ result.setPixel(i,j, tqRgba(bgRed, bgGreen , bgBlue, (int) alphaShadow));
}
}
return result;
}
-double ShadowEngine::decay(QImage& source, int i, int j)
+double ShadowEngine::decay(TQImage& source, int i, int j)
{
// create a new image for the shadow
int w = source.width();
@@ -120,7 +120,7 @@ double ShadowEngine::decay(QImage& source, int i, int j)
else
sy = j + m;
- opacity += qGray(source.pixel(sx, sy));
+ opacity += tqGray(source.pixel(sx, sy));
}
}
alphaShadow += opacity / multiplicationFactor_;