summaryrefslogtreecommitdiffstats
path: root/src/gvcore/qxcfi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gvcore/qxcfi.cpp')
-rw-r--r--src/gvcore/qxcfi.cpp426
1 files changed, 213 insertions, 213 deletions
diff --git a/src/gvcore/qxcfi.cpp b/src/gvcore/qxcfi.cpp
index d25e0f0..f6da18f 100644
--- a/src/gvcore/qxcfi.cpp
+++ b/src/gvcore/qxcfi.cpp
@@ -1,5 +1,5 @@
/*
- * qxcfi.cpp: A Qt 3 plug-in for reading GIMP XCF image files
+ * qxcfi.cpp: A TQt 3 plug-in for reading GIMP XCF image files
* Copyright (C) 2001 lignum Computing, Inc. <allen@lignumcomputing.com>
* $Id: qxcfi.cpp 531593 2006-04-19 15:46:52Z gateau $
*
@@ -19,16 +19,16 @@
*
*/
-#include <qiodevice.h>
+#include <tqiodevice.h>
#include <kdeversion.h>
#include <stdlib.h>
#include "qxcfi.h"
-// Change a QRgb value's alpha only. (an optimization)
-inline QRgb qRgba ( QRgb rgb, int a )
+// Change a TQRgb value's alpha only. (an optimization)
+inline TQRgb tqRgba ( TQRgb rgb, int a )
{
- return ( ( a & 0xff ) << 24 | ( rgb & RGB_MASK ) );
+ return ( ( a & 0xff ) << 24 | ( rgb & TQRGB_MASK ) );
}
@@ -379,8 +379,8 @@ XCFImageFormat::XCFImageFormat() {
}
-bool XCFImageFormat::installIOHandler ( const QString& ) {
- QImageIO::defineIOHandler( "XCF", "gimp xcf", 0,
+bool XCFImageFormat::installIOHandler ( const TQString& ) {
+ TQImageIO::defineIOHandler( "XCF", "gimp xcf", 0,
&XCFImageFormat::readXCF,
#ifdef TMP_WRITE
&XCFImageFormat::writeXCF );
@@ -392,13 +392,13 @@ bool XCFImageFormat::installIOHandler ( const QString& ) {
void XCFImageFormat::registerFormat() {
- QImageIO::defineIOHandler( "XCF","^gimp xcf",
+ TQImageIO::defineIOHandler( "XCF","^gimp xcf",
0,XCFImageFormat::readXCF,0L);
}
/*!
- * The Qt QImageIO architecture invokes this routine to read the image.
+ * The TQt TQImageIO architecture invokes this routine to read the image.
* The file (or other data stream) is already open and the
* initial string indicating a XCF file has been matched (but the stream
* is positioned at its beginning).
@@ -410,11 +410,11 @@ void XCFImageFormat::registerFormat() {
* is suspect.
*
* Any failures while reading the XCF image are reported by the
- * QImage::status() method.
+ * TQImage::status() method.
*
- * \param image_io the QImageIO object connected to the XCF image.
+ * \param image_io the TQImageIO object connected to the XCF image.
*/
-void XCFImageFormat::readXCF ( QImageIO* image_io )
+void XCFImageFormat::readXCF ( TQImageIO* image_io )
{
XCFImage xcf_image;
@@ -446,10 +446,10 @@ void XCFImageFormat::readXCF ( QImageIO* image_io )
// all the data of all layers before beginning to construct the
// merged image).
- QValueStack< Q_INT32 > layer_offsets;
+ TQValueStack< TQ_INT32 > layer_offsets;
while ( true ) {
- Q_INT32 layer_offset;
+ TQ_INT32 layer_offset;
xcf_io >> layer_offset;
@@ -473,7 +473,7 @@ void XCFImageFormat::readXCF ( QImageIO* image_io )
// Load each layer and add it to the image
while ( !layer_offsets.isEmpty() ) {
- Q_INT32 layer_offset = layer_offsets.pop();
+ TQ_INT32 layer_offset = layer_offsets.pop();
xcf_io.device()->at( layer_offset );
@@ -486,14 +486,14 @@ void XCFImageFormat::readXCF ( QImageIO* image_io )
}
image_io->setImage( xcf_image.image );
- image_io->setStatus( 0 );
+ image_io->setqStatus( 0 );
}
/*!
- * Construct the QImage 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 QImage is not
+ * There are a couple of situations which require that the TQImage is not
* exactly the same as The GIMP's representation. The full table is:
* \verbatim
* Grayscale opaque : 8 bpp indexed
@@ -507,7 +507,7 @@ void XCFImageFormat::readXCF ( QImageIO* image_io )
* \endverbatim
* Whether the image is translucent or not is determined by the bottom layer's
* alpha channel. However, even if the bottom layer lacks an alpha channel,
- * it can still have an opacity < 1. In this case, the QImage is promoted
+ * it can still have an opacity < 1. In this case, the TQImage is promoted
* to 32-bit. (Note this is different from the output from the GIMP image
* exporter, which seems to ignore this attribute.)
*
@@ -521,19 +521,19 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
{
// (Aliases to make the code look a little better.)
Layer& layer( xcf_image.layer );
- QImage& image( xcf_image.image );
+ TQImage& image( xcf_image.image );
switch ( layer.type ) {
case RGB_GIMAGE:
if ( layer.opacity == OPAQUE_OPACITY ) {
image.create( xcf_image.width, xcf_image.height, 32 );
- image.fill( qRgb( 255, 255, 255 ) );
+ image.fill( tqRgb( 255, 255, 255 ) );
break;
} // else, fall through to 32-bit representation
case RGBA_GIMAGE:
image.create( xcf_image.width, xcf_image.height, 32 );
- image.fill( qRgba( 255, 255, 255, 0 ) );
+ image.fill( tqRgba( 255, 255, 255, 0 ) );
// Turning this on prevents fill() from affecting the alpha channel,
// by the way.
image.setAlphaBuffer( true );
@@ -549,7 +549,7 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
case GRAYA_GIMAGE:
image.create( xcf_image.width, xcf_image.height, 32 );
- image.fill( qRgba( 255, 255, 255, 0 ) );
+ image.fill( tqRgba( 255, 255, 255, 0 ) );
image.setAlphaBuffer( true );
break;
@@ -560,8 +560,8 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
// supported by The GIMP for indexed images) and the number of
// individual colors.
- // Note: Qt treats a bitmap with a Black and White color palette
- // as a mask, so only the "on" bits are drawn, regardless of the
+ // Note: TQt treats a bitmap with a Black and White color palette
+ // as a tqmask, so only the "on" bits are drawn, regardless of the
// order color table entries. Otherwise (i.e., at least one of the
// color table entries is not black or white), it obeys the one-
// or two-color palette. Have to ask about this...
@@ -569,7 +569,7 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
if ( xcf_image.num_colors <= 2 ) {
image.create( xcf_image.width, xcf_image.height,
1, xcf_image.num_colors,
- QImage::LittleEndian );
+ TQImage::LittleEndian );
image.fill( 0 );
setPalette( xcf_image, image );
}
@@ -577,7 +577,7 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
else if ( xcf_image.num_colors <= 256 ) {
image.create( xcf_image.width, xcf_image.height,
8, xcf_image.num_colors,
- QImage::LittleEndian );
+ TQImage::LittleEndian );
image.fill( 0 );
setPalette( xcf_image, image );
}
@@ -593,11 +593,11 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
xcf_image.num_colors++;
xcf_image.palette.resize( xcf_image.num_colors );
xcf_image.palette[1] = xcf_image.palette[0];
- xcf_image.palette[0] = qRgba( 255, 255, 255, 0 );
+ xcf_image.palette[0] = tqRgba( 255, 255, 255, 0 );
image.create( xcf_image.width, xcf_image.height,
1, xcf_image.num_colors,
- QImage::LittleEndian );
+ TQImage::LittleEndian );
image.fill( 0 );
setPalette( xcf_image, image );
image.setAlphaBuffer( true );
@@ -611,7 +611,7 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
xcf_image.palette.resize( xcf_image.num_colors );
for ( int c = xcf_image.num_colors-1; c >= 1; c-- )
xcf_image.palette[c] = xcf_image.palette[c-1];
- xcf_image.palette[0] = qRgba( 255, 255, 255, 0 );
+ xcf_image.palette[0] = tqRgba( 255, 255, 255, 0 );
image.create( xcf_image.width, xcf_image.height,
8, xcf_image.num_colors );
@@ -625,7 +625,7 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
// true color. (There is no equivalent PNG representation output
// from The GIMP as of v1.2.)
image.create( xcf_image.width, xcf_image.height, 32 );
- image.fill( qRgba( 255, 255, 255, 0 ) );
+ image.fill( tqRgba( 255, 255, 255, 0 ) );
image.setAlphaBuffer( true );
}
@@ -638,7 +638,7 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
/*!
* Compute the number of tiles in the current layer and allocate
- * QImage structures for each of them.
+ * TQImage structures for each of them.
* \param xcf_image contains the current layer.
*/
void XCFImageFormat::composeTiles ( XCFImage& xcf_image )
@@ -653,8 +653,8 @@ void XCFImageFormat::composeTiles ( XCFImage& xcf_image )
if ( layer.type == GRAYA_GIMAGE || layer.type == INDEXEDA_GIMAGE )
layer.alpha_tiles.resize( layer.nrows );
- if ( layer.mask_offset != 0 )
- layer.mask_tiles.resize( layer.nrows );
+ if ( layer.tqmask_offset != 0 )
+ layer.tqmask_tiles.resize( layer.nrows );
for ( uint j = 0; j < layer.nrows; j++ ) {
layer.image_tiles[j].resize( layer.ncols );
@@ -662,8 +662,8 @@ void XCFImageFormat::composeTiles ( XCFImage& xcf_image )
if ( layer.type == GRAYA_GIMAGE || layer.type == INDEXEDA_GIMAGE )
layer.alpha_tiles[j].resize( layer.ncols );
- if ( layer.mask_offset != 0 )
- layer.mask_tiles[j].resize( layer.ncols );
+ if ( layer.tqmask_offset != 0 )
+ layer.tqmask_tiles[j].resize( layer.ncols );
}
for ( uint j = 0; j < layer.nrows; j++ ) {
@@ -675,74 +675,74 @@ void XCFImageFormat::composeTiles ( XCFImage& xcf_image )
uint tile_height = (j+1) * TILE_HEIGHT <= layer.height ?
TILE_HEIGHT : layer.height - j*TILE_HEIGHT;
- // Try to create the most appropriate QImage (each GIMP layer
+ // Try to create the most appropriate TQImage (each GIMP layer
// type is treated slightly differently)
switch ( layer.type ) {
case RGB_GIMAGE:
- layer.image_tiles[j][i] = QImage( tile_width, tile_height, 32, 0 );
+ layer.image_tiles[j][i] = TQImage( tile_width, tile_height, 32, 0 );
layer.image_tiles[j][i].setAlphaBuffer( false );
break;
case RGBA_GIMAGE:
- layer.image_tiles[j][i] = QImage( tile_width, tile_height, 32, 0 );
+ layer.image_tiles[j][i] = TQImage( tile_width, tile_height, 32, 0 );
layer.image_tiles[j][i].setAlphaBuffer( true );
break;
case GRAY_GIMAGE:
- layer.image_tiles[j][i] = QImage( tile_width, tile_height, 8, 256 );
+ layer.image_tiles[j][i] = TQImage( tile_width, tile_height, 8, 256 );
setGrayPalette( layer.image_tiles[j][i] );
break;
case GRAYA_GIMAGE:
- layer.image_tiles[j][i] = QImage( tile_width, tile_height, 8, 256 );
+ layer.image_tiles[j][i] = TQImage( tile_width, tile_height, 8, 256 );
setGrayPalette( layer.image_tiles[j][i] );
- layer.alpha_tiles[j][i] = QImage( tile_width, tile_height, 8, 256 );
+ layer.alpha_tiles[j][i] = TQImage( tile_width, tile_height, 8, 256 );
setGrayPalette( layer.alpha_tiles[j][i] );
break;
case INDEXED_GIMAGE:
- layer.image_tiles[j][i] = QImage( tile_width, tile_height, 8,
+ layer.image_tiles[j][i] = TQImage( tile_width, tile_height, 8,
xcf_image.num_colors );
setPalette( xcf_image, layer.image_tiles[j][i] );
break;
case INDEXEDA_GIMAGE:
- layer.image_tiles[j][i] = QImage( tile_width, tile_height, 8,
+ layer.image_tiles[j][i] = TQImage( tile_width, tile_height, 8,
xcf_image.num_colors );
setPalette( xcf_image, layer.image_tiles[j][i] );
- layer.alpha_tiles[j][i] = QImage( tile_width, tile_height, 8, 256 );
+ layer.alpha_tiles[j][i] = TQImage( tile_width, tile_height, 8, 256 );
setGrayPalette( layer.alpha_tiles[j][i] );
}
- if ( layer.mask_offset != 0 ) {
- layer.mask_tiles[j][i] = QImage( tile_width, tile_height, 8, 256 );
- setGrayPalette( layer.mask_tiles[j][i] );
+ if ( layer.tqmask_offset != 0 ) {
+ layer.tqmask_tiles[j][i] = TQImage( tile_width, tile_height, 8, 256 );
+ setGrayPalette( layer.tqmask_tiles[j][i] );
}
}
}
}
/*!
- * Apply a grayscale palette to the QImage. Note that Qt does not distinguish
+ * Apply a grayscale palette to the TQImage. Note that TQt does not distinguish
* between grayscale and indexed images. A grayscale image is just
* an indexed image with a 256-color, grayscale palette.
* \param image image to set to a grayscale palette.
*/
-void XCFImageFormat::setGrayPalette ( QImage& image )
+void XCFImageFormat::setGrayPalette ( TQImage& image )
{
for ( int i = 0; i < 256; i++ )
- image.setColor( i, qRgb(i,i,i) );
+ image.setColor( i, tqRgb(i,i,i) );
}
/*!
- * Copy the indexed palette from the XCF image into the QImage.
+ * Copy the indexed palette from the XCF image into the TQImage.
* \param xcf_image XCF image containing the palette read from the data stream.
* \param image image to apply the palette to.
*/
-void XCFImageFormat::setPalette ( XCFImage& xcf_image, QImage& image )
+void XCFImageFormat::setPalette ( XCFImage& xcf_image, TQImage& image )
{
for ( int i = 0; i < xcf_image.num_colors; i++ )
image.setColor( i, xcf_image.palette[i] );
@@ -750,7 +750,7 @@ void XCFImageFormat::setPalette ( XCFImage& xcf_image, QImage& image )
/*!
* An XCF file can contain an arbitrary number of properties associated
- * with the image (and layer and mask).
+ * with the image (and layer and tqmask).
* \param xcf_io the data stream connected to the XCF image
* \param xcf_image XCF image data.
* \return true if there were no I/O errors.
@@ -760,14 +760,14 @@ bool XCFImageFormat::loadImageProperties ( SafeDataStream& xcf_io,
{
while ( true ) {
PropType type;
- QByteArray bytes;
+ TQByteArray bytes;
if ( !loadProperty( xcf_io, type, bytes ) ) {
qDebug( "XCF: error loading global image properties" );
return false;
}
- QDataStream property( bytes, IO_ReadOnly );
+ TQDataStream property( bytes, IO_ReadOnly );
switch ( type ) {
case PROP_END:
@@ -792,11 +792,11 @@ bool XCFImageFormat::loadImageProperties ( SafeDataStream& xcf_io,
case PROP_PARASITES:
while ( !property.atEnd() ) {
char* tag;
- Q_UINT32 size;
+ TQ_UINT32 size;
property.readBytes( tag, size );
- Q_UINT32 flags;
+ TQ_UINT32 flags;
char* data;
property >> flags >> data;
@@ -828,7 +828,7 @@ bool XCFImageFormat::loadImageProperties ( SafeDataStream& xcf_io,
for ( int i = 0; i < xcf_image.num_colors; i++ ) {
uchar r, g, b;
property >> r >> g >> b;
- xcf_image.palette.push_back( qRgb(r,g,b) );
+ xcf_image.palette.push_back( tqRgb(r,g,b) );
}
break;
@@ -872,16 +872,16 @@ bool XCFImageFormat::loadLayer ( SafeDataStream& xcf_io, XCFImage& xcf_image )
if ( layer.visible == 0 ) return true;
- // If there are any more layers, merge them into the final QImage.
+ // If there are any more layers, merge them into the final TQImage.
- xcf_io >> layer.hierarchy_offset >> layer.mask_offset;
+ xcf_io >> layer.hierarchy_offset >> layer.tqmask_offset;
if ( xcf_io.failed() ) {
qDebug( "XCF: read failure on layer image offsets" );
return false;
}
- // Allocate the individual tile QImages based on the size and type
+ // Allocate the individual tile TQImages based on the size and type
// of this layer.
composeTiles( xcf_image );
@@ -896,15 +896,15 @@ bool XCFImageFormat::loadLayer ( SafeDataStream& xcf_io, XCFImage& xcf_image )
if ( !loadHierarchy( xcf_io, layer ) ) return false;
- if ( layer.mask_offset != 0 ) {
- xcf_io.device()->at( layer.mask_offset );
+ if ( layer.tqmask_offset != 0 ) {
+ xcf_io.device()->at( layer.tqmask_offset );
if ( !loadMask( xcf_io, layer ) ) return false;
}
// Now we should have enough information to initialize the final
- // QImage. The first visible layer determines the attributes
- // of the QImage.
+ // TQImage. The first visible layer determines the attributes
+ // of the TQImage.
if ( !xcf_image.initialized ) {
initializeImage( xcf_image );
@@ -930,14 +930,14 @@ bool XCFImageFormat::loadLayerProperties ( SafeDataStream& xcf_io, Layer& layer
{
while ( true ) {
PropType type;
- QByteArray bytes;
+ TQByteArray bytes;
if ( !loadProperty( xcf_io, type, bytes ) ) {
qDebug( "XCF: error loading layer properties" );
return false;
}
- QDataStream property( bytes, IO_ReadOnly );
+ TQDataStream property( bytes, IO_ReadOnly );
switch ( type ) {
case PROP_END:
@@ -964,15 +964,15 @@ bool XCFImageFormat::loadLayerProperties ( SafeDataStream& xcf_io, Layer& layer
break;
case PROP_APPLY_MASK:
- property >> layer.apply_mask;
+ property >> layer.apply_tqmask;
break;
case PROP_EDIT_MASK:
- property >> layer.edit_mask;
+ property >> layer.edit_tqmask;
break;
case PROP_SHOW_MASK:
- property >> layer.show_mask;
+ property >> layer.show_tqmask;
break;
case PROP_OFFSETS:
@@ -995,47 +995,47 @@ bool XCFImageFormat::loadLayerProperties ( SafeDataStream& xcf_io, Layer& layer
/*!
* An XCF file can contain an arbitrary number of properties associated
- * with a channel. Note that this routine only reads mask channel properties.
+ * with a channel. Note that this routine only reads tqmask channel properties.
* \param xcf_io the data stream connected to the XCF image.
- * \param layer layer containing the mask channel to collect the properties.
+ * \param layer layer containing the tqmask channel to collect the properties.
* \return true if there were no I/O errors.
*/
bool XCFImageFormat::loadChannelProperties ( SafeDataStream& xcf_io, Layer& layer )
{
while ( true ) {
PropType type;
- QByteArray bytes;
+ TQByteArray bytes;
if ( !loadProperty( xcf_io, type, bytes ) ) {
qDebug( "XCF: error loading channel properties" );
return false;
}
- QDataStream property( bytes, IO_ReadOnly );
+ TQDataStream property( bytes, IO_ReadOnly );
switch ( type ) {
case PROP_END:
return true;
case PROP_OPACITY:
- property >> layer.mask_channel.opacity;
+ property >> layer.tqmask_channel.opacity;
break;
case PROP_VISIBLE:
- property >> layer.mask_channel.visible;
+ property >> layer.tqmask_channel.visible;
break;
case PROP_SHOW_MASKED:
- property >> layer.mask_channel.show_masked;
+ property >> layer.tqmask_channel.show_tqmasked;
break;
case PROP_COLOR:
- property >> layer.mask_channel.red >> layer.mask_channel.green
- >> layer.mask_channel.blue;
+ property >> layer.tqmask_channel.red >> layer.tqmask_channel.green
+ >> layer.tqmask_channel.blue;
break;
case PROP_TATTOO:
- property >> layer.mask_channel.tattoo;
+ property >> layer.tqmask_channel.tattoo;
break;
default:
@@ -1045,7 +1045,7 @@ bool XCFImageFormat::loadChannelProperties ( SafeDataStream& xcf_io, Layer& laye
}
/*!
- * 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.
@@ -1054,10 +1054,10 @@ bool XCFImageFormat::loadChannelProperties ( SafeDataStream& xcf_io, Layer& laye
*/
bool XCFImageFormat::loadHierarchy ( SafeDataStream& xcf_io, Layer& layer )
{
- Q_INT32 width;
- Q_INT32 height;
- Q_INT32 bpp;
- Q_UINT32 offset;
+ TQ_INT32 width;
+ TQ_INT32 height;
+ TQ_INT32 bpp;
+ TQ_UINT32 offset;
xcf_io >> width >> height >> bpp >> offset;
@@ -1070,7 +1070,7 @@ bool XCFImageFormat::loadHierarchy ( SafeDataStream& xcf_io, Layer& layer )
// increasingly lower resolution). Only the top level is used here,
// however.
- Q_UINT32 junk;
+ TQ_UINT32 junk;
do {
xcf_io >> junk;
@@ -1080,7 +1080,7 @@ bool XCFImageFormat::loadHierarchy ( SafeDataStream& xcf_io, Layer& layer )
}
} while ( junk != 0 );
- QIODevice::Offset saved_pos = xcf_io.device()->at();
+ TQIODevice::Offset saved_pos = xcf_io.device()->at();
xcf_io.device()->at( offset );
@@ -1099,11 +1099,11 @@ bool XCFImageFormat::loadHierarchy ( SafeDataStream& xcf_io, Layer& layer )
* \return true if there were no I/O errors.
* \sa loadTileRLE().
*/
-bool XCFImageFormat::loadLevel ( SafeDataStream& xcf_io, Layer& layer, Q_INT32 bpp )
+bool XCFImageFormat::loadLevel ( SafeDataStream& xcf_io, Layer& layer, TQ_INT32 bpp )
{
- Q_INT32 width;
- Q_INT32 height;
- Q_UINT32 offset;
+ TQ_INT32 width;
+ TQ_INT32 height;
+ TQ_UINT32 offset;
xcf_io >> width >> height >> offset;
@@ -1122,9 +1122,9 @@ bool XCFImageFormat::loadLevel ( SafeDataStream& xcf_io, Layer& layer, Q_INT32 b
return false;
}
- QIODevice::Offset saved_pos = xcf_io.device()->at();
+ TQIODevice::Offset saved_pos = xcf_io.device()->at();
- Q_UINT32 offset2;
+ TQ_UINT32 offset2;
xcf_io >> offset2;
@@ -1147,7 +1147,7 @@ bool XCFImageFormat::loadLevel ( SafeDataStream& xcf_io, Layer& layer, Q_INT32 b
return false;
// The bytes in the layer tile are juggled differently depending on
- // the target QImage. The caller has set layer.assignBytes to the
+ // the target TQImage. The caller has set layer.assignBytes to the
// appropriate routine.
layer.assignBytes( layer, i, j );
@@ -1167,21 +1167,21 @@ bool XCFImageFormat::loadLevel ( SafeDataStream& xcf_io, Layer& layer, Q_INT32 b
}
/*!
- * A layer can have a one channel image which is used as a mask.
+ * A layer can have a one channel image which is used as a tqmask.
* \param xcf_io the data stream connected to the XCF image.
- * \param layer the layer to collect the mask image.
+ * \param layer the layer to collect the tqmask image.
* \return true if there were no I/O errors.
*/
bool XCFImageFormat::loadMask ( SafeDataStream& xcf_io, Layer& layer )
{
- Q_INT32 width;
- Q_INT32 height;
+ TQ_INT32 width;
+ TQ_INT32 height;
char* name;
xcf_io >> width >> height >> name;
if ( xcf_io.failed() ) {
- qDebug( "XCF: read failure on mask info" );
+ qDebug( "XCF: read failure on tqmask info" );
return false;
}
@@ -1189,12 +1189,12 @@ bool XCFImageFormat::loadMask ( SafeDataStream& xcf_io, Layer& layer )
if ( !loadChannelProperties( xcf_io, layer ) ) return false;
- Q_UINT32 hierarchy_offset;
+ TQ_UINT32 hierarchy_offset;
xcf_io >> hierarchy_offset;
if ( xcf_io.failed() ) {
- qDebug( "XCF: read failure on mask image offset" );
+ qDebug( "XCF: read failure on tqmask image offset" );
return false;
}
@@ -1231,7 +1231,7 @@ bool XCFImageFormat::loadMask ( SafeDataStream& xcf_io, Layer& layer )
* the RLE data.
*/
bool XCFImageFormat::loadTileRLE ( SafeDataStream& xcf_io, uchar* tile, int image_size,
- int data_length, Q_INT32 bpp )
+ int data_length, TQ_INT32 bpp )
{
uchar* data;
@@ -1288,7 +1288,7 @@ bool XCFImageFormat::loadTileRLE ( SafeDataStream& xcf_io, uchar* tile, int imag
while ( length-- > 0 ) {
*data = *xcfdata++;
- data += sizeof(QRgb);
+ data += sizeof(TQRgb);
}
}
else {
@@ -1315,7 +1315,7 @@ bool XCFImageFormat::loadTileRLE ( SafeDataStream& xcf_io, uchar* tile, int imag
while ( length-- > 0 ) {
*data = val;
- data += sizeof(QRgb);
+ data += sizeof(TQRgb);
}
}
}
@@ -1332,7 +1332,7 @@ bool XCFImageFormat::loadTileRLE ( SafeDataStream& xcf_io, uchar* tile, int imag
}
/*!
- * Copy the bytes from the tile buffer into the image tile QImage, taking into
+ * Copy the bytes from the tile buffer into the image tile TQImage, taking into
* account all the myriad different modes.
* \param layer layer containing the tile buffer and the image tile matrix.
* \param i column index of current tile.
@@ -1346,8 +1346,8 @@ void XCFImageFormat::assignImageBytes ( Layer& layer, uint i, uint j )
case RGB_GIMAGE:
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, qRgb( tile[0], tile[1], tile[2] ) );
- tile += sizeof(QRgb);
+ layer.image_tiles[j][i].setPixel( k, l, tqRgb( tile[0], tile[1], tile[2] ) );
+ tile += sizeof(TQRgb);
}
}
break;
@@ -1356,8 +1356,8 @@ 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,
- qRgba( tile[0], tile[1], tile[2], tile[3] ) );
- tile += sizeof(QRgb);
+ tqRgba( tile[0], tile[1], tile[2], tile[3] ) );
+ tile += sizeof(TQRgb);
}
}
break;
@@ -1367,7 +1367,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;
@@ -1377,7 +1377,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++ ) {
- // The "if" here should not be necessary, but apparently there
+ // The "if" here should not be necessary, but aptqparently there
// are some cases where the image can contain larger indices
// than there are colors in the palette. (A bug in The GIMP?)
@@ -1385,7 +1385,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;
@@ -1393,8 +1393,8 @@ void XCFImageFormat::assignImageBytes ( Layer& layer, uint i, uint j )
}
/*!
- * Copy the bytes from the tile buffer into the mask tile QImage.
- * \param layer layer containing the tile buffer and the mask tile matrix.
+ * Copy the bytes from the tile buffer into the tqmask tile TQImage.
+ * \param layer layer containing the tile buffer and the tqmask tile matrix.
* \param i column index of current tile.
* \param j row index of current tile.
*/
@@ -1404,8 +1404,8 @@ 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);
+ layer.tqmask_tiles[j][i].setPixel( k, l, tile[0] );
+ tile += sizeof(TQRgb);
}
}
}
@@ -1418,9 +1418,9 @@ void XCFImageFormat::assignMaskBytes ( Layer& layer, uint i, uint j )
* \param bytes returns with the property data.
* \return true if there were no IO errors. */
bool XCFImageFormat::loadProperty ( SafeDataStream& xcf_io, PropType& type,
- QByteArray& bytes )
+ TQByteArray& bytes )
{
- Q_UINT32 tmp;
+ TQ_UINT32 tmp;
xcf_io >> tmp;
type=static_cast<PropType>(tmp);
@@ -1430,7 +1430,7 @@ bool XCFImageFormat::loadProperty ( SafeDataStream& xcf_io, PropType& type,
}
char* data;
- Q_UINT32 size;
+ TQ_UINT32 size;
// The COLORMAP property is tricky: in version of GIMP older than 2.0.2, the
// property size was wrong (it was 4 + ncolors instead of 4 + 3*ncolors).
@@ -1442,7 +1442,7 @@ bool XCFImageFormat::loadProperty ( SafeDataStream& xcf_io, PropType& type,
// * See http://bugzilla.gnome.org/show_bug.cgi?id=142149 and
// gimp/app/xcf-save.c, revision 1.42
if ( type == PROP_COLORMAP ) {
- Q_UINT32 ignoredSize, ncolors;
+ TQ_UINT32 ignoredSize, ncolors;
xcf_io >> ignoredSize;
if ( xcf_io.failed() ) {
qDebug( "XCF: read failure on property %d size", type );
@@ -1469,7 +1469,7 @@ bool XCFImageFormat::loadProperty ( SafeDataStream& xcf_io, PropType& type,
else if ( type == PROP_USER_UNIT ) {
float factor;
- Q_INT32 digits;
+ TQ_INT32 digits;
char* unit_strings;
xcf_io >> size >> factor >> digits;
@@ -1520,7 +1520,7 @@ bool XCFImageFormat::loadProperty ( SafeDataStream& xcf_io, PropType& type,
void XCFImageFormat::copyLayerToImage ( XCFImage& xcf_image )
{
Layer& layer( xcf_image.layer );
- QImage& image( xcf_image.image );
+ TQImage& image( xcf_image.image );
PixelCopyOperation copy = 0;
@@ -1555,7 +1555,7 @@ void XCFImageFormat::copyLayerToImage ( XCFImage& xcf_image )
// This seems the best place to apply the dissolve because it
// depends on the global position of each tile's
- // pixels. Apparently it's the only mode which can apply to a
+ // pixels. Aptqparently it's the only mode which can apply to a
// single layer.
if ( layer.mode == DISSOLVE_MODE ) {
@@ -1596,22 +1596,22 @@ void XCFImageFormat::copyLayerToImage ( XCFImage& xcf_image )
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyRGBToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ 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 )
- src_a = INT_MULT( src_a, qAlpha( src ) );
+ src_a = INT_MULT( src_a, tqAlpha( src ) );
- // Apply the mask (if any)
+ // Apply the tqmask (if any)
- if ( layer.apply_mask == 1 && layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
- src_a = INT_MULT( src_a, layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ if ( layer.apply_tqmask == 1 && layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
+ src_a = INT_MULT( src_a, layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
- image.setPixel( m, n, qRgba( src, src_a ) );
+ image.setPixel( m, n, tqRgba( src, src_a ) );
}
/*!
@@ -1626,7 +1626,7 @@ void XCFImageFormat::copyRGBToRGB ( Layer& layer, uint i, uint j, int k, int l,
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyGrayToGray ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
int src = layer.image_tiles[j][i].pixelIndex( k, l );
@@ -1647,13 +1647,13 @@ void XCFImageFormat::copyGrayToGray ( Layer& layer, uint i, uint j, int k, int l
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyGrayToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ 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, qRgba( src, src_a ) );
+ image.setPixel( m, n, tqRgba( src, src_a ) );
}
/*!
@@ -1670,21 +1670,21 @@ void XCFImageFormat::copyGrayToRGB ( Layer& layer, uint i, uint j, int k, int l,
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyGrayAToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ 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 );
- // Apply the mask (if any)
+ // Apply the tqmask (if any)
- if ( layer.apply_mask == 1 && layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
- src_a = INT_MULT( src_a, layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ if ( layer.apply_tqmask == 1 && layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
+ src_a = INT_MULT( src_a, layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
- image.setPixel( m, n, qRgba( src, src_a ) );
+ image.setPixel( m, n, tqRgba( src, src_a ) );
}
/*!
@@ -1699,7 +1699,7 @@ void XCFImageFormat::copyGrayAToRGB ( Layer& layer, uint i, uint j, int k, int l
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyIndexedToIndexed ( Layer& layer, uint i,uint j,int k,int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
int src = layer.image_tiles[j][i].pixelIndex( k, l );
@@ -1718,7 +1718,7 @@ void XCFImageFormat::copyIndexedToIndexed ( Layer& layer, uint i,uint j,int k,in
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyIndexedAToIndexed ( Layer& layer,uint i,uint j,int k,int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
uchar src = layer.image_tiles[j][i].pixelIndex( k, l );
@@ -1726,11 +1726,11 @@ void XCFImageFormat::copyIndexedAToIndexed ( Layer& layer,uint i,uint j,int k,in
src_a = INT_MULT( src_a, layer.opacity );
- if ( layer.apply_mask == 1 &&
- layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
+ if ( layer.apply_tqmask == 1 &&
+ layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
src_a = INT_MULT( src_a,
- layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
if ( src_a > 127 )
src++;
@@ -1754,19 +1754,19 @@ void XCFImageFormat::copyIndexedAToIndexed ( Layer& layer,uint i,uint j,int k,in
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyIndexedAToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ 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 );
- // Apply the mask (if any)
+ // Apply the tqmask (if any)
- if ( layer.apply_mask == 1 && layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
- src_a = INT_MULT( src_a, layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ if ( layer.apply_tqmask == 1 && layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
+ src_a = INT_MULT( src_a, layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
// This is what appears in the GIMP window
@@ -1775,7 +1775,7 @@ void XCFImageFormat::copyIndexedAToRGB ( Layer& layer, uint i, uint j, int k, in
else
src_a = OPAQUE_OPACITY;
- image.setPixel( m, n, qRgba( src, src_a ) );
+ image.setPixel( m, n, tqRgba( src, src_a ) );
}
/*!
@@ -1785,7 +1785,7 @@ void XCFImageFormat::copyIndexedAToRGB ( Layer& layer, uint i, uint j, int k, in
void XCFImageFormat::mergeLayerIntoImage ( XCFImage& xcf_image )
{
Layer& layer( xcf_image.layer );
- QImage& image( xcf_image.image );
+ TQImage& image( xcf_image.image );
PixelMergeOperation merge = 0;
@@ -1822,7 +1822,7 @@ void XCFImageFormat::mergeLayerIntoImage ( XCFImage& xcf_image )
// This seems the best place to apply the dissolve because it
// depends on the global position of each tile's
- // pixels. Apparently it's the only mode which can apply to a
+ // pixels. Aptqparently it's the only mode which can apply to a
// single layer.
if ( layer.mode == DISSOLVE_MODE ) {
@@ -1863,20 +1863,20 @@ void XCFImageFormat::mergeLayerIntoImage ( XCFImage& xcf_image )
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeRGBToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ 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 = qRed( src );
- uchar src_g = qGreen( src );
- uchar src_b = qBlue( src );
- uchar src_a = qAlpha( src );
+ uchar src_r = tqRed( src );
+ uchar src_g = tqGreen( src );
+ uchar src_b = tqBlue( src );
+ uchar src_a = tqAlpha( src );
- uchar dst_r = qRed( dst );
- uchar dst_g = qGreen( dst );
- uchar dst_b = qBlue( dst );
- uchar dst_a = qAlpha( dst );
+ uchar dst_r = tqRed( dst );
+ uchar dst_g = tqGreen( dst );
+ uchar dst_b = tqBlue( dst );
+ uchar dst_a = tqAlpha( dst );
switch ( layer.mode ) {
case MULTIPLY_MODE: {
@@ -2019,11 +2019,11 @@ void XCFImageFormat::mergeRGBToRGB ( Layer& layer, uint i, uint j, int k, int l,
src_a = INT_MULT( src_a, layer.opacity );
- // Apply the mask (if any)
+ // Apply the tqmask (if any)
- if ( layer.apply_mask == 1 && layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
- src_a = INT_MULT( src_a, layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ if ( layer.apply_tqmask == 1 && layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
+ src_a = INT_MULT( src_a, layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
uchar new_r, new_g, new_b, new_a;
@@ -2039,7 +2039,7 @@ void XCFImageFormat::mergeRGBToRGB ( Layer& layer, uint i, uint j, int k, int l,
if ( !layer_modes[layer.mode].affect_alpha )
new_a = dst_a;
- image.setPixel( m, n, qRgba( new_r, new_g, new_b, new_a ) );
+ image.setPixel( m, n, tqRgba( new_r, new_g, new_b, new_a ) );
}
/*!
@@ -2054,7 +2054,7 @@ void XCFImageFormat::mergeRGBToRGB ( Layer& layer, uint i, uint j, int k, int l,
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeGrayToGray ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
int src = layer.image_tiles[j][i].pixelIndex( k, l );
@@ -2073,9 +2073,9 @@ void XCFImageFormat::mergeGrayToGray ( Layer& layer, uint i, uint j, int k, int
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeGrayAToGray ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
- int src = qGray( layer.image_tiles[j][i].pixel( k, l ) );
+ int src = tqGray( layer.image_tiles[j][i].pixel( k, l ) );
int dst = image.pixelIndex( m, n );
uchar src_a = layer.alpha_tiles[j][i].pixelIndex( k, l );
@@ -2121,11 +2121,11 @@ void XCFImageFormat::mergeGrayAToGray ( Layer& layer, uint i, uint j, int k, int
src_a = INT_MULT( src_a, layer.opacity );
- // Apply the mask (if any)
+ // Apply the tqmask (if any)
- if ( layer.apply_mask == 1 && layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
- src_a = INT_MULT( src_a, layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ if ( layer.apply_tqmask == 1 && layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
+ src_a = INT_MULT( src_a, layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
uchar new_a = OPAQUE_OPACITY;
@@ -2151,13 +2151,13 @@ void XCFImageFormat::mergeGrayAToGray ( Layer& layer, uint i, uint j, int k, int
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeGrayToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ 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, qRgba( src, src_a ) );
+ image.setPixel( m, n, tqRgba( src, src_a ) );
}
/*!
@@ -2174,13 +2174,13 @@ void XCFImageFormat::mergeGrayToRGB ( Layer& layer, uint i, uint j, int k, int l
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeGrayAToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
- int src = qGray( layer.image_tiles[j][i].pixel( k, l ) );
- int dst = qGray( image.pixel( m, n ) );
+ int src = tqGray( layer.image_tiles[j][i].pixel( k, l ) );
+ int dst = tqGray( image.pixel( m, n ) );
uchar src_a = layer.alpha_tiles[j][i].pixelIndex( k, l );
- uchar dst_a = qAlpha( image.pixel( m, n ) );
+ uchar dst_a = tqAlpha( image.pixel( m, n ) );
switch ( layer.mode ) {
case MULTIPLY_MODE: {
@@ -2232,11 +2232,11 @@ void XCFImageFormat::mergeGrayAToRGB ( Layer& layer, uint i, uint j, int k, int
src_a = INT_MULT( src_a, layer.opacity );
- // Apply the mask (if any)
+ // Apply the tqmask (if any)
- if ( layer.apply_mask == 1 && layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
- src_a = INT_MULT( src_a, layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ if ( layer.apply_tqmask == 1 && layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
+ src_a = INT_MULT( src_a, layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
uchar new_a = dst_a + INT_MULT( OPAQUE_OPACITY - dst_a, src_a );
@@ -2248,7 +2248,7 @@ void XCFImageFormat::mergeGrayAToRGB ( Layer& layer, uint i, uint j, int k, int
if ( !layer_modes[layer.mode].affect_alpha )
new_a = dst_a;
- image.setPixel( m, n, qRgba( new_g, new_g, new_g, new_a ) );
+ image.setPixel( m, n, tqRgba( new_g, new_g, new_g, new_a ) );
}
/*!
@@ -2263,7 +2263,7 @@ void XCFImageFormat::mergeGrayAToRGB ( Layer& layer, uint i, uint j, int k, int
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeIndexedToIndexed ( Layer& layer, uint i,uint j,int k,int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
int src = layer.image_tiles[j][i].pixelIndex( k, l );
@@ -2282,7 +2282,7 @@ void XCFImageFormat::mergeIndexedToIndexed ( Layer& layer, uint i,uint j,int k,i
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeIndexedAToIndexed ( Layer& layer,uint i,uint j,int k,int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
uchar src = layer.image_tiles[j][i].pixelIndex( k, l );
@@ -2290,11 +2290,11 @@ void XCFImageFormat::mergeIndexedAToIndexed ( Layer& layer,uint i,uint j,int k,i
src_a = INT_MULT( src_a, layer.opacity );
- if ( layer.apply_mask == 1 &&
- layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
+ if ( layer.apply_tqmask == 1 &&
+ layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
src_a = INT_MULT( src_a,
- layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
if ( src_a > 127 ) {
src++;
@@ -2316,19 +2316,19 @@ void XCFImageFormat::mergeIndexedAToIndexed ( Layer& layer,uint i,uint j,int k,i
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeIndexedAToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ 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 );
- // Apply the mask (if any)
+ // Apply the tqmask (if any)
- if ( layer.apply_mask == 1 && layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
- src_a = INT_MULT( src_a, layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ if ( layer.apply_tqmask == 1 && layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
+ src_a = INT_MULT( src_a, layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
// This is what appears in the GIMP window
@@ -2337,7 +2337,7 @@ void XCFImageFormat::mergeIndexedAToRGB ( Layer& layer, uint i, uint j, int k, i
else
src_a = OPAQUE_OPACITY;
- image.setPixel( m, n, qRgba( src, src_a ) );
+ image.setPixel( m, n, tqRgba( src, src_a ) );
}
/*!
@@ -2347,9 +2347,9 @@ void XCFImageFormat::mergeIndexedAToRGB ( Layer& layer, uint i, uint j, int k, i
* \param x the global x position of the tile.
* \param y the global y position of the tile.
*/
-void XCFImageFormat::dissolveRGBPixels ( QImage& image, int x, int y )
+void XCFImageFormat::dissolveRGBPixels ( TQImage& image, int x, int y )
{
- // The apparently spurious rand() calls are to wind the random
+ // The aptqparently spurious rand() calls are to wind the random
// numbers up to the same point for each tile.
for ( int l = 0; l < image.height(); l++ ) {
@@ -2360,10 +2360,10 @@ void XCFImageFormat::dissolveRGBPixels ( QImage& 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 > qAlpha( pixel ) ) {
- image.setPixel( k, l, qRgba( pixel, 0 ) );
+ if ( rand_val > tqAlpha( pixel ) ) {
+ image.setPixel( k, l, tqRgba( pixel, 0 ) );
}
}
}
@@ -2378,9 +2378,9 @@ void XCFImageFormat::dissolveRGBPixels ( QImage& image, int x, int y )
* \param x the global x position of the tile.
* \param y the global y position of the tile.
*/
-void XCFImageFormat::dissolveAlphaPixels ( QImage& image, int x, int y )
+void XCFImageFormat::dissolveAlphaPixels ( TQImage& image, int x, int y )
{
- // The apparently spurious rand() calls are to wind the random
+ // The aptqparently spurious rand() calls are to wind the random
// numbers up to the same point for each tile.
for ( int l = 0; l < image.height(); l++ ) {