diff options
author | Mavridis Philippe <[email protected]> | 2021-06-25 19:05:29 +0300 |
---|---|---|
committer | Mavridis Philippe <[email protected]> | 2021-06-25 19:15:54 +0300 |
commit | a26e231b46ac6433f6500ddc9ed6b466cf38cc21 (patch) | |
tree | eca43ec26318abfef06040103c74ccd6f1ac02eb /src/shadow.cpp | |
parent | d5914d4d3223d1bca7b1b845a229af9f30466189 (diff) | |
download | twin-style-suse2-a26e231b46ac6433f6500ddc9ed6b466cf38cc21.tar.gz twin-style-suse2-a26e231b46ac6433f6500ddc9ed6b466cf38cc21.zip |
Conversion Qt3→TQt
Signed-off-by: Mavridis Philippe <[email protected]>
Diffstat (limited to 'src/shadow.cpp')
-rw-r--r-- | src/shadow.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/shadow.cpp b/src/shadow.cpp index 1362679..99a424f 100644 --- a/src/shadow.cpp +++ b/src/shadow.cpp @@ -28,7 +28,7 @@ */ #include "shadow.h" -#include <qcolor.h> +#include <tqcolor.h> ShadowEngine::ShadowEngine() { @@ -40,9 +40,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(); @@ -58,7 +58,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 @@ -78,14 +78,14 @@ 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; } -float ShadowEngine::decay(QImage& source, int i, int j) +float ShadowEngine::decay(TQImage& source, int i, int j) { // create a new image for the shadow int w = source.width(); @@ -117,7 +117,7 @@ float 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_; |