summaryrefslogtreecommitdiffstats
path: root/kimgio/xcf.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-09-25 12:03:00 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-09-25 17:50:49 +0900
commit04d353236066b9aa85f6387fa05d3d37b75a7dd2 (patch)
tree3781200cbdb5db08e22cb07dd16c2dcdf6402b98 /kimgio/xcf.cpp
parentb0f1961286230520573e2433b0ed4562718ce7a3 (diff)
downloadtdelibs-04d353236066b9aa85f6387fa05d3d37b75a7dd2.tar.gz
tdelibs-04d353236066b9aa85f6387fa05d3d37b75a7dd2.zip
Replace QObject, QWidget, QImage, QPair, QRgb, QColor, QChar, QString, QIODevice with TQ* version
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 4c0dae60b2fbc60996fc8f4bd29ee6219b869527)
Diffstat (limited to 'kimgio/xcf.cpp')
-rw-r--r--kimgio/xcf.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kimgio/xcf.cpp b/kimgio/xcf.cpp
index 1c0bb79d1..dd243bcce 100644
--- a/kimgio/xcf.cpp
+++ b/kimgio/xcf.cpp
@@ -77,8 +77,8 @@ const XCFImageFormat::LayerModes XCFImageFormat::layer_modes[] = {
};
-//! Change a QRgb value's alpha only.
-inline QRgb tqRgba ( QRgb rgb, int a )
+//! Change a TQRgb value's alpha only.
+inline TQRgb tqRgba ( TQRgb rgb, int a )
{
return ((a & 0xff) << 24 | (rgb & TQRGB_MASK));
}
@@ -676,7 +676,7 @@ void XCFImageFormat::assignImageBytes(Layer& layer, uint i, uint j)
for (int k = 0; k < layer.image_tiles[j][i].width(); k++) {
layer.image_tiles[j][i].setPixel(k, l,
tqRgb(tile[0], tile[1], tile[2]));
- tile += sizeof(QRgb);
+ tile += sizeof(TQRgb);
}
}
break;
@@ -686,7 +686,7 @@ void XCFImageFormat::assignImageBytes(Layer& layer, uint i, uint j)
for ( int k = 0; k < layer.image_tiles[j][i].width(); k++ ) {
layer.image_tiles[j][i].setPixel(k, l,
tqRgba(tile[0], tile[1], tile[2], tile[3]));
- tile += sizeof(QRgb);
+ tile += sizeof(TQRgb);
}
}
break;
@@ -696,7 +696,7 @@ void XCFImageFormat::assignImageBytes(Layer& layer, uint i, uint j)
for (int l = 0; l < layer.image_tiles[j][i].height(); l++) {
for (int k = 0; k < layer.image_tiles[j][i].width(); k++) {
layer.image_tiles[j][i].setPixel(k, l, tile[0]);
- tile += sizeof(QRgb);
+ tile += sizeof(TQRgb);
}
}
break;
@@ -714,7 +714,7 @@ void XCFImageFormat::assignImageBytes(Layer& layer, uint i, uint j)
layer.image_tiles[j][i].setPixel(k, l, tile[0]);
layer.alpha_tiles[j][i].setPixel(k, l, tile[1]);
- tile += sizeof(QRgb);
+ tile += sizeof(TQRgb);
}
}
break;
@@ -723,7 +723,7 @@ void XCFImageFormat::assignImageBytes(Layer& layer, uint i, uint j)
/*!
- * The GIMP stores images in a "mipmap"-like hierarchy. As far as the QImage
+ * The GIMP stores images in a "mipmap"-like hierarchy. As far as the TQImage
* is concerned, however, only the top level (i.e., the full resolution image)
* is used.
* \param xcf_io the data stream connected to the XCF image.
@@ -963,7 +963,7 @@ bool XCFImageFormat::loadTileRLE(TQDataStream& xcf_io, uchar* tile, int image_si
while (length-- > 0) {
*data = *xcfdata++;
- data += sizeof(QRgb);
+ data += sizeof(TQRgb);
}
} else {
length += 1;
@@ -988,7 +988,7 @@ bool XCFImageFormat::loadTileRLE(TQDataStream& xcf_io, uchar* tile, int image_si
while (length-- > 0) {
*data = val;
- data += sizeof(QRgb);
+ data += sizeof(TQRgb);
}
}
}
@@ -1071,14 +1071,14 @@ void XCFImageFormat::assignMaskBytes(Layer& layer, uint i, uint j)
for (int l = 0; l < layer.image_tiles[j][i].height(); l++) {
for (int k = 0; k < layer.image_tiles[j][i].width(); k++) {
layer.mask_tiles[j][i].setPixel(k, l, tile[0]);
- tile += sizeof(QRgb);
+ tile += sizeof(TQRgb);
}
}
}
/*!
- * Construct the TQImage which will eventually be returned to the QImage
+ * Construct the TQImage which will eventually be returned to the TQImage
* loader.
*
* There are a couple of situations which require that the TQImage is not
@@ -1320,7 +1320,7 @@ void XCFImageFormat::copyLayerToImage(XCFImage& xcf_image)
void XCFImageFormat::copyRGBToRGB(Layer& layer, uint i, uint j, int k, int l,
TQImage& image, int m, int n)
{
- QRgb src = layer.image_tiles[j][i].pixel(k, l);
+ TQRgb src = layer.image_tiles[j][i].pixel(k, l);
uchar src_a = layer.opacity;
if (layer.type == RGBA_GIMAGE)
@@ -1371,7 +1371,7 @@ void XCFImageFormat::copyGrayToGray(Layer& layer, uint i, uint j, int k, int l,
void XCFImageFormat::copyGrayToRGB(Layer& layer, uint i, uint j, int k, int l,
TQImage& image, int m, int n)
{
- QRgb src = layer.image_tiles[j][i].pixel(k, l);
+ TQRgb src = layer.image_tiles[j][i].pixel(k, l);
uchar src_a = layer.opacity;
image.setPixel(m, n, tqRgba(src, src_a));
}
@@ -1393,7 +1393,7 @@ void XCFImageFormat::copyGrayToRGB(Layer& layer, uint i, uint j, int k, int l,
void XCFImageFormat::copyGrayAToRGB(Layer& layer, uint i, uint j, int k, int l,
TQImage& image, int m, int n)
{
- QRgb src = layer.image_tiles[j][i].pixel(k, l);
+ TQRgb src = layer.image_tiles[j][i].pixel(k, l);
uchar src_a = layer.alpha_tiles[j][i].pixelIndex(k, l);
src_a = INT_MULT(src_a, layer.opacity);
@@ -1474,7 +1474,7 @@ image.setPixel(m, n, src);
void XCFImageFormat::copyIndexedAToRGB(Layer& layer, uint i, uint j, int k, int l,
TQImage& image, int m, int n)
{
- QRgb src = layer.image_tiles[j][i].pixel(k, l);
+ TQRgb src = layer.image_tiles[j][i].pixel(k, l);
uchar src_a = layer.alpha_tiles[j][i].pixelIndex(k, l);
src_a = INT_MULT(src_a, layer.opacity);
@@ -1583,8 +1583,8 @@ void XCFImageFormat::mergeLayerIntoImage(XCFImage& xcf_image)
void XCFImageFormat::mergeRGBToRGB(Layer& layer, uint i, uint j, int k, int l,
TQImage& image, int m, int n)
{
- QRgb src = layer.image_tiles[j][i].pixel(k, l);
- QRgb dst = image.pixel(m, n);
+ TQRgb src = layer.image_tiles[j][i].pixel(k, l);
+ TQRgb dst = image.pixel(m, n);
uchar src_r = tqRed(src);
uchar src_g = tqGreen(src);
@@ -1872,7 +1872,7 @@ void XCFImageFormat::mergeGrayAToGray(Layer& layer, uint i, uint j, int k, int l
void XCFImageFormat::mergeGrayToRGB(Layer& layer, uint i, uint j, int k, int l,
TQImage& image, int m, int n)
{
- QRgb src = layer.image_tiles[j][i].pixel(k, l);
+ TQRgb src = layer.image_tiles[j][i].pixel(k, l);
uchar src_a = layer.opacity;
image.setPixel(m, n, tqRgba(src, src_a));
}
@@ -2034,7 +2034,7 @@ void XCFImageFormat::mergeIndexedAToIndexed(Layer& layer, uint i, uint j, int k,
void XCFImageFormat::mergeIndexedAToRGB(Layer& layer, uint i, uint j, int k, int l,
TQImage& image, int m, int n)
{
- QRgb src = layer.image_tiles[j][i].pixel(k, l);
+ TQRgb src = layer.image_tiles[j][i].pixel(k, l);
uchar src_a = layer.alpha_tiles[j][i].pixelIndex(k, l);
src_a = INT_MULT(src_a, layer.opacity);
@@ -2073,7 +2073,7 @@ void XCFImageFormat::dissolveRGBPixels ( TQImage& image, int x, int y )
for (int k = 0; k < image.width(); k++) {
int rand_val = rand() & 0xff;
- QRgb pixel = image.pixel(k, l);
+ TQRgb pixel = image.pixel(k, l);
if (rand_val > tqAlpha(pixel)) {
image.setPixel(k, l, tqRgba(pixel, 0));