summaryrefslogtreecommitdiffstats
path: root/krita/colorspaces
diff options
context:
space:
mode:
Diffstat (limited to 'krita/colorspaces')
-rw-r--r--krita/colorspaces/cmyk_u16/cmyk_u16_plugin.cc8
-rw-r--r--krita/colorspaces/cmyk_u16/cmyk_u16_plugin.h3
-rw-r--r--krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.cc322
-rw-r--r--krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.h86
-rw-r--r--krita/colorspaces/cmyk_u8/cmyk_plugin.cc8
-rw-r--r--krita/colorspaces/cmyk_u8/cmyk_plugin.h3
-rw-r--r--krita/colorspaces/cmyk_u8/composite.h64
-rw-r--r--krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.cc320
-rw-r--r--krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h90
-rw-r--r--krita/colorspaces/gray_u16/gray_u16_plugin.cc8
-rw-r--r--krita/colorspaces/gray_u16/gray_u16_plugin.h3
-rw-r--r--krita/colorspaces/gray_u16/kis_gray_u16_colorspace.cc286
-rw-r--r--krita/colorspaces/gray_u16/kis_gray_u16_colorspace.h72
-rw-r--r--krita/colorspaces/gray_u8/gray_plugin.cc8
-rw-r--r--krita/colorspaces/gray_u8/gray_plugin.h3
-rw-r--r--krita/colorspaces/gray_u8/kis_gray_colorspace.cc550
-rw-r--r--krita/colorspaces/gray_u8/kis_gray_colorspace.h88
-rw-r--r--krita/colorspaces/gray_u8/tests/kis_strategy_colorspace_grayscale_tester.cpp26
-rw-r--r--krita/colorspaces/lms_f32/kis_lms_f32_colorspace.cc132
-rw-r--r--krita/colorspaces/lms_f32/kis_lms_f32_colorspace.h82
-rw-r--r--krita/colorspaces/lms_f32/lms_f32_plugin.cc8
-rw-r--r--krita/colorspaces/lms_f32/lms_f32_plugin.h3
-rw-r--r--krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.cc218
-rw-r--r--krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.h98
-rw-r--r--krita/colorspaces/rgb_f16half/rgb_f16half_plugin.cc8
-rw-r--r--krita/colorspaces/rgb_f16half/rgb_f16half_plugin.h3
-rw-r--r--krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.cc148
-rw-r--r--krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.h6
-rw-r--r--krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.cc218
-rw-r--r--krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.h100
-rw-r--r--krita/colorspaces/rgb_f32/rgb_f32_plugin.cc8
-rw-r--r--krita/colorspaces/rgb_f32/rgb_f32_plugin.h3
-rw-r--r--krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.cc148
-rw-r--r--krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.h6
-rw-r--r--krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.cc366
-rw-r--r--krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.h90
-rw-r--r--krita/colorspaces/rgb_u16/rgb_u16_plugin.cc8
-rw-r--r--krita/colorspaces/rgb_u16/rgb_u16_plugin.h3
-rw-r--r--krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.cc164
-rw-r--r--krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.h6
-rw-r--r--krita/colorspaces/rgb_u8/composite.h548
-rw-r--r--krita/colorspaces/rgb_u8/kis_rgb_colorspace.cc752
-rw-r--r--krita/colorspaces/rgb_u8/kis_rgb_colorspace.h90
-rw-r--r--krita/colorspaces/rgb_u8/rgb_plugin.cc10
-rw-r--r--krita/colorspaces/rgb_u8/rgb_plugin.h3
-rw-r--r--krita/colorspaces/rgb_u8/tests/kis_strategy_colorspace_rgb_tester.cpp38
-rw-r--r--krita/colorspaces/wet/kis_texture_filter.cc2
-rw-r--r--krita/colorspaces/wet/kis_texture_filter.h8
-rw-r--r--krita/colorspaces/wet/kis_texture_painter.cc6
-rw-r--r--krita/colorspaces/wet/kis_texture_painter.h2
-rw-r--r--krita/colorspaces/wet/kis_wet_colorspace.cc120
-rw-r--r--krita/colorspaces/wet/kis_wet_colorspace.h106
-rw-r--r--krita/colorspaces/wet/kis_wet_palette_widget.cc146
-rw-r--r--krita/colorspaces/wet/kis_wet_palette_widget.h23
-rw-r--r--krita/colorspaces/wet/kis_wetness_visualisation_filter.cc2
-rw-r--r--krita/colorspaces/wet/kis_wetness_visualisation_filter.h9
-rw-r--r--krita/colorspaces/wet/kis_wetop.cc32
-rw-r--r--krita/colorspaces/wet/kis_wetop.h6
-rw-r--r--krita/colorspaces/wet/wdgpressure.ui12
-rw-r--r--krita/colorspaces/wet/wet_plugin.cc28
-rw-r--r--krita/colorspaces/wet/wet_plugin.h3
-rw-r--r--krita/colorspaces/wet/wetphysicsfilter.cc44
-rw-r--r--krita/colorspaces/wet/wetphysicsfilter.h12
-rw-r--r--krita/colorspaces/wetsticky/brushop/kis_wsbrushop.cc32
-rw-r--r--krita/colorspaces/wetsticky/brushop/kis_wsbrushop.h2
-rw-r--r--krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.cc6
-rw-r--r--krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.h3
-rw-r--r--krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.cc230
-rw-r--r--krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.h100
-rw-r--r--krita/colorspaces/wetsticky/kis_ws_engine_filter.cc46
-rw-r--r--krita/colorspaces/wetsticky/kis_ws_engine_filter.h14
-rw-r--r--krita/colorspaces/wetsticky/wet_sticky_plugin.cc6
-rw-r--r--krita/colorspaces/wetsticky/wet_sticky_plugin.h3
-rw-r--r--krita/colorspaces/wetsticky/ws/GNU Public Licence.txt4
-rw-r--r--krita/colorspaces/wetsticky/ws/anim.c6
-rw-r--r--krita/colorspaces/wetsticky/ws/canvas.c46
-rw-r--r--krita/colorspaces/wetsticky/ws/canvas.h10
-rw-r--r--krita/colorspaces/wetsticky/ws/cmap.c12
-rw-r--r--krita/colorspaces/wetsticky/ws/engine.c4
-rw-r--r--krita/colorspaces/wetsticky/ws/engine3.c4
-rw-r--r--krita/colorspaces/wetsticky/ws/ogl_interface.c2
-rw-r--r--krita/colorspaces/wetsticky/ws/x_interface.c14
-rw-r--r--krita/colorspaces/wetsticky/wstool.ui32
-rw-r--r--krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.cc150
-rw-r--r--krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.h100
-rw-r--r--krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.cc8
-rw-r--r--krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.h3
-rw-r--r--krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.cc148
-rw-r--r--krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.h102
-rw-r--r--krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.cc8
-rw-r--r--krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.h3
91 files changed, 3445 insertions, 3429 deletions
diff --git a/krita/colorspaces/cmyk_u16/cmyk_u16_plugin.cc b/krita/colorspaces/cmyk_u16/cmyk_u16_plugin.cc
index a86b09f4..d7b20b29 100644
--- a/krita/colorspaces/cmyk_u16/cmyk_u16_plugin.cc
+++ b/krita/colorspaces/cmyk_u16/cmyk_u16_plugin.cc
@@ -34,14 +34,14 @@ typedef KGenericFactory<CMYKU16Plugin> CMYKU16PluginFactory;
K_EXPORT_COMPONENT_FACTORY( krita_cmyk_u16_plugin, CMYKU16PluginFactory( "krita" ) )
-CMYKU16Plugin::CMYKU16Plugin(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+CMYKU16Plugin::CMYKU16Plugin(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(CMYKU16PluginFactory::instance());
- if ( parent->inherits("KisColorSpaceFactoryRegistry") )
+ if ( tqparent->inherits("KisColorSpaceFactoryRegistry") )
{
- KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );
+ KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( tqparent );
KisColorSpace * colorSpaceCMYKU16 = new KisCmykU16ColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisCmykU16ColorSpaceFactory();
diff --git a/krita/colorspaces/cmyk_u16/cmyk_u16_plugin.h b/krita/colorspaces/cmyk_u16/cmyk_u16_plugin.h
index 90dce548..07224a14 100644
--- a/krita/colorspaces/cmyk_u16/cmyk_u16_plugin.h
+++ b/krita/colorspaces/cmyk_u16/cmyk_u16_plugin.h
@@ -27,8 +27,9 @@
class CMYKU16Plugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- CMYKU16Plugin(QObject *parent, const char *name, const QStringList &);
+ CMYKU16Plugin(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~CMYKU16Plugin();
};
diff --git a/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.cc b/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.cc
index 92ac3c83..3f2ccc80 100644
--- a/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.cc
+++ b/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.cc
@@ -23,7 +23,7 @@
#include LCMS_HEADER
-#include <qimage.h>
+#include <tqimage.h>
#include <kdebug.h>
#include <klocale.h>
@@ -36,20 +36,20 @@
#include "kis_colorspace_factory_registry.h"
namespace {
- const Q_INT32 MAX_CHANNEL_CMYK = 4;
- const Q_INT32 MAX_CHANNEL_CMYKA = 5;
+ const TQ_INT32 MAX_CHANNEL_CMYK = 4;
+ const TQ_INT32 MAX_CHANNEL_CMYKA = 5;
}
-KisCmykU16ColorSpace::KisCmykU16ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) :
- KisU16BaseColorSpace(KisID("CMYKA16", i18n("CMYK (16-bit integer/channel)")), TYPE_CMYK5_16, icSigCmykData, parent, p)
+KisCmykU16ColorSpace::KisCmykU16ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) :
+ KisU16BaseColorSpace(KisID("CMYKA16", i18n("CMYK (16-bit integer/channel)")), TYPE_CMYK5_16, icSigCmykData, tqparent, p)
{
- m_channels.push_back(new KisChannelInfo(i18n("Cyan"), i18n("C"), 0 * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), Qt::cyan));
- m_channels.push_back(new KisChannelInfo(i18n("Magenta"), i18n("M"), 1 * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), Qt::magenta));
- m_channels.push_back(new KisChannelInfo(i18n("Yellow"), i18n("Y"), 2 * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), Qt::yellow));
- m_channels.push_back(new KisChannelInfo(i18n("Black"), i18n("K"), 3 * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), Qt::black));
- m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 4 * sizeof(Q_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(Q_UINT16)));
+ m_channels.push_back(new KisChannelInfo(i18n("Cyan"), i18n("C"), 0 * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQt::cyan));
+ m_channels.push_back(new KisChannelInfo(i18n("Magenta"), i18n("M"), 1 * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQt::magenta));
+ m_channels.push_back(new KisChannelInfo(i18n("Yellow"), i18n("Y"), 2 * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQt::yellow));
+ m_channels.push_back(new KisChannelInfo(i18n("Black"), i18n("K"), 3 * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQt::black));
+ m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 4 * sizeof(TQ_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(TQ_UINT16)));
- m_alphaPos = PIXEL_ALPHA * sizeof(Q_UINT16);
+ m_alphaPos = PIXEL_ALPHA * sizeof(TQ_UINT16);
init();
}
@@ -58,16 +58,16 @@ KisCmykU16ColorSpace::~KisCmykU16ColorSpace()
{
}
-void KisCmykU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const
+void KisCmykU16ColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const
{
- Q_UINT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalBlack = 0, newAlpha = 0;
+ TQ_UINT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalBlack = 0, newAlpha = 0;
while (nColors--)
{
const Pixel *pixel = reinterpret_cast<const Pixel *>(*colors);
- Q_UINT32 alpha = pixel->alpha;
- Q_UINT32 alphaTimesWeight = UINT16_MULT(alpha, UINT8_TO_UINT16(*weights));
+ TQ_UINT32 alpha = pixel->alpha;
+ TQ_UINT32 alphaTimesWeight = UINT16_MULT(alpha, UINT8_TO_UINT16(*weights));
totalCyan += UINT16_MULT(pixel->cyan, alphaTimesWeight);
totalMagenta += UINT16_MULT(pixel->magenta, alphaTimesWeight);
@@ -98,15 +98,15 @@ void KisCmykU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weig
dstPixel->black = totalBlack;
}
-void KisCmykU16ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const
+void KisCmykU16ColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const
{
- Q_INT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalK = 0, totalAlpha = 0;
+ TQ_INT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalK = 0, totalAlpha = 0;
while (nColors--)
{
const Pixel * pixel = reinterpret_cast<const Pixel *>( *colors );
- Q_INT32 weight = *kernelValues;
+ TQ_INT32 weight = *kernelValues;
if (weight != 0) {
totalCyan += pixel->cyan * weight;
@@ -122,40 +122,40 @@ void KisCmykU16ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValue
Pixel * p = reinterpret_cast< Pixel *>( dst );
if (channelFlags & KisChannelInfo::FLAG_COLOR) {
- p->cyan = CLAMP( ( totalCyan / factor) + offset, 0, Q_UINT16_MAX);
- p->magenta = CLAMP( ( totalMagenta / factor) + offset, 0, Q_UINT16_MAX);
- p->yellow = CLAMP( ( totalYellow / factor) + offset, 0, Q_UINT16_MAX);
- p->black = CLAMP( ( totalK / factor) + offset, 0, Q_UINT16_MAX);
+ p->cyan = CLAMP( ( totalCyan / factor) + offset, 0, TQ_UINT16_MAX);
+ p->magenta = CLAMP( ( totalMagenta / factor) + offset, 0, TQ_UINT16_MAX);
+ p->yellow = CLAMP( ( totalYellow / factor) + offset, 0, TQ_UINT16_MAX);
+ p->black = CLAMP( ( totalK / factor) + offset, 0, TQ_UINT16_MAX);
}
if (channelFlags & KisChannelInfo::FLAG_ALPHA) {
- p->alpha = CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT16_MAX);
+ p->alpha = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT16_MAX);
}
}
-void KisCmykU16ColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels)
+void KisCmykU16ColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels)
{
- Q_UINT32 psize = pixelSize();
+ TQ_UINT32 psize = pixelSize();
while (nPixels--)
{
Pixel * p = reinterpret_cast< Pixel *>( src );
- p->cyan = Q_UINT16_MAX - p->cyan;
- p->magenta = Q_UINT16_MAX - p->magenta;
- p->yellow = Q_UINT16_MAX - p->yellow;
- p->black = Q_UINT16_MAX - p->black;
+ p->cyan = TQ_UINT16_MAX - p->cyan;
+ p->magenta = TQ_UINT16_MAX - p->magenta;
+ p->yellow = TQ_UINT16_MAX - p->yellow;
+ p->black = TQ_UINT16_MAX - p->black;
src += psize;
}
}
-void KisCmykU16ColorSpace::applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, KisColorAdjustment *adj, Q_INT32 nPixels)
+void KisCmykU16ColorSpace::applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *adj, TQ_INT32 nPixels)
{
- Q_UINT32 psize = pixelSize();
+ TQ_UINT32 psize = pixelSize();
- Q_UINT8 * tmp = new Q_UINT8[nPixels * psize];
- Q_UINT8 * tmpPtr = tmp;
+ TQ_UINT8 * tmp = new TQ_UINT8[nPixels * psize];
+ TQ_UINT8 * tmpPtr = tmp;
memcpy(tmp, dst, nPixels * psize);
KisAbstractColorSpace::applyAdjustment(src, dst, adj, nPixels);
@@ -164,8 +164,8 @@ void KisCmykU16ColorSpace::applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, Kis
while (nPixels--)
{
- Q_UINT16 *pixelAlphaSrc = reinterpret_cast<Q_UINT16 *>(tmpPtr + m_alphaPos);
- Q_UINT16 *pixelAlphaDst = reinterpret_cast<Q_UINT16 *>(dst + m_alphaPos);
+ TQ_UINT16 *pixelAlphaSrc = reinterpret_cast<TQ_UINT16 *>(tmpPtr + m_alphaPos);
+ TQ_UINT16 *pixelAlphaDst = reinterpret_cast<TQ_UINT16 *>(dst + m_alphaPos);
*pixelAlphaDst= *pixelAlphaSrc;
@@ -176,61 +176,61 @@ void KisCmykU16ColorSpace::applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, Kis
delete [] tmp;
}
-QValueVector<KisChannelInfo *> KisCmykU16ColorSpace::channels() const
+TQValueVector<KisChannelInfo *> KisCmykU16ColorSpace::channels() const
{
return m_channels;
}
-Q_UINT32 KisCmykU16ColorSpace::nChannels() const
+TQ_UINT32 KisCmykU16ColorSpace::nChannels() const
{
return MAX_CHANNEL_CMYKA;
}
-Q_UINT32 KisCmykU16ColorSpace::nColorChannels() const
+TQ_UINT32 KisCmykU16ColorSpace::nColorChannels() const
{
return MAX_CHANNEL_CMYK;
}
-Q_UINT32 KisCmykU16ColorSpace::pixelSize() const
+TQ_UINT32 KisCmykU16ColorSpace::pixelSize() const
{
- return MAX_CHANNEL_CMYKA * sizeof(Q_UINT16);
+ return MAX_CHANNEL_CMYKA * sizeof(TQ_UINT16);
}
-void KisCmykU16ColorSpace::getSingleChannelPixel(Q_UINT8 *dstPixel, const Q_UINT8 *srcPixel, Q_UINT32 channelIndex)
+void KisCmykU16ColorSpace::getSingleChannelPixel(TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex)
{
- if (channelIndex < (Q_UINT32)MAX_CHANNEL_CMYKA) {
+ if (channelIndex < (TQ_UINT32)MAX_CHANNEL_CMYKA) {
- memset(dstPixel, 0, MAX_CHANNEL_CMYKA * sizeof(Q_UINT16));
+ memset(dstPixel, 0, MAX_CHANNEL_CMYKA * sizeof(TQ_UINT16));
if (U16_OPACITY_TRANSPARENT != 0) {
dstPixel[PIXEL_ALPHA] = U16_OPACITY_TRANSPARENT;
}
- memcpy(dstPixel + (channelIndex * sizeof(Q_UINT16)), srcPixel + (channelIndex * sizeof(Q_UINT16)), sizeof(Q_UINT16));
+ memcpy(dstPixel + (channelIndex * sizeof(TQ_UINT16)), srcPixel + (channelIndex * sizeof(TQ_UINT16)), sizeof(TQ_UINT16));
}
}
-void KisCmykU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisCmykU16ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
while (rows > 0) {
- const Q_UINT16 *src = reinterpret_cast<const Q_UINT16 *>(srcRowStart);
- Q_UINT16 *dst = reinterpret_cast<Q_UINT16 *>(dstRowStart);
- const Q_UINT8 *mask = maskRowStart;
- Q_INT32 columns = numColumns;
+ const TQ_UINT16 *src = reinterpret_cast<const TQ_UINT16 *>(srcRowStart);
+ TQ_UINT16 *dst = reinterpret_cast<TQ_UINT16 *>(dstRowStart);
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
+ TQ_INT32 columns = numColumns;
while (columns > 0) {
- Q_UINT16 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT16 srcAlpha = src[PIXEL_ALPHA];
- // apply the alphamask
- if (mask != 0) {
- Q_UINT8 U8_mask = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ TQ_UINT8 U8_tqmask = *tqmask;
- if (U8_mask != OPACITY_OPAQUE) {
- srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask));
+ if (U8_tqmask != OPACITY_OPAQUE) {
+ srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask));
}
- mask++;
+ tqmask++;
}
if (srcAlpha != U16_OPACITY_TRANSPARENT) {
@@ -240,16 +240,16 @@ void KisCmykU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
}
if (srcAlpha == U16_OPACITY_OPAQUE) {
- memcpy(dst, src, MAX_CHANNEL_CMYKA * sizeof(Q_UINT16));
+ memcpy(dst, src, MAX_CHANNEL_CMYKA * sizeof(TQ_UINT16));
} else {
- Q_UINT16 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT16 dstAlpha = dst[PIXEL_ALPHA];
- Q_UINT16 srcBlend;
+ TQ_UINT16 srcBlend;
if (dstAlpha == U16_OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -260,7 +260,7 @@ void KisCmykU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
}
if (srcBlend == U16_OPACITY_OPAQUE) {
- memcpy(dst, src, MAX_CHANNEL_CMYK * sizeof(Q_UINT16));
+ memcpy(dst, src, MAX_CHANNEL_CMYK * sizeof(TQ_UINT16));
} else {
dst[PIXEL_CYAN] = UINT16_BLEND(src[PIXEL_CYAN], dst[PIXEL_CYAN], srcBlend);
dst[PIXEL_MAGENTA] = UINT16_BLEND(src[PIXEL_MAGENTA], dst[PIXEL_MAGENTA], srcBlend);
@@ -278,8 +278,8 @@ void KisCmykU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart) {
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart) {
+ tqmaskRowStart += tqmaskRowStride;
}
}
}
@@ -287,25 +287,25 @@ void KisCmykU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
#define COMMON_COMPOSITE_OP_PROLOG() \
while (rows > 0) { \
\
- const Q_UINT16 *src = reinterpret_cast<const Q_UINT16 *>(srcRowStart); \
- Q_UINT16 *dst = reinterpret_cast<Q_UINT16 *>(dstRowStart); \
- Q_INT32 columns = numColumns; \
- const Q_UINT8 *mask = maskRowStart; \
+ const TQ_UINT16 *src = reinterpret_cast<const TQ_UINT16 *>(srcRowStart); \
+ TQ_UINT16 *dst = reinterpret_cast<TQ_UINT16 *>(dstRowStart); \
+ TQ_INT32 columns = numColumns; \
+ const TQ_UINT8 *tqmask = tqmaskRowStart; \
\
while (columns > 0) { \
\
- Q_UINT16 srcAlpha = src[PIXEL_ALPHA]; \
- Q_UINT16 dstAlpha = dst[PIXEL_ALPHA]; \
+ TQ_UINT16 srcAlpha = src[PIXEL_ALPHA]; \
+ TQ_UINT16 dstAlpha = dst[PIXEL_ALPHA]; \
\
- srcAlpha = QMIN(srcAlpha, dstAlpha); \
+ srcAlpha = TQMIN(srcAlpha, dstAlpha); \
\
- if (mask != 0) { \
- Q_UINT8 U8_mask = *mask; \
+ if (tqmask != 0) { \
+ TQ_UINT8 U8_tqmask = *tqmask; \
\
- if (U8_mask != OPACITY_OPAQUE) { \
- srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask)); \
+ if (U8_tqmask != OPACITY_OPAQUE) { \
+ srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask)); \
} \
- mask++; \
+ tqmask++; \
} \
\
if (srcAlpha != U16_OPACITY_TRANSPARENT) { \
@@ -314,12 +314,12 @@ void KisCmykU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
srcAlpha = UINT16_MULT(srcAlpha, opacity); \
} \
\
- Q_UINT16 srcBlend; \
+ TQ_UINT16 srcBlend; \
\
if (dstAlpha == U16_OPACITY_OPAQUE) { \
srcBlend = srcAlpha; \
} else { \
- Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); \
+ TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); \
dst[PIXEL_ALPHA] = newAlpha; \
\
if (newAlpha != 0) { \
@@ -340,20 +340,20 @@ void KisCmykU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
rows--; \
srcRowStart += srcRowStride; \
dstRowStart += dstRowStride; \
- if(maskRowStart) { \
- maskRowStart += maskRowStride; \
+ if(tqmaskRowStart) { \
+ tqmaskRowStart += tqmaskRowStride; \
} \
}
-void KisCmykU16ColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisCmykU16ColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_CMYK; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
srcColor = UINT16_MULT(srcColor, dstColor);
@@ -366,19 +366,19 @@ void KisCmykU16ColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRo
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisCmykU16ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisCmykU16ColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_CMYK; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
- srcColor = QMIN((dstColor * (UINT16_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT16_MAX);
+ srcColor = TQMIN((dstColor * (UINT16_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT16_MAX);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -387,19 +387,19 @@ void KisCmykU16ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisCmykU16ColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisCmykU16ColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_CMYK; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
srcColor = UINT16_MAX - UINT16_MULT(UINT16_MAX - dstColor, UINT16_MAX - srcColor);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -408,19 +408,19 @@ void KisCmykU16ColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisCmykU16ColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisCmykU16ColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_CMYK; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
srcColor = UINT16_MULT(dstColor, dstColor + 2u * UINT16_MULT(srcColor, UINT16_MAX - dstColor));
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -429,19 +429,19 @@ void KisCmykU16ColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRow
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisCmykU16ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisCmykU16ColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_CMYK; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
- srcColor = QMIN((dstColor * (UINT16_MAX + 1u)) / (UINT16_MAX + 1u - srcColor), UINT16_MAX);
+ srcColor = TQMIN((dstColor * (UINT16_MAX + 1u)) / (UINT16_MAX + 1u - srcColor), UINT16_MAX);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -450,20 +450,20 @@ void KisCmykU16ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisCmykU16ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisCmykU16ColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_CMYK; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
- srcColor = QMIN(((UINT16_MAX - dstColor) * (UINT16_MAX + 1u)) / (srcColor + 1u), UINT16_MAX);
+ srcColor = TQMIN(((UINT16_MAX - dstColor) * (UINT16_MAX + 1u)) / (srcColor + 1u), UINT16_MAX);
if (srcColor > UINT16_MAX - srcColor) srcColor = UINT16_MAX;
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -472,19 +472,19 @@ void KisCmykU16ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisCmykU16ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisCmykU16ColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_CMYK; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
- srcColor = QMIN(srcColor, dstColor);
+ srcColor = TQMIN(srcColor, dstColor);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -493,19 +493,19 @@ void KisCmykU16ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisCmykU16ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisCmykU16ColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_CMYK; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
- srcColor = QMAX(srcColor, dstColor);
+ srcColor = TQMAX(srcColor, dstColor);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -514,34 +514,34 @@ void KisCmykU16ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRow
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisCmykU16ColorSpace::compositeErase(Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT16 /*opacity*/)
+void KisCmykU16ColorSpace::compositeErase(TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT16 /*opacity*/)
{
while (rows-- > 0)
{
const Pixel *s = reinterpret_cast<const Pixel *>(src);
Pixel *d = reinterpret_cast<Pixel *>(dst);
- const Q_UINT8 *mask = srcAlphaMask;
+ const TQ_UINT8 *tqmask = srcAlphaMask;
- for (Q_INT32 i = cols; i > 0; i--, s++, d++)
+ for (TQ_INT32 i = cols; i > 0; i--, s++, d++)
{
- Q_UINT16 srcAlpha = s->alpha;
+ TQ_UINT16 srcAlpha = s->alpha;
- // apply the alphamask
- if (mask != 0) {
- Q_UINT8 U8_mask = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ TQ_UINT8 U8_tqmask = *tqmask;
- if (U8_mask != OPACITY_OPAQUE) {
- srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_mask));
+ if (U8_tqmask != OPACITY_OPAQUE) {
+ srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_tqmask));
}
- mask++;
+ tqmask++;
}
d->alpha = UINT16_MULT(srcAlpha, d->alpha);
}
@@ -549,31 +549,31 @@ void KisCmykU16ColorSpace::compositeErase(Q_UINT8 *dst,
dst += dstRowSize;
src += srcRowSize;
if(srcAlphaMask) {
- srcAlphaMask += maskRowStride;
+ srcAlphaMask += tqmaskRowStride;
}
}
}
-void KisCmykU16ColorSpace::bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *mask,
- Q_INT32 maskRowStride,
- Q_UINT8 U8_opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+void KisCmykU16ColorSpace::bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *tqmask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 U8_opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op)
{
- Q_UINT16 opacity = UINT8_TO_UINT16(U8_opacity);
+ TQ_UINT16 opacity = UINT8_TO_UINT16(U8_opacity);
switch (op.op()) {
case COMPOSITE_UNDEF:
// Undefined == no composition
break;
case COMPOSITE_OVER:
- compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_IN:
//compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -602,16 +602,16 @@ void KisCmykU16ColorSpace::bitBlt(Q_UINT8 *dst,
//compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_MULT:
- compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DIVIDE:
- compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BUMPMAP:
//compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_COPY:
- compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, U8_opacity);
+ compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, U8_opacity);
break;
case COMPOSITE_COPY_CYAN:
//compositeCopyCyan(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -646,22 +646,22 @@ void KisCmykU16ColorSpace::bitBlt(Q_UINT8 *dst,
// No composition.
break;
case COMPOSITE_DARKEN:
- compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_LIGHTEN:
- compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_HUE:
- //compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ //compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_SATURATION:
- //compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ //compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_VALUE:
- //compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ //compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLOR:
- //compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ //compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLORIZE:
//compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -670,24 +670,24 @@ void KisCmykU16ColorSpace::bitBlt(Q_UINT8 *dst,
//compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_SCREEN:
- compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_OVERLAY:
- compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
- compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DODGE:
- compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BURN:
- compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ALPHA_DARKEN:
- abstractCompositeAlphaDarken<Q_UINT16, U16Mult, Uint8ToU16, U16OpacityTest,
+ abstractCompositeAlphaDarken<TQ_UINT16, U16Mult, Uint8ToU16, U16OpacityTest,
PIXEL_ALPHA, MAX_CHANNEL_CMYK, MAX_CHANNEL_CMYKA>(
- dst, dstRowStride, src, srcRowStride, mask, maskRowStride,
+ dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride,
rows, cols, opacity, U16Mult(), Uint8ToU16(), U16OpacityTest());
break;
default:
diff --git a/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.h b/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.h
index 227e18d2..1a70fc71 100644
--- a/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.h
+++ b/krita/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.h
@@ -18,7 +18,7 @@
#ifndef KIS_STRATEGY_COLORSPACE_CMYK_U16_H_
#define KIS_STRATEGY_COLORSPACE_CMYK_U16_H_
-#include <qcolor.h>
+#include <tqcolor.h>
#include <koffice_export.h>
@@ -31,15 +31,15 @@ class KRITATOOL_EXPORT KisCmykU16ColorSpace : public KisU16BaseColorSpace {
public:
struct Pixel {
- Q_UINT16 cyan;
- Q_UINT16 magenta;
- Q_UINT16 yellow;
- Q_UINT16 black;
- Q_UINT16 alpha;
+ TQ_UINT16 cyan;
+ TQ_UINT16 magenta;
+ TQ_UINT16 yellow;
+ TQ_UINT16 black;
+ TQ_UINT16 alpha;
};
public:
- KisCmykU16ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p);
+ KisCmykU16ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p);
virtual ~KisCmykU16ColorSpace();
virtual bool willDegrade(ColorSpaceIndependence independence)
@@ -52,51 +52,51 @@ public:
public:
- virtual QValueVector<KisChannelInfo *> channels() const;
- virtual Q_UINT32 nChannels() const;
- virtual Q_UINT32 nColorChannels() const;
- virtual Q_UINT32 pixelSize() const;
+ virtual TQValueVector<KisChannelInfo *> channels() const;
+ virtual TQ_UINT32 nChannels() const;
+ virtual TQ_UINT32 nColorChannels() const;
+ virtual TQ_UINT32 pixelSize() const;
- virtual void applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, KisColorAdjustment *adj, Q_INT32 nPixels);
- virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
- virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels);
- virtual void convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const;
- virtual void getSingleChannelPixel(Q_UINT8 *dstPixel, const Q_UINT8 *srcPixel, Q_UINT32 channelIndex);
+ virtual void applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *adj, TQ_INT32 nPixels);
+ virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const;
+ virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels);
+ virtual void convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const;
+ virtual void getSingleChannelPixel(TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex);
virtual KisCompositeOpList userVisiblecompositeOps() const;
protected:
- virtual void bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+ virtual void bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op);
- void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
+ void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
private:
friend class KisCmykU16ColorSpaceTester;
- static const Q_UINT8 PIXEL_CYAN = 0;
- static const Q_UINT8 PIXEL_MAGENTA = 1;
- static const Q_UINT8 PIXEL_YELLOW = 2;
- static const Q_UINT8 PIXEL_BLACK = 3;
- static const Q_UINT8 PIXEL_ALPHA = 4;
+ static const TQ_UINT8 PIXEL_CYAN = 0;
+ static const TQ_UINT8 PIXEL_MAGENTA = 1;
+ static const TQ_UINT8 PIXEL_YELLOW = 2;
+ static const TQ_UINT8 PIXEL_BLACK = 3;
+ static const TQ_UINT8 PIXEL_ALPHA = 4;
};
class KisCmykU16ColorSpaceFactory : public KisColorSpaceFactory
@@ -111,13 +111,13 @@ public:
/**
* lcms colorspace type definition.
*/
- virtual Q_UINT32 colorSpaceType() { return TYPE_CMYK5_16; };
+ virtual TQ_UINT32 colorSpaceType() { return TYPE_CMYK5_16; };
virtual icColorSpaceSignature colorSpaceSignature() { return icSigCmykData; };
- virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisCmykU16ColorSpace(parent, p); };
+ virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisCmykU16ColorSpace(tqparent, p); };
- virtual QString defaultProfile() { return "Offset printing, according to ISO/DIS 12647-2:2004, OFCOM, paper type 1 or 2 = coated art, 115 g/m2, screen ruling 60 cm-1, positive-acting plates"; };
+ virtual TQString defaultProfile() { return "Offset printing, according to ISO/DIS 12647-2:2004, OFCOM, paper type 1 or 2 = coated art, 115 g/m2, screen ruling 60 cm-1, positive-acting plates"; };
};
#endif // KIS_STRATEGY_COLORSPACE_CMYK_U16_H_
diff --git a/krita/colorspaces/cmyk_u8/cmyk_plugin.cc b/krita/colorspaces/cmyk_u8/cmyk_plugin.cc
index ccd5a1b4..d216417e 100644
--- a/krita/colorspaces/cmyk_u8/cmyk_plugin.cc
+++ b/krita/colorspaces/cmyk_u8/cmyk_plugin.cc
@@ -39,13 +39,13 @@ typedef KGenericFactory<CMYKPlugin> CMYKPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kritacmykplugin, CMYKPluginFactory( "krita" ) )
-CMYKPlugin::CMYKPlugin(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+CMYKPlugin::CMYKPlugin(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(CMYKPluginFactory::instance());
- if ( parent->inherits("KisColorSpaceFactoryRegistry") )
+ if ( tqparent->inherits("KisColorSpaceFactoryRegistry") )
{
- KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );
+ KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( tqparent );
KisColorSpace * colorSpaceCMYK = new KisCmykColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisCmykColorSpaceFactory();
diff --git a/krita/colorspaces/cmyk_u8/cmyk_plugin.h b/krita/colorspaces/cmyk_u8/cmyk_plugin.h
index c9cee97d..073a5e61 100644
--- a/krita/colorspaces/cmyk_u8/cmyk_plugin.h
+++ b/krita/colorspaces/cmyk_u8/cmyk_plugin.h
@@ -27,8 +27,9 @@
class CMYKPlugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- CMYKPlugin(QObject *parent, const char *name, const QStringList &);
+ CMYKPlugin(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~CMYKPlugin();
diff --git a/krita/colorspaces/cmyk_u8/composite.h b/krita/colorspaces/cmyk_u8/composite.h
index a037a054..4914a7df 100644
--- a/krita/colorspaces/cmyk_u8/composite.h
+++ b/krita/colorspaces/cmyk_u8/composite.h
@@ -19,55 +19,55 @@
#ifndef COMPOSITE_CMYK
#define COMPOSITE_CMYK
-void compositeCopyCyan(Q_INT32 stride,
- Q_UINT8 *dst,
- Q_INT32 dststride,
- Q_UINT8 *src,
- Q_INT32 srcstride,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeCopyCyan(TQ_INT32 stride,
+ TQ_UINT8 *dst,
+ TQ_INT32 dststride,
+ TQ_UINT8 *src,
+ TQ_INT32 srcstride,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
compositeCopyChannel(PIXEL_CYAN, stride, dst, dststride, src, srcstride, rows, cols, opacity);
}
-void compositeCopyMagenta(Q_INT32 stride,
- Q_UINT8 *dst,
- Q_INT32 dststride,
- Q_UINT8 *src,
- Q_INT32 srcstride,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeCopyMagenta(TQ_INT32 stride,
+ TQ_UINT8 *dst,
+ TQ_INT32 dststride,
+ TQ_UINT8 *src,
+ TQ_INT32 srcstride,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
compositeCopyChannel(PIXEL_MAGENTA, stride, dst, dststride, src, srcstride, rows, cols, opacity);
}
-void compositeCopyYellow(Q_INT32 stride,
- Q_UINT8 *dst,
- Q_INT32 dststride,
- Q_UINT8 *src,
- Q_INT32 srcstride,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeCopyYellow(TQ_INT32 stride,
+ TQ_UINT8 *dst,
+ TQ_INT32 dststride,
+ TQ_UINT8 *src,
+ TQ_INT32 srcstride,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
compositeCopyChannel(PIXEL_YELLOW, stride, dst, dststride, src, srcstride, rows, cols, opacity);
}
-void compositeCopyBlack(Q_INT32 stride,
- Q_UINT8 *dst,
- Q_INT32 dststride,
- Q_UINT8 *src,
- Q_INT32 srcstride,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeCopyBlack(TQ_INT32 stride,
+ TQ_UINT8 *dst,
+ TQ_INT32 dststride,
+ TQ_UINT8 *src,
+ TQ_INT32 srcstride,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
compositeCopyChannel(PIXEL_BLACK, stride, dst, dststride, src, srcstride, rows, cols, opacity);
}
diff --git a/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.cc b/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.cc
index d40be017..49256c26 100644
--- a/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.cc
+++ b/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.cc
@@ -20,7 +20,7 @@
#include <config.h>
#include LCMS_HEADER
-#include <qimage.h>
+#include <tqimage.h>
#include <kdebug.h>
#include <klocale.h>
@@ -33,18 +33,18 @@
#include "kis_integer_maths.h"
namespace cmyk {
- const Q_INT32 MAX_CHANNEL_CMYK = 4;
- const Q_INT32 MAX_CHANNEL_CMYKA = 5;
+ const TQ_INT32 MAX_CHANNEL_CMYK = 4;
+ const TQ_INT32 MAX_CHANNEL_CMYKA = 5;
}
-KisCmykColorSpace::KisCmykColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) :
- KisU8BaseColorSpace(KisID("CMYK", i18n("CMYK")), TYPE_CMYK5_8, icSigCmykData, parent, p)
+KisCmykColorSpace::KisCmykColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) :
+ KisU8BaseColorSpace(KisID("CMYK", i18n("CMYK")), TYPE_CMYK5_8, icSigCmykData, tqparent, p)
{
- m_channels.push_back(new KisChannelInfo(i18n("Cyan"), i18n("C"), 0, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, Qt::cyan));
- m_channels.push_back(new KisChannelInfo(i18n("Magenta"), i18n("M"), 1, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, Qt::magenta));
- m_channels.push_back(new KisChannelInfo(i18n("Yellow"), i18n("Y"), 2, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, Qt::yellow));
- m_channels.push_back(new KisChannelInfo(i18n("Black"), i18n("K"), 3, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, Qt::black));
- m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 4, KisChannelInfo::ALPHA, KisChannelInfo::UINT8, 1, Qt::white));
+ m_channels.push_back(new KisChannelInfo(i18n("Cyan"), i18n("C"), 0, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQt::cyan));
+ m_channels.push_back(new KisChannelInfo(i18n("Magenta"), i18n("M"), 1, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQt::magenta));
+ m_channels.push_back(new KisChannelInfo(i18n("Yellow"), i18n("Y"), 2, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQt::yellow));
+ m_channels.push_back(new KisChannelInfo(i18n("Black"), i18n("K"), 3, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQt::black));
+ m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 4, KisChannelInfo::ALPHA, KisChannelInfo::UINT8, 1, TQt::white));
m_alphaPos = PIXEL_CMYK_ALPHA;
@@ -55,14 +55,14 @@ KisCmykColorSpace::~KisCmykColorSpace()
{
}
-void KisCmykColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const
+void KisCmykColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const
{
- Q_UINT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalK = 0, totalAlpha = 0;
+ TQ_UINT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalK = 0, totalAlpha = 0;
while (nColors--)
{
- Q_UINT32 alpha = (*colors)[4];
- Q_UINT32 alphaTimesWeight = alpha * *weights;
+ TQ_UINT32 alpha = (*colors)[4];
+ TQ_UINT32 alphaTimesWeight = alpha * *weights;
totalCyan += (*colors)[0] * alphaTimesWeight;
totalMagenta += (*colors)[1] * alphaTimesWeight;
@@ -87,31 +87,31 @@ void KisCmykColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights
totalK = totalK / totalAlpha;
} // else the values are already 0 too
- Q_UINT32 dstCyan = totalCyan;
+ TQ_UINT32 dstCyan = totalCyan;
if (dstCyan > 255) dstCyan = 255;
dst[0] = dstCyan;
- Q_UINT32 dstMagenta = totalMagenta;
+ TQ_UINT32 dstMagenta = totalMagenta;
if (dstMagenta > 255) dstMagenta = 255;
dst[1] = dstMagenta;
- Q_UINT32 dstYellow = totalYellow;
+ TQ_UINT32 dstYellow = totalYellow;
if (dstYellow > 255) dstYellow = 255;
dst[2] = dstYellow;
- Q_UINT32 dstK = totalK;
+ TQ_UINT32 dstK = totalK;
if (dstK > 255) dstK = 255;
dst[3] = dstK;
}
-void KisCmykColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const
+void KisCmykColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const
{
- Q_INT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalK = 0, totalAlpha = 0;
+ TQ_INT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalK = 0, totalAlpha = 0;
while (nColors--)
{
- Q_INT32 weight = *kernelValues;
+ TQ_INT32 weight = *kernelValues;
if (weight != 0) {
totalCyan += (*colors)[PIXEL_CYAN] * weight;
@@ -126,37 +126,37 @@ void KisCmykColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues,
if (channelFlags & KisChannelInfo::FLAG_COLOR) {
- dst[PIXEL_CYAN] = CLAMP((totalCyan / factor) + offset, 0, Q_UINT8_MAX);
- dst[PIXEL_MAGENTA] = CLAMP((totalMagenta / factor) + offset, 0, Q_UINT8_MAX);
- dst[PIXEL_YELLOW] = CLAMP((totalYellow / factor) + offset, 0, Q_UINT8_MAX);
- dst[PIXEL_BLACK] = CLAMP((totalK / factor) + offset, 0, Q_UINT8_MAX);
+ dst[PIXEL_CYAN] = CLAMP((totalCyan / factor) + offset, 0, TQ_UINT8_MAX);
+ dst[PIXEL_MAGENTA] = CLAMP((totalMagenta / factor) + offset, 0, TQ_UINT8_MAX);
+ dst[PIXEL_YELLOW] = CLAMP((totalYellow / factor) + offset, 0, TQ_UINT8_MAX);
+ dst[PIXEL_BLACK] = CLAMP((totalK / factor) + offset, 0, TQ_UINT8_MAX);
}
if (channelFlags & KisChannelInfo::FLAG_ALPHA) {
- dst[PIXEL_CMYK_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT8_MAX);
+ dst[PIXEL_CMYK_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT8_MAX);
}
}
-void KisCmykColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels)
+void KisCmykColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels)
{
- Q_UINT32 psize = pixelSize();
+ TQ_UINT32 psize = pixelSize();
while (nPixels--)
{
- src[PIXEL_CYAN] = Q_UINT8_MAX - src[PIXEL_CYAN];
- src[PIXEL_MAGENTA] = Q_UINT8_MAX - src[PIXEL_MAGENTA];
- src[PIXEL_YELLOW] = Q_UINT8_MAX - src[PIXEL_YELLOW];
- src[PIXEL_BLACK] = Q_UINT8_MAX - src[PIXEL_BLACK];
+ src[PIXEL_CYAN] = TQ_UINT8_MAX - src[PIXEL_CYAN];
+ src[PIXEL_MAGENTA] = TQ_UINT8_MAX - src[PIXEL_MAGENTA];
+ src[PIXEL_YELLOW] = TQ_UINT8_MAX - src[PIXEL_YELLOW];
+ src[PIXEL_BLACK] = TQ_UINT8_MAX - src[PIXEL_BLACK];
src += psize;
}
}
-void KisCmykColorSpace::applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, KisColorAdjustment *adj, Q_INT32 nPixels)
+void KisCmykColorSpace::applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *adj, TQ_INT32 nPixels)
{
- Q_UINT32 psize = pixelSize();
+ TQ_UINT32 psize = pixelSize();
- Q_UINT8 * tmp = new Q_UINT8[nPixels * psize];
- Q_UINT8 * tmpPtr = tmp;
+ TQ_UINT8 * tmp = new TQ_UINT8[nPixels * psize];
+ TQ_UINT8 * tmpPtr = tmp;
memcpy(tmp, dst, nPixels * psize);
KisAbstractColorSpace::applyAdjustment(src, dst, adj, nPixels);
@@ -174,61 +174,61 @@ void KisCmykColorSpace::applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, KisCol
delete [] tmp;
}
-QValueVector<KisChannelInfo *> KisCmykColorSpace::channels() const
+TQValueVector<KisChannelInfo *> KisCmykColorSpace::channels() const
{
return m_channels;
}
-Q_UINT32 KisCmykColorSpace::nChannels() const
+TQ_UINT32 KisCmykColorSpace::nChannels() const
{
return cmyk::MAX_CHANNEL_CMYKA;
}
-Q_UINT32 KisCmykColorSpace::nColorChannels() const
+TQ_UINT32 KisCmykColorSpace::nColorChannels() const
{
return cmyk::MAX_CHANNEL_CMYK;
}
-Q_UINT32 KisCmykColorSpace::pixelSize() const
+TQ_UINT32 KisCmykColorSpace::pixelSize() const
{
return cmyk::MAX_CHANNEL_CMYKA;
}
-void KisCmykColorSpace::getSingleChannelPixel(Q_UINT8 *dstPixel, const Q_UINT8 *srcPixel, Q_UINT32 channelIndex)
+void KisCmykColorSpace::getSingleChannelPixel(TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex)
{
- if (channelIndex < (Q_UINT32)cmyk::MAX_CHANNEL_CMYKA) {
+ if (channelIndex < (TQ_UINT32)cmyk::MAX_CHANNEL_CMYKA) {
- memset(dstPixel, 0, cmyk::MAX_CHANNEL_CMYKA * sizeof(Q_UINT8));
+ memset(dstPixel, 0, cmyk::MAX_CHANNEL_CMYKA * sizeof(TQ_UINT8));
if (OPACITY_TRANSPARENT != 0) {
dstPixel[PIXEL_CMYK_ALPHA] = OPACITY_TRANSPARENT;
}
- memcpy(dstPixel + (channelIndex * sizeof(Q_UINT8)), srcPixel + (channelIndex * sizeof(Q_UINT8)), sizeof(Q_UINT8));
+ memcpy(dstPixel + (channelIndex * sizeof(TQ_UINT8)), srcPixel + (channelIndex * sizeof(TQ_UINT8)), sizeof(TQ_UINT8));
}
}
-void KisCmykColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisCmykColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- const Q_UINT8 *mask = maskRowStart;
- Q_INT32 columns = numColumns;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
+ TQ_INT32 columns = numColumns;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_CMYK_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_CMYK_ALPHA];
- // apply the alphamask
- if (mask != 0) {
- Q_UINT8 U8_mask = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ TQ_UINT8 U8_tqmask = *tqmask;
- if (U8_mask != OPACITY_OPAQUE) {
- srcAlpha = UINT8_MULT(srcAlpha, U8_mask);
+ if (U8_tqmask != OPACITY_OPAQUE) {
+ srcAlpha = UINT8_MULT(srcAlpha, U8_tqmask);
}
- mask++;
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -238,16 +238,16 @@ void KisCmykColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
}
if (srcAlpha == OPACITY_OPAQUE) {
- memcpy(dst, src, cmyk::MAX_CHANNEL_CMYKA * sizeof(Q_UINT8));
+ memcpy(dst, src, cmyk::MAX_CHANNEL_CMYKA * sizeof(TQ_UINT8));
} else {
- Q_UINT8 dstAlpha = dst[PIXEL_CMYK_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_CMYK_ALPHA];
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_CMYK_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -258,7 +258,7 @@ void KisCmykColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
}
if (srcBlend == OPACITY_OPAQUE) {
- memcpy(dst, src, cmyk::MAX_CHANNEL_CMYK * sizeof(Q_UINT8));
+ memcpy(dst, src, cmyk::MAX_CHANNEL_CMYK * sizeof(TQ_UINT8));
} else {
dst[PIXEL_CYAN] = UINT8_BLEND(src[PIXEL_CYAN], dst[PIXEL_CYAN], srcBlend);
dst[PIXEL_MAGENTA] = UINT8_BLEND(src[PIXEL_MAGENTA], dst[PIXEL_MAGENTA], srcBlend);
@@ -276,8 +276,8 @@ void KisCmykColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart) {
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart) {
+ tqmaskRowStart += tqmaskRowStride;
}
}
}
@@ -285,25 +285,25 @@ void KisCmykColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
#define COMMON_COMPOSITE_OP_PROLOG() \
while (rows > 0) { \
\
- const Q_UINT8 *src = srcRowStart; \
- Q_UINT8 *dst = dstRowStart; \
- Q_INT32 columns = numColumns; \
- const Q_UINT8 *mask = maskRowStart; \
+ const TQ_UINT8 *src = srcRowStart; \
+ TQ_UINT8 *dst = dstRowStart; \
+ TQ_INT32 columns = numColumns; \
+ const TQ_UINT8 *tqmask = tqmaskRowStart; \
\
while (columns > 0) { \
\
- Q_UINT8 srcAlpha = src[PIXEL_CMYK_ALPHA]; \
- Q_UINT8 dstAlpha = dst[PIXEL_CMYK_ALPHA]; \
+ TQ_UINT8 srcAlpha = src[PIXEL_CMYK_ALPHA]; \
+ TQ_UINT8 dstAlpha = dst[PIXEL_CMYK_ALPHA]; \
\
- srcAlpha = QMIN(srcAlpha, dstAlpha); \
+ srcAlpha = TQMIN(srcAlpha, dstAlpha); \
\
- if (mask != 0) { \
- Q_UINT8 U8_mask = *mask; \
+ if (tqmask != 0) { \
+ TQ_UINT8 U8_tqmask = *tqmask; \
\
- if (U8_mask != OPACITY_OPAQUE) { \
- srcAlpha = UINT8_MULT(srcAlpha, U8_mask); \
+ if (U8_tqmask != OPACITY_OPAQUE) { \
+ srcAlpha = UINT8_MULT(srcAlpha, U8_tqmask); \
} \
- mask++; \
+ tqmask++; \
} \
\
if (srcAlpha != OPACITY_TRANSPARENT) { \
@@ -312,12 +312,12 @@ void KisCmykColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
srcAlpha = UINT8_MULT(srcAlpha, opacity); \
} \
\
- Q_UINT8 srcBlend; \
+ TQ_UINT8 srcBlend; \
\
if (dstAlpha == OPACITY_OPAQUE) { \
srcBlend = srcAlpha; \
} else { \
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); \
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); \
dst[PIXEL_CMYK_ALPHA] = newAlpha; \
\
if (newAlpha != 0) { \
@@ -338,20 +338,20 @@ void KisCmykColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
rows--; \
srcRowStart += srcRowStride; \
dstRowStart += dstRowStride; \
- if(maskRowStart) { \
- maskRowStart += maskRowStride; \
+ if(tqmaskRowStart) { \
+ tqmaskRowStart += tqmaskRowStride; \
} \
}
-void KisCmykColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisCmykColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
srcColor = UINT8_MULT(srcColor, dstColor);
@@ -364,19 +364,19 @@ void KisCmykColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisCmykColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisCmykColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
- srcColor = QMIN((dstColor * (UINT8_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT8_MAX);
+ srcColor = TQMIN((dstColor * (UINT8_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT8_MAX);
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -385,19 +385,19 @@ void KisCmykColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisCmykColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisCmykColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
srcColor = UINT8_MAX - UINT8_MULT(UINT8_MAX - dstColor, UINT8_MAX - srcColor);
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -406,19 +406,19 @@ void KisCmykColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisCmykColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisCmykColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
srcColor = UINT8_MULT(dstColor, dstColor + 2u * UINT8_MULT(srcColor, UINT8_MAX - dstColor));
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -427,19 +427,19 @@ void KisCmykColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisCmykColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisCmykColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
- srcColor = QMIN((dstColor * (UINT8_MAX + 1u)) / (UINT8_MAX + 1u - srcColor), UINT8_MAX);
+ srcColor = TQMIN((dstColor * (UINT8_MAX + 1u)) / (UINT8_MAX + 1u - srcColor), UINT8_MAX);
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -448,20 +448,20 @@ void KisCmykColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisCmykColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisCmykColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
- srcColor = QMIN(((UINT8_MAX - dstColor) * (UINT8_MAX + 1u)) / (srcColor + 1u), UINT8_MAX);
+ srcColor = TQMIN(((UINT8_MAX - dstColor) * (UINT8_MAX + 1u)) / (srcColor + 1u), UINT8_MAX);
if (srcColor > UINT8_MAX - srcColor) srcColor = UINT8_MAX;
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -470,19 +470,19 @@ void KisCmykColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisCmykColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisCmykColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
- srcColor = QMIN(srcColor, dstColor);
+ srcColor = TQMIN(srcColor, dstColor);
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -491,19 +491,19 @@ void KisCmykColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisCmykColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisCmykColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
- srcColor = QMAX(srcColor, dstColor);
+ srcColor = TQMAX(srcColor, dstColor);
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -512,34 +512,34 @@ void KisCmykColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisCmykColorSpace::compositeErase(Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 /*opacity*/)
+void KisCmykColorSpace::compositeErase(TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 /*opacity*/)
{
while (rows-- > 0)
{
const Pixel *s = reinterpret_cast<const Pixel *>(src);
Pixel *d = reinterpret_cast<Pixel *>(dst);
- const Q_UINT8 *mask = srcAlphaMask;
+ const TQ_UINT8 *tqmask = srcAlphaMask;
- for (Q_INT32 i = cols; i > 0; i--, s++, d++)
+ for (TQ_INT32 i = cols; i > 0; i--, s++, d++)
{
- Q_UINT8 srcAlpha = s->alpha;
+ TQ_UINT8 srcAlpha = s->alpha;
- // apply the alphamask
- if (mask != 0) {
- Q_UINT8 U8_mask = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ TQ_UINT8 U8_tqmask = *tqmask;
- if (U8_mask != OPACITY_OPAQUE) {
- srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, U8_mask);
+ if (U8_tqmask != OPACITY_OPAQUE) {
+ srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, U8_tqmask);
}
- mask++;
+ tqmask++;
}
d->alpha = UINT8_MULT(srcAlpha, d->alpha);
}
@@ -547,20 +547,20 @@ void KisCmykColorSpace::compositeErase(Q_UINT8 *dst,
dst += dstRowSize;
src += srcRowSize;
if(srcAlphaMask) {
- srcAlphaMask += maskRowStride;
+ srcAlphaMask += tqmaskRowStride;
}
}
}
-void KisCmykColorSpace::bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *mask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+void KisCmykColorSpace::bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *tqmask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op)
{
@@ -569,7 +569,7 @@ void KisCmykColorSpace::bitBlt(Q_UINT8 *dst,
// Undefined == no composition
break;
case COMPOSITE_OVER:
- compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_IN:
//compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -598,16 +598,16 @@ void KisCmykColorSpace::bitBlt(Q_UINT8 *dst,
//compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_MULT:
- compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DIVIDE:
- compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BUMPMAP:
//compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_COPY:
- compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COPY_CYAN:
//compositeCopyCyan(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -642,22 +642,22 @@ void KisCmykColorSpace::bitBlt(Q_UINT8 *dst,
// No composition.
break;
case COMPOSITE_DARKEN:
- compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_LIGHTEN:
- compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_HUE:
- //compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ //compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_SATURATION:
- //compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ //compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_VALUE:
- //compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ //compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLOR:
- //compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ //compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLORIZE:
//compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -666,24 +666,24 @@ void KisCmykColorSpace::bitBlt(Q_UINT8 *dst,
//compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_SCREEN:
- compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_OVERLAY:
- compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
- compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DODGE:
- compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BURN:
- compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ALPHA_DARKEN:
- abstractCompositeAlphaDarken<Q_UINT8, U8Mult, Uint8ToU8, U8OpacityTest,
+ abstractCompositeAlphaDarken<TQ_UINT8, U8Mult, Uint8ToU8, U8OpacityTest,
PIXEL_CMYK_ALPHA, cmyk::MAX_CHANNEL_CMYK, cmyk::MAX_CHANNEL_CMYKA>(
- dst, dstRowStride, src, srcRowStride, mask, maskRowStride,
+ dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride,
rows, cols, opacity, U8Mult(), Uint8ToU8(), U8OpacityTest());
break;
default:
diff --git a/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h b/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h
index b918f1aa..b02990bf 100644
--- a/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h
+++ b/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h
@@ -18,8 +18,8 @@
#ifndef KIS_STRATEGY_COLORSPACE_CMYK_H_
#define KIS_STRATEGY_COLORSPACE_CMYK_H_
-#include <qcolor.h>
-#include <qmap.h>
+#include <tqcolor.h>
+#include <tqmap.h>
#include <koffice_export.h>
#include "kis_global.h"
#include "kis_u8_base_colorspace.h"
@@ -30,14 +30,14 @@ public:
struct Pixel {
- Q_UINT16 cyan;
- Q_UINT16 magenta;
- Q_UINT16 yellow;
- Q_UINT16 black;
- Q_UINT16 alpha;
+ TQ_UINT16 cyan;
+ TQ_UINT16 magenta;
+ TQ_UINT16 yellow;
+ TQ_UINT16 black;
+ TQ_UINT16 alpha;
};
public:
- KisCmykColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p);
+ KisCmykColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p);
virtual ~KisCmykColorSpace();
@@ -53,53 +53,53 @@ public:
public:
- virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
- virtual void applyAdjustment(const Q_UINT8 *src, Q_UINT8 *dst, KisColorAdjustment *adj, Q_INT32 nPixels);
- virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels);
- virtual void convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const;
+ virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const;
+ virtual void applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *adj, TQ_INT32 nPixels);
+ virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels);
+ virtual void convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const;
// XXX: darken & intensity8?
- virtual QValueVector<KisChannelInfo *> channels() const;
- virtual Q_UINT32 nChannels() const;
- virtual Q_UINT32 nColorChannels() const;
- virtual Q_UINT32 pixelSize() const;
- virtual void getSingleChannelPixel(Q_UINT8 *dstPixel, const Q_UINT8 *srcPixel, Q_UINT32 channelIndex);
+ virtual TQValueVector<KisChannelInfo *> channels() const;
+ virtual TQ_UINT32 nChannels() const;
+ virtual TQ_UINT32 nColorChannels() const;
+ virtual TQ_UINT32 pixelSize() const;
+ virtual void getSingleChannelPixel(TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex);
virtual KisCompositeOpList userVisiblecompositeOps() const;
protected:
- virtual void bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+ virtual void bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op);
- void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
+ void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
private:
- Q_UINT8 * m_qcolordata;
+ TQ_UINT8 * m_qcolordata;
- static const Q_UINT8 PIXEL_CYAN = 0;
- static const Q_UINT8 PIXEL_MAGENTA = 1;
- static const Q_UINT8 PIXEL_YELLOW = 2;
- static const Q_UINT8 PIXEL_BLACK = 3;
- static const Q_UINT8 PIXEL_CMYK_ALPHA = 4;
+ static const TQ_UINT8 PIXEL_CYAN = 0;
+ static const TQ_UINT8 PIXEL_MAGENTA = 1;
+ static const TQ_UINT8 PIXEL_YELLOW = 2;
+ static const TQ_UINT8 PIXEL_BLACK = 3;
+ static const TQ_UINT8 PIXEL_CMYK_ALPHA = 4;
};
class KisCmykColorSpaceFactory : public KisColorSpaceFactory
@@ -114,13 +114,13 @@ public:
/**
* lcms colorspace type definition.
*/
- virtual Q_UINT32 colorSpaceType() { return TYPE_CMYK5_8; };
+ virtual TQ_UINT32 colorSpaceType() { return TYPE_CMYK5_8; };
virtual icColorSpaceSignature colorSpaceSignature() { return icSigCmykData; };
- virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisCmykColorSpace(parent, p); };
+ virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisCmykColorSpace(tqparent, p); };
- virtual QString defaultProfile() { return "Offset printing, according to ISO/DIS 12647-2:2004, OFCOM, paper type 1 or 2 = coated art, 115 g/m2, screen ruling 60 cm-1, positive-acting plates"; }; // Do not i18n -- this is from a data file
+ virtual TQString defaultProfile() { return "Offset printing, according to ISO/DIS 12647-2:2004, OFCOM, paper type 1 or 2 = coated art, 115 g/m2, screen ruling 60 cm-1, positive-acting plates"; }; // Do not i18n -- this is from a data file
};
#endif // KIS_STRATEGY_COLORSPACE_CMYK_H_
diff --git a/krita/colorspaces/gray_u16/gray_u16_plugin.cc b/krita/colorspaces/gray_u16/gray_u16_plugin.cc
index da32295f..f48ab6d5 100644
--- a/krita/colorspaces/gray_u16/gray_u16_plugin.cc
+++ b/krita/colorspaces/gray_u16/gray_u16_plugin.cc
@@ -35,14 +35,14 @@ typedef KGenericFactory<GRAYU16Plugin> GRAYU16PluginFactory;
K_EXPORT_COMPONENT_FACTORY( krita_gray_u16_plugin, GRAYU16PluginFactory( "krita" ) )
-GRAYU16Plugin::GRAYU16Plugin(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+GRAYU16Plugin::GRAYU16Plugin(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(GRAYU16PluginFactory::instance());
- if ( parent->inherits("KisColorSpaceFactoryRegistry") )
+ if ( tqparent->inherits("KisColorSpaceFactoryRegistry") )
{
- KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );
+ KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( tqparent );
KisColorSpace * colorSpaceGRAYU16 = new KisGrayU16ColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisGrayU16ColorSpaceFactory();
diff --git a/krita/colorspaces/gray_u16/gray_u16_plugin.h b/krita/colorspaces/gray_u16/gray_u16_plugin.h
index 89b2e119..39ef6c2a 100644
--- a/krita/colorspaces/gray_u16/gray_u16_plugin.h
+++ b/krita/colorspaces/gray_u16/gray_u16_plugin.h
@@ -27,8 +27,9 @@
class GRAYU16Plugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- GRAYU16Plugin(QObject *parent, const char *name, const QStringList &);
+ GRAYU16Plugin(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~GRAYU16Plugin();
};
diff --git a/krita/colorspaces/gray_u16/kis_gray_u16_colorspace.cc b/krita/colorspaces/gray_u16/kis_gray_u16_colorspace.cc
index 410d2c9b..00f3440c 100644
--- a/krita/colorspaces/gray_u16/kis_gray_u16_colorspace.cc
+++ b/krita/colorspaces/gray_u16/kis_gray_u16_colorspace.cc
@@ -22,7 +22,7 @@
#include <stdlib.h>
#include LCMS_HEADER
-#include <qimage.h>
+#include <tqimage.h>
#include <kdebug.h>
#include <klocale.h>
@@ -35,22 +35,22 @@
#include "kis_colorspace_factory_registry.h"
namespace {
- const Q_INT32 MAX_CHANNEL_GRAY = 1;
- const Q_INT32 MAX_CHANNEL_GRAYA = 2;
+ const TQ_INT32 MAX_CHANNEL_GRAY = 1;
+ const TQ_INT32 MAX_CHANNEL_GRAYA = 2;
}
-KisGrayU16ColorSpace::KisGrayU16ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) :
- KisU16BaseColorSpace(KisID("GRAYA16", i18n("Grayscale (16-bit integer/channel)")), TYPE_GRAYA_16, icSigGrayData, parent, p)
+KisGrayU16ColorSpace::KisGrayU16ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) :
+ KisU16BaseColorSpace(KisID("GRAYA16", i18n("Grayscale (16-bit integer/channel)")), TYPE_GRAYA_16, icSigGrayData, tqparent, p)
{
- m_channels.push_back(new KisChannelInfo(i18n("Gray"), i18n("G"), PIXEL_GRAY * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16)));
- m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), PIXEL_ALPHA * sizeof(Q_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(Q_UINT16)));
+ m_channels.push_back(new KisChannelInfo(i18n("Gray"), i18n("G"), PIXEL_GRAY * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16)));
+ m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), PIXEL_ALPHA * sizeof(TQ_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(TQ_UINT16)));
/* LPGAMMATABLE Gamma = cmsBuildGamma(256, 2.2);
cmsHPROFILE hProfile = cmsCreateGrayProfile(cmsD50_xyY(), Gamma);
cmsFreeGamma(Gamma);
*/
- m_alphaPos = PIXEL_ALPHA * sizeof(Q_UINT16);
+ m_alphaPos = PIXEL_ALPHA * sizeof(TQ_UINT16);
init();
}
@@ -59,16 +59,16 @@ KisGrayU16ColorSpace::~KisGrayU16ColorSpace()
{
}
-void KisGrayU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const
+void KisGrayU16ColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const
{
- Q_UINT32 totalGray = 0, newAlpha = 0;
+ TQ_UINT32 totalGray = 0, newAlpha = 0;
while (nColors--)
{
const Pixel *pixel = reinterpret_cast<const Pixel *>(*colors);
- Q_UINT32 alpha = pixel->alpha;
- Q_UINT32 alphaTimesWeight = UINT16_MULT(alpha, UINT8_TO_UINT16(*weights));
+ TQ_UINT32 alpha = pixel->alpha;
+ TQ_UINT32 alphaTimesWeight = UINT16_MULT(alpha, UINT8_TO_UINT16(*weights));
totalGray += UINT16_MULT(pixel->gray, alphaTimesWeight);
newAlpha += alphaTimesWeight;
@@ -90,16 +90,16 @@ void KisGrayU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weig
dstPixel->gray = totalGray;
}
-void KisGrayU16ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst,
- Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const
+void KisGrayU16ColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst,
+ TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const
{
- Q_INT32 totalGray = 0, totalAlpha = 0;
+ TQ_INT32 totalGray = 0, totalAlpha = 0;
while (nColors--)
{
const Pixel * pixel = reinterpret_cast<const Pixel *>( *colors );
- Q_INT32 weight = *kernelValues;
+ TQ_INT32 weight = *kernelValues;
if (weight != 0) {
totalGray += pixel->gray * weight;
@@ -112,76 +112,76 @@ void KisGrayU16ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValue
Pixel * p = reinterpret_cast< Pixel *>( dst );
if (channelFlags & KisChannelInfo::FLAG_COLOR) {
- p->gray = CLAMP( ( totalGray / factor) + offset, 0, Q_UINT16_MAX);
+ p->gray = CLAMP( ( totalGray / factor) + offset, 0, TQ_UINT16_MAX);
}
if (channelFlags & KisChannelInfo::FLAG_ALPHA) {
- p->alpha = CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT16_MAX);
+ p->alpha = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT16_MAX);
}
}
-void KisGrayU16ColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels)
+void KisGrayU16ColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels)
{
- Q_UINT32 psize = pixelSize();
+ TQ_UINT32 psize = pixelSize();
while (nPixels--)
{
Pixel * p = reinterpret_cast< Pixel *>( src );
- p->gray = Q_UINT16_MAX - p->gray;
+ p->gray = TQ_UINT16_MAX - p->gray;
src += psize;
}
}
-Q_UINT8 KisGrayU16ColorSpace::intensity8(const Q_UINT8 * src) const
+TQ_UINT8 KisGrayU16ColorSpace::intensity8(const TQ_UINT8 * src) const
{
const Pixel * p = reinterpret_cast<const Pixel *>( src );
return UINT16_TO_UINT8(p->gray);
}
-QValueVector<KisChannelInfo *> KisGrayU16ColorSpace::channels() const
+TQValueVector<KisChannelInfo *> KisGrayU16ColorSpace::channels() const
{
return m_channels;
}
-Q_UINT32 KisGrayU16ColorSpace::nChannels() const
+TQ_UINT32 KisGrayU16ColorSpace::nChannels() const
{
return MAX_CHANNEL_GRAYA;
}
-Q_UINT32 KisGrayU16ColorSpace::nColorChannels() const
+TQ_UINT32 KisGrayU16ColorSpace::nColorChannels() const
{
return MAX_CHANNEL_GRAY;
}
-Q_UINT32 KisGrayU16ColorSpace::pixelSize() const
+TQ_UINT32 KisGrayU16ColorSpace::pixelSize() const
{
- return MAX_CHANNEL_GRAYA * sizeof(Q_UINT16);
+ return MAX_CHANNEL_GRAYA * sizeof(TQ_UINT16);
}
-void KisGrayU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisGrayU16ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
while (rows > 0) {
- const Q_UINT16 *src = reinterpret_cast<const Q_UINT16 *>(srcRowStart);
- Q_UINT16 *dst = reinterpret_cast<Q_UINT16 *>(dstRowStart);
- const Q_UINT8 *mask = maskRowStart;
- Q_INT32 columns = numColumns;
+ const TQ_UINT16 *src = reinterpret_cast<const TQ_UINT16 *>(srcRowStart);
+ TQ_UINT16 *dst = reinterpret_cast<TQ_UINT16 *>(dstRowStart);
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
+ TQ_INT32 columns = numColumns;
while (columns > 0) {
- Q_UINT16 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT16 srcAlpha = src[PIXEL_ALPHA];
- // apply the alphamask
- if (mask != 0) {
- Q_UINT8 U8_mask = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ TQ_UINT8 U8_tqmask = *tqmask;
- if (U8_mask != OPACITY_OPAQUE) {
- srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask));
+ if (U8_tqmask != OPACITY_OPAQUE) {
+ srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask));
}
- mask++;
+ tqmask++;
}
if (srcAlpha != U16_OPACITY_TRANSPARENT) {
@@ -191,16 +191,16 @@ void KisGrayU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
}
if (srcAlpha == U16_OPACITY_OPAQUE) {
- memcpy(dst, src, MAX_CHANNEL_GRAYA * sizeof(Q_UINT16));
+ memcpy(dst, src, MAX_CHANNEL_GRAYA * sizeof(TQ_UINT16));
} else {
- Q_UINT16 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT16 dstAlpha = dst[PIXEL_ALPHA];
- Q_UINT16 srcBlend;
+ TQ_UINT16 srcBlend;
if (dstAlpha == U16_OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -211,7 +211,7 @@ void KisGrayU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
}
if (srcBlend == U16_OPACITY_OPAQUE) {
- memcpy(dst, src, MAX_CHANNEL_GRAY * sizeof(Q_UINT16));
+ memcpy(dst, src, MAX_CHANNEL_GRAY * sizeof(TQ_UINT16));
} else {
dst[PIXEL_GRAY] = UINT16_BLEND(src[PIXEL_GRAY], dst[PIXEL_GRAY], srcBlend);
}
@@ -226,8 +226,8 @@ void KisGrayU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart) {
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart) {
+ tqmaskRowStart += tqmaskRowStride;
}
}
}
@@ -235,25 +235,25 @@ void KisGrayU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
#define COMMON_COMPOSITE_OP_PROLOG() \
while (rows > 0) { \
\
- const Q_UINT16 *src = reinterpret_cast<const Q_UINT16 *>(srcRowStart); \
- Q_UINT16 *dst = reinterpret_cast<Q_UINT16 *>(dstRowStart); \
- Q_INT32 columns = numColumns; \
- const Q_UINT8 *mask = maskRowStart; \
+ const TQ_UINT16 *src = reinterpret_cast<const TQ_UINT16 *>(srcRowStart); \
+ TQ_UINT16 *dst = reinterpret_cast<TQ_UINT16 *>(dstRowStart); \
+ TQ_INT32 columns = numColumns; \
+ const TQ_UINT8 *tqmask = tqmaskRowStart; \
\
while (columns > 0) { \
\
- Q_UINT16 srcAlpha = src[PIXEL_ALPHA]; \
- Q_UINT16 dstAlpha = dst[PIXEL_ALPHA]; \
+ TQ_UINT16 srcAlpha = src[PIXEL_ALPHA]; \
+ TQ_UINT16 dstAlpha = dst[PIXEL_ALPHA]; \
\
- srcAlpha = QMIN(srcAlpha, dstAlpha); \
+ srcAlpha = TQMIN(srcAlpha, dstAlpha); \
\
- if (mask != 0) { \
- Q_UINT8 U8_mask = *mask; \
+ if (tqmask != 0) { \
+ TQ_UINT8 U8_tqmask = *tqmask; \
\
- if (U8_mask != OPACITY_OPAQUE) { \
- srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask)); \
+ if (U8_tqmask != OPACITY_OPAQUE) { \
+ srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask)); \
} \
- mask++; \
+ tqmask++; \
} \
\
if (srcAlpha != U16_OPACITY_TRANSPARENT) { \
@@ -262,12 +262,12 @@ void KisGrayU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
srcAlpha = UINT16_MULT(srcAlpha, opacity); \
} \
\
- Q_UINT16 srcBlend; \
+ TQ_UINT16 srcBlend; \
\
if (dstAlpha == U16_OPACITY_OPAQUE) { \
srcBlend = srcAlpha; \
} else { \
- Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); \
+ TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); \
dst[PIXEL_ALPHA] = newAlpha; \
\
if (newAlpha != 0) { \
@@ -288,18 +288,18 @@ void KisGrayU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
rows--; \
srcRowStart += srcRowStride; \
dstRowStart += dstRowStride; \
- if(maskRowStart) { \
- maskRowStart += maskRowStride; \
+ if(tqmaskRowStart) { \
+ tqmaskRowStart += tqmaskRowStride; \
} \
}
-void KisGrayU16ColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisGrayU16ColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
- Q_UINT16 srcColor = src[PIXEL_GRAY];
- Q_UINT16 dstColor = dst[PIXEL_GRAY];
+ TQ_UINT16 srcColor = src[PIXEL_GRAY];
+ TQ_UINT16 dstColor = dst[PIXEL_GRAY];
srcColor = UINT16_MULT(srcColor, dstColor);
@@ -310,19 +310,19 @@ void KisGrayU16ColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRo
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisGrayU16ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisGrayU16ColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_GRAY; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
- srcColor = QMIN((dstColor * (UINT16_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT16_MAX);
+ srcColor = TQMIN((dstColor * (UINT16_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT16_MAX);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -331,19 +331,19 @@ void KisGrayU16ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisGrayU16ColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisGrayU16ColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_GRAY; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
srcColor = UINT16_MAX - UINT16_MULT(UINT16_MAX - dstColor, UINT16_MAX - srcColor);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -352,19 +352,19 @@ void KisGrayU16ColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisGrayU16ColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisGrayU16ColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_GRAY; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
srcColor = UINT16_MULT(dstColor, dstColor + 2u * UINT16_MULT(srcColor, UINT16_MAX - dstColor));
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -373,19 +373,19 @@ void KisGrayU16ColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRow
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisGrayU16ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisGrayU16ColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_GRAY; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
- srcColor = QMIN((dstColor * (UINT16_MAX + 1u)) / (UINT16_MAX + 1u - srcColor), UINT16_MAX);
+ srcColor = TQMIN((dstColor * (UINT16_MAX + 1u)) / (UINT16_MAX + 1u - srcColor), UINT16_MAX);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -394,20 +394,20 @@ void KisGrayU16ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisGrayU16ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisGrayU16ColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_GRAY; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
srcColor = kMin(((UINT16_MAX - dstColor) * (UINT16_MAX + 1u)) / (srcColor + 1u), UINT16_MAX);
srcColor = kClamp(UINT16_MAX - srcColor, 0u, UINT16_MAX);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -416,19 +416,19 @@ void KisGrayU16ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisGrayU16ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisGrayU16ColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_GRAY; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
- srcColor = QMIN(srcColor, dstColor);
+ srcColor = TQMIN(srcColor, dstColor);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -437,19 +437,19 @@ void KisGrayU16ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisGrayU16ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisGrayU16ColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_GRAY; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
- srcColor = QMAX(srcColor, dstColor);
+ srcColor = TQMAX(srcColor, dstColor);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -459,34 +459,34 @@ void KisGrayU16ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRow
}
-void KisGrayU16ColorSpace::compositeErase(Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT16 /*opacity*/)
+void KisGrayU16ColorSpace::compositeErase(TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT16 /*opacity*/)
{
while (rows-- > 0)
{
const Pixel *s = reinterpret_cast<const Pixel *>(src);
Pixel *d = reinterpret_cast<Pixel *>(dst);
- const Q_UINT8 *mask = srcAlphaMask;
+ const TQ_UINT8 *tqmask = srcAlphaMask;
- for (Q_INT32 i = cols; i > 0; i--, s++, d++)
+ for (TQ_INT32 i = cols; i > 0; i--, s++, d++)
{
- Q_UINT16 srcAlpha = s->alpha;
+ TQ_UINT16 srcAlpha = s->alpha;
- // apply the alphamask
- if (mask != 0) {
- Q_UINT8 U8_mask = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ TQ_UINT8 U8_tqmask = *tqmask;
- if (U8_mask != OPACITY_OPAQUE) {
- srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_mask));
+ if (U8_tqmask != OPACITY_OPAQUE) {
+ srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_tqmask));
}
- mask++;
+ tqmask++;
}
d->alpha = UINT16_MULT(srcAlpha, d->alpha);
}
@@ -494,30 +494,30 @@ void KisGrayU16ColorSpace::compositeErase(Q_UINT8 *dst,
dst += dstRowSize;
src += srcRowSize;
if(srcAlphaMask) {
- srcAlphaMask += maskRowStride;
+ srcAlphaMask += tqmaskRowStride;
}
}
}
-void KisGrayU16ColorSpace::bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *mask,
- Q_INT32 maskRowStride,
- Q_UINT8 U8_opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+void KisGrayU16ColorSpace::bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *tqmask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 U8_opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op)
{
- Q_UINT16 opacity = UINT8_TO_UINT16(U8_opacity);
+ TQ_UINT16 opacity = UINT8_TO_UINT16(U8_opacity);
switch (op.op()) {
case COMPOSITE_UNDEF:
// Undefined == no composition
break;
case COMPOSITE_OVER:
- compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_IN:
//compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -546,16 +546,16 @@ void KisGrayU16ColorSpace::bitBlt(Q_UINT8 *dst,
//compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_MULT:
- compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DIVIDE:
- compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BUMPMAP:
//compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_COPY:
- compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, U8_opacity);
+ compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, U8_opacity);
break;
case COMPOSITE_COPY_RED:
//compositeCopyRed(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -590,22 +590,22 @@ void KisGrayU16ColorSpace::bitBlt(Q_UINT8 *dst,
// No composition.
break;
case COMPOSITE_DARKEN:
- compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_LIGHTEN:
- compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_HUE:
- //compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ //compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_SATURATION:
- //compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ //compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_VALUE:
- //compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ //compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLOR:
- //compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ //compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLORIZE:
//compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -614,24 +614,24 @@ void KisGrayU16ColorSpace::bitBlt(Q_UINT8 *dst,
//compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_SCREEN:
- compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_OVERLAY:
- compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
- compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DODGE:
- compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BURN:
- compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ALPHA_DARKEN:
- abstractCompositeAlphaDarken<Q_UINT16, U16Mult, Uint8ToU16, U16OpacityTest,
+ abstractCompositeAlphaDarken<TQ_UINT16, U16Mult, Uint8ToU16, U16OpacityTest,
PIXEL_ALPHA, MAX_CHANNEL_GRAY, MAX_CHANNEL_GRAYA>(
- dst, dstRowStride, src, srcRowStride, mask, maskRowStride,
+ dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride,
rows, cols, opacity, U16Mult(), Uint8ToU16(), U16OpacityTest());
break;
default:
diff --git a/krita/colorspaces/gray_u16/kis_gray_u16_colorspace.h b/krita/colorspaces/gray_u16/kis_gray_u16_colorspace.h
index 2a206564..f5fd6bde 100644
--- a/krita/colorspaces/gray_u16/kis_gray_u16_colorspace.h
+++ b/krita/colorspaces/gray_u16/kis_gray_u16_colorspace.h
@@ -19,7 +19,7 @@
#ifndef KIS_STRATEGY_COLORSPACE_GRAY_U16_H_
#define KIS_STRATEGY_COLORSPACE_GRAY_U16_H_
-#include <qcolor.h>
+#include <tqcolor.h>
#include <koffice_export.h>
@@ -32,8 +32,8 @@ class KRITATOOL_EXPORT KisGrayU16ColorSpace : public KisU16BaseColorSpace {
public:
struct Pixel {
- Q_UINT16 gray;
- Q_UINT16 alpha;
+ TQ_UINT16 gray;
+ TQ_UINT16 alpha;
};
virtual bool willDegrade(ColorSpaceIndependence independence)
@@ -46,52 +46,52 @@ public:
public:
- KisGrayU16ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p);
+ KisGrayU16ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p);
virtual ~KisGrayU16ColorSpace();
public:
- virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
- virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels);
- virtual void convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const;
- virtual Q_UINT8 intensity8(const Q_UINT8 * src) const;
+ virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const;
+ virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels);
+ virtual void convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const;
+ virtual TQ_UINT8 intensity8(const TQ_UINT8 * src) const;
- virtual QValueVector<KisChannelInfo *> channels() const;
- virtual Q_UINT32 nChannels() const;
- virtual Q_UINT32 nColorChannels() const;
- virtual Q_UINT32 pixelSize() const;
+ virtual TQValueVector<KisChannelInfo *> channels() const;
+ virtual TQ_UINT32 nChannels() const;
+ virtual TQ_UINT32 nColorChannels() const;
+ virtual TQ_UINT32 pixelSize() const;
virtual KisCompositeOpList userVisiblecompositeOps() const;
protected:
- virtual void bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+ virtual void bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op);
- void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
+ void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
private:
friend class KisGrayU16ColorSpaceTester;
- static const Q_UINT8 PIXEL_GRAY = 0;
- static const Q_UINT8 PIXEL_ALPHA = 1;
+ static const TQ_UINT8 PIXEL_GRAY = 0;
+ static const TQ_UINT8 PIXEL_ALPHA = 1;
};
class KisGrayU16ColorSpaceFactory : public KisColorSpaceFactory
@@ -106,13 +106,13 @@ public:
/**
* lcms colorspace type definition.
*/
- virtual Q_UINT32 colorSpaceType() { return TYPE_GRAY_16; };
+ virtual TQ_UINT32 colorSpaceType() { return TYPE_GRAY_16; };
virtual icColorSpaceSignature colorSpaceSignature() { return icSigGrayData; };
- virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisGrayU16ColorSpace(parent, p); };
+ virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisGrayU16ColorSpace(tqparent, p); };
- virtual QString defaultProfile() { return "gray built-in - (lcms internal)"; };
+ virtual TQString defaultProfile() { return "gray built-in - (lcms internal)"; };
};
#endif // KIS_STRATEGY_COLORSPACE_GRAY_U16_H_
diff --git a/krita/colorspaces/gray_u8/gray_plugin.cc b/krita/colorspaces/gray_u8/gray_plugin.cc
index 50fe51cc..d8df4393 100644
--- a/krita/colorspaces/gray_u8/gray_plugin.cc
+++ b/krita/colorspaces/gray_u8/gray_plugin.cc
@@ -37,16 +37,16 @@ typedef KGenericFactory<GrayPlugin> GrayPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kritagrayplugin, GrayPluginFactory( "kritacore" ) )
-GrayPlugin::GrayPlugin(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+GrayPlugin::GrayPlugin(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(GrayPluginFactory::instance());
// This is not a gui plugin; only load it when the doc is created.
- if ( parent->inherits("KisColorSpaceFactoryRegistry") )
+ if ( tqparent->inherits("KisColorSpaceFactoryRegistry") )
{
- KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );
+ KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( tqparent );
// .22 gamma grayscale or something like that. Taken from the lcms tutorial...
LPGAMMATABLE Gamma = cmsBuildGamma(256, 2.2);
diff --git a/krita/colorspaces/gray_u8/gray_plugin.h b/krita/colorspaces/gray_u8/gray_plugin.h
index 9359fa72..f18bf77c 100644
--- a/krita/colorspaces/gray_u8/gray_plugin.h
+++ b/krita/colorspaces/gray_u8/gray_plugin.h
@@ -27,8 +27,9 @@
class GrayPlugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- GrayPlugin(QObject *parent, const char *name, const QStringList &);
+ GrayPlugin(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~GrayPlugin();
};
diff --git a/krita/colorspaces/gray_u8/kis_gray_colorspace.cc b/krita/colorspaces/gray_u8/kis_gray_colorspace.cc
index f5e46416..dbd475df 100644
--- a/krita/colorspaces/gray_u8/kis_gray_colorspace.cc
+++ b/krita/colorspaces/gray_u8/kis_gray_colorspace.cc
@@ -24,7 +24,7 @@
#include <config.h>
#include LCMS_HEADER
-#include <qimage.h>
+#include <tqimage.h>
#include <klocale.h>
#include <kdebug.h>
@@ -36,15 +36,15 @@
#include "kis_integer_maths.h"
#define downscale(quantum) (quantum) //((unsigned char) ((quantum)/257UL))
-#define upscale(value) (value) // ((Q_UINT8) (257UL*(value)))
+#define upscale(value) (value) // ((TQ_UINT8) (257UL*(value)))
namespace {
- const Q_INT32 MAX_CHANNEL_GRAYSCALE = 1;
- const Q_INT32 MAX_CHANNEL_GRAYSCALEA = 2;
+ const TQ_INT32 MAX_CHANNEL_GRAYSCALE = 1;
+ const TQ_INT32 MAX_CHANNEL_GRAYSCALEA = 2;
}
-KisGrayColorSpace::KisGrayColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) :
- KisU8BaseColorSpace(KisID("GRAYA", i18n("Grayscale")), TYPE_GRAYA_8, icSigGrayData, parent, p)
+KisGrayColorSpace::KisGrayColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) :
+ KisU8BaseColorSpace(KisID("GRAYA", i18n("Grayscale")), TYPE_GRAYA_8, icSigGrayData, tqparent, p)
{
m_channels.push_back(new KisChannelInfo(i18n("Gray"), i18n("G"), 0, KisChannelInfo::COLOR, KisChannelInfo::UINT8));
m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 1, KisChannelInfo::ALPHA, KisChannelInfo::UINT8));
@@ -59,24 +59,24 @@ KisGrayColorSpace::~KisGrayColorSpace()
{
}
-void KisGrayColorSpace::setPixel(Q_UINT8 *pixel, Q_UINT8 gray, Q_UINT8 alpha) const
+void KisGrayColorSpace::setPixel(TQ_UINT8 *pixel, TQ_UINT8 gray, TQ_UINT8 alpha) const
{
pixel[PIXEL_GRAY] = gray;
pixel[PIXEL_GRAY_ALPHA] = alpha;
}
-void KisGrayColorSpace::getPixel(const Q_UINT8 *pixel, Q_UINT8 *gray, Q_UINT8 *alpha) const
+void KisGrayColorSpace::getPixel(const TQ_UINT8 *pixel, TQ_UINT8 *gray, TQ_UINT8 *alpha) const
{
*gray = pixel[PIXEL_GRAY];
*alpha = pixel[PIXEL_GRAY_ALPHA];
}
-void KisGrayColorSpace::getAlpha(const Q_UINT8 *pixel, Q_UINT8 *alpha) const
+void KisGrayColorSpace::getAlpha(const TQ_UINT8 *pixel, TQ_UINT8 *alpha) const
{
*alpha = pixel[PIXEL_GRAY_ALPHA];
}
-void KisGrayColorSpace::setAlpha(Q_UINT8 *pixels, Q_UINT8 alpha, Q_INT32 nPixels) const
+void KisGrayColorSpace::setAlpha(TQ_UINT8 *pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const
{
while (nPixels > 0) {
pixels[PIXEL_GRAY_ALPHA] = alpha;
@@ -85,14 +85,14 @@ void KisGrayColorSpace::setAlpha(Q_UINT8 *pixels, Q_UINT8 alpha, Q_INT32 nPixels
}
}
-void KisGrayColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const
+void KisGrayColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const
{
- Q_UINT32 totalGray = 0, newAlpha = 0;
+ TQ_UINT32 totalGray = 0, newAlpha = 0;
while (nColors--)
{
- Q_UINT32 alpha = (*colors)[PIXEL_GRAY_ALPHA];
- Q_UINT32 alphaTimesWeight = UINT8_MULT(alpha, *weights);
+ TQ_UINT32 alpha = (*colors)[PIXEL_GRAY_ALPHA];
+ TQ_UINT32 alphaTimesWeight = UINT8_MULT(alpha, *weights);
totalGray += (*colors)[PIXEL_GRAY] * alphaTimesWeight;
newAlpha += alphaTimesWeight;
@@ -111,18 +111,18 @@ void KisGrayColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights
// Divide by 255.
totalGray += 0x80;
- Q_UINT32 dstGray = ((totalGray >> 8) + totalGray) >> 8;
+ TQ_UINT32 dstGray = ((totalGray >> 8) + totalGray) >> 8;
Q_ASSERT(dstGray <= 255);
dst[PIXEL_GRAY] = dstGray;
}
-void KisGrayColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const
+void KisGrayColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const
{
- Q_INT32 totalGray = 0, totalAlpha = 0;
+ TQ_INT32 totalGray = 0, totalAlpha = 0;
while (nColors--)
{
- Q_INT32 weight = *kernelValues;
+ TQ_INT32 weight = *kernelValues;
if (weight != 0) {
totalGray += (*colors)[PIXEL_GRAY] * weight;
@@ -134,117 +134,117 @@ void KisGrayColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues,
if (channelFlags & KisChannelInfo::FLAG_COLOR) {
- dst[PIXEL_GRAY] = CLAMP((totalGray / factor) + offset, 0, Q_UINT8_MAX);
+ dst[PIXEL_GRAY] = CLAMP((totalGray / factor) + offset, 0, TQ_UINT8_MAX);
}
if (channelFlags & KisChannelInfo::FLAG_ALPHA) {
- dst[PIXEL_GRAY_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT8_MAX);
+ dst[PIXEL_GRAY_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT8_MAX);
}
}
-void KisGrayColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels)
+void KisGrayColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels)
{
- Q_UINT32 psize = pixelSize();
+ TQ_UINT32 psize = pixelSize();
while (nPixels--)
{
- src[PIXEL_GRAY] = Q_UINT8_MAX - src[PIXEL_GRAY];
+ src[PIXEL_GRAY] = TQ_UINT8_MAX - src[PIXEL_GRAY];
src += psize;
}
}
-void KisGrayColorSpace::darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const
+void KisGrayColorSpace::darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const
{
- Q_UINT32 pSize = pixelSize();
+ TQ_UINT32 pSize = pixelSize();
while (nPixels--) {
if (compensate) {
- dst[PIXEL_GRAY] = (Q_INT8) QMIN(255,((src[PIXEL_GRAY] * shade) / (compensation * 255)));
+ dst[PIXEL_GRAY] = (TQ_INT8) TQMIN(255,((src[PIXEL_GRAY] * shade) / (compensation * 255)));
}
else {
- dst[PIXEL_GRAY] = (Q_INT8) QMIN(255, (src[PIXEL_GRAY] * shade / 255));
+ dst[PIXEL_GRAY] = (TQ_INT8) TQMIN(255, (src[PIXEL_GRAY] * shade / 255));
}
dst += pSize;
src += pSize;
}
}
-Q_UINT8 KisGrayColorSpace::intensity8(const Q_UINT8 * src) const
+TQ_UINT8 KisGrayColorSpace::intensity8(const TQ_UINT8 * src) const
{
return src[PIXEL_GRAY];
}
-QValueVector<KisChannelInfo *> KisGrayColorSpace::channels() const
+TQValueVector<KisChannelInfo *> KisGrayColorSpace::channels() const
{
return m_channels;
}
-Q_UINT32 KisGrayColorSpace::nChannels() const
+TQ_UINT32 KisGrayColorSpace::nChannels() const
{
return MAX_CHANNEL_GRAYSCALEA;
}
-Q_UINT32 KisGrayColorSpace::nColorChannels() const
+TQ_UINT32 KisGrayColorSpace::nColorChannels() const
{
return MAX_CHANNEL_GRAYSCALE;
}
-Q_UINT32 KisGrayColorSpace::pixelSize() const
+TQ_UINT32 KisGrayColorSpace::pixelSize() const
{
return MAX_CHANNEL_GRAYSCALEA;
}
-void KisGrayColorSpace::bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *mask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+void KisGrayColorSpace::bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *tqmask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op)
{
switch (op.op()) {
case COMPOSITE_OVER:
- compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_MULT:
- compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DIVIDE:
- compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DARKEN:
- compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_LIGHTEN:
- compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_SCREEN:
- compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_OVERLAY:
- compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DODGE:
- compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BURN:
- compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
- compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COPY:
- compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_CLEAR: {
- Q_UINT8 *d;
- Q_INT32 linesize;
+ TQ_UINT8 *d;
+ TQ_INT32 linesize;
- linesize = MAX_CHANNEL_GRAYSCALEA*sizeof(Q_UINT8) * cols;
+ linesize = MAX_CHANNEL_GRAYSCALEA*sizeof(TQ_UINT8) * cols;
d = dst;
while (rows-- > 0) {
memset(d, 0, linesize);
@@ -253,7 +253,7 @@ void KisGrayColorSpace::bitBlt(Q_UINT8 *dst,
}
break;
case COMPOSITE_ALPHA_DARKEN:
- compositeAlphaDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeAlphaDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
default:
@@ -278,25 +278,25 @@ KisCompositeOpList KisGrayColorSpace::userVisiblecompositeOps() const
return list;
}
-void KisGrayColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisGrayColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -306,16 +306,16 @@ void KisGrayColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
}
if (srcAlpha == OPACITY_OPAQUE) {
- memcpy(dst, src, MAX_CHANNEL_GRAYSCALEA * sizeof(Q_UINT8));
+ memcpy(dst, src, MAX_CHANNEL_GRAYSCALEA * sizeof(TQ_UINT8));
} else {
- Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_GRAY_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -326,7 +326,7 @@ void KisGrayColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
}
if (srcBlend == OPACITY_OPAQUE) {
- memcpy(dst, src, MAX_CHANNEL_GRAYSCALE * sizeof(Q_UINT8));
+ memcpy(dst, src, MAX_CHANNEL_GRAYSCALE * sizeof(TQ_UINT8));
} else {
dst[PIXEL_GRAY] = UINT8_BLEND(src[PIXEL_GRAY], dst[PIXEL_GRAY], srcBlend);
}
@@ -341,33 +341,33 @@ void KisGrayColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisGrayColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisGrayColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -376,12 +376,12 @@ void KisGrayColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
srcAlpha = UINT8_MULT(src[PIXEL_GRAY_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_GRAY_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -391,8 +391,8 @@ void KisGrayColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
}
}
- Q_UINT8 srcColor = src[PIXEL_GRAY];
- Q_UINT8 dstColor = dst[PIXEL_GRAY];
+ TQ_UINT8 srcColor = src[PIXEL_GRAY];
+ TQ_UINT8 dstColor = dst[PIXEL_GRAY];
srcColor = UINT8_MULT(srcColor, dstColor);
@@ -407,33 +407,33 @@ void KisGrayColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisGrayColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisGrayColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -442,12 +442,12 @@ void KisGrayColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
srcAlpha = UINT8_MULT(src[PIXEL_GRAY_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_GRAY_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -459,12 +459,12 @@ void KisGrayColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
for (int channel = 0; channel < MAX_CHANNEL_GRAYSCALE; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
- srcColor = QMIN((dstColor * (UINT8_MAX + 1)) / (1 + srcColor), UINT8_MAX);
+ srcColor = TQMIN((dstColor * (UINT8_MAX + 1)) / (1 + srcColor), UINT8_MAX);
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -478,33 +478,33 @@ void KisGrayColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisGrayColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisGrayColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -513,12 +513,12 @@ void KisGrayColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
srcAlpha = UINT8_MULT(src[PIXEL_GRAY_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_GRAY_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -530,12 +530,12 @@ void KisGrayColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
for (int channel = 0; channel < MAX_CHANNEL_GRAYSCALE; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
srcColor = UINT8_MAX - UINT8_MULT(UINT8_MAX - dstColor, UINT8_MAX - srcColor);
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -549,33 +549,33 @@ void KisGrayColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisGrayColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisGrayColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -584,12 +584,12 @@ void KisGrayColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
srcAlpha = UINT8_MULT(src[PIXEL_GRAY_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_GRAY_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -601,12 +601,12 @@ void KisGrayColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
for (int channel = 0; channel < MAX_CHANNEL_GRAYSCALE; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
srcColor = UINT8_MULT(dstColor, dstColor + UINT8_MULT(2 * srcColor, UINT8_MAX - dstColor));
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -620,33 +620,33 @@ void KisGrayColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisGrayColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisGrayColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -655,12 +655,12 @@ void KisGrayColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
srcAlpha = UINT8_MULT(src[PIXEL_GRAY_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_GRAY_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -672,12 +672,12 @@ void KisGrayColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
for (int channel = 0; channel < MAX_CHANNEL_GRAYSCALE; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
- srcColor = QMIN((dstColor * (UINT8_MAX + 1)) / (UINT8_MAX + 1 - srcColor), UINT8_MAX);
+ srcColor = TQMIN((dstColor * (UINT8_MAX + 1)) / (UINT8_MAX + 1 - srcColor), UINT8_MAX);
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -691,33 +691,33 @@ void KisGrayColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisGrayColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisGrayColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -726,12 +726,12 @@ void KisGrayColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
srcAlpha = UINT8_MULT(src[PIXEL_GRAY_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_GRAY_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -743,13 +743,13 @@ void KisGrayColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
for (int channel = 0; channel < MAX_CHANNEL_GRAYSCALE; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
srcColor = kMin(((UINT8_MAX - dstColor) * (UINT8_MAX + 1)) / (srcColor + 1), UINT8_MAX);
srcColor = kClamp(UINT8_MAX - srcColor, 0u, UINT8_MAX);
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -763,33 +763,33 @@ void KisGrayColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisGrayColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisGrayColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -798,12 +798,12 @@ void KisGrayColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
srcAlpha = UINT8_MULT(src[PIXEL_GRAY_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_GRAY_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -815,12 +815,12 @@ void KisGrayColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
for (int channel = 0; channel < MAX_CHANNEL_GRAYSCALE; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
- srcColor = QMIN(srcColor, dstColor);
+ srcColor = TQMIN(srcColor, dstColor);
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -834,33 +834,33 @@ void KisGrayColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisGrayColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisGrayColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -869,12 +869,12 @@ void KisGrayColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
srcAlpha = UINT8_MULT(src[PIXEL_GRAY_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_GRAY_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -886,12 +886,12 @@ void KisGrayColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
for (int channel = 0; channel < MAX_CHANNEL_GRAYSCALE; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
- srcColor = QMAX(srcColor, dstColor);
+ srcColor = TQMAX(srcColor, dstColor);
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -905,73 +905,73 @@ void KisGrayColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisGrayColorSpace::compositeErase(Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 /*opacity*/)
+void KisGrayColorSpace::compositeErase(TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 /*opacity*/)
{
- Q_INT32 i;
- Q_UINT8 srcAlpha;
+ TQ_INT32 i;
+ TQ_UINT8 srcAlpha;
while (rows-- > 0)
{
- const Q_UINT8 *s = src;
- Q_UINT8 *d = dst;
- const Q_UINT8 *mask = srcAlphaMask;
+ const TQ_UINT8 *s = src;
+ TQ_UINT8 *d = dst;
+ const TQ_UINT8 *tqmask = srcAlphaMask;
for (i = cols; i > 0; i--, s+=MAX_CHANNEL_GRAYSCALEA, d+=MAX_CHANNEL_GRAYSCALEA)
{
srcAlpha = s[PIXEL_GRAY_ALPHA];
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, *tqmask);
+ tqmask++;
}
d[PIXEL_GRAY_ALPHA] = UINT8_MULT(srcAlpha, d[PIXEL_GRAY_ALPHA]);
}
dst += dstRowSize;
if(srcAlphaMask)
- srcAlphaMask += maskRowStride;
+ srcAlphaMask += tqmaskRowStride;
src += srcRowSize;
}
}
-void KisGrayColorSpace::compositeAlphaDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride,
- const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride,
- const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride,
- Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisGrayColorSpace::compositeAlphaDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride,
+ const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride,
+ const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride,
+ TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- const Q_UINT8 *mask = maskRowStart;
- Q_INT32 columns = numColumns;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
+ TQ_INT32 columns = numColumns;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (opacity != OPACITY_OPAQUE) {
@@ -980,7 +980,7 @@ void KisGrayColorSpace::compositeAlphaDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRo
if (srcAlpha != OPACITY_TRANSPARENT && srcAlpha >= dstAlpha) {
dst[PIXEL_GRAY_ALPHA] = srcAlpha;
- memcpy(dst, src, MAX_CHANNEL_GRAYSCALE * sizeof(Q_UINT8));
+ memcpy(dst, src, MAX_CHANNEL_GRAYSCALE * sizeof(TQ_UINT8));
}
columns--;
@@ -991,7 +991,7 @@ void KisGrayColorSpace::compositeAlphaDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRo
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
diff --git a/krita/colorspaces/gray_u8/kis_gray_colorspace.h b/krita/colorspaces/gray_u8/kis_gray_colorspace.h
index d6784017..66da3c30 100644
--- a/krita/colorspaces/gray_u8/kis_gray_colorspace.h
+++ b/krita/colorspaces/gray_u8/kis_gray_colorspace.h
@@ -17,7 +17,7 @@
*/
#ifndef KIS_STRATEGY_COLORSPACE_GRAYSCALE_H_
#define KIS_STRATEGY_COLORSPACE_GRAYSCALE_H_
-#include <qcolor.h>
+#include <tqcolor.h>
#include <klocale.h>
@@ -29,7 +29,7 @@
class KRITACORE_EXPORT KisGrayColorSpace : public KisU8BaseColorSpace {
public:
- KisGrayColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p);
+ KisGrayColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p);
virtual ~KisGrayColorSpace();
virtual bool willDegrade(ColorSpaceIndependence /*independence*/)
@@ -39,55 +39,55 @@ public:
public:
- void setPixel(Q_UINT8 *pixel, Q_UINT8 gray, Q_UINT8 alpha) const;
- void getPixel(const Q_UINT8 *pixel, Q_UINT8 *gray, Q_UINT8 *alpha) const;
-
- virtual void getAlpha(const Q_UINT8 *pixel, Q_UINT8 *alpha) const;
- virtual void setAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) const;
-
- virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
- virtual void convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const;
- virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels);
- virtual void darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const;
- virtual Q_UINT8 intensity8(const Q_UINT8 * src) const;
-
- virtual QValueVector<KisChannelInfo *> channels() const;
- virtual Q_UINT32 nChannels() const;
- virtual Q_UINT32 nColorChannels() const;
- virtual Q_UINT32 pixelSize() const;
-
- virtual void bitBlt(Q_UINT8 *dst,
- Q_INT32 dststride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+ void setPixel(TQ_UINT8 *pixel, TQ_UINT8 gray, TQ_UINT8 alpha) const;
+ void getPixel(const TQ_UINT8 *pixel, TQ_UINT8 *gray, TQ_UINT8 *alpha) const;
+
+ virtual void getAlpha(const TQ_UINT8 *pixel, TQ_UINT8 *alpha) const;
+ virtual void setAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const;
+
+ virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const;
+ virtual void convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const;
+ virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels);
+ virtual void darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const;
+ virtual TQ_UINT8 intensity8(const TQ_UINT8 * src) const;
+
+ virtual TQValueVector<KisChannelInfo *> channels() const;
+ virtual TQ_UINT32 nChannels() const;
+ virtual TQ_UINT32 nColorChannels() const;
+ virtual TQ_UINT32 pixelSize() const;
+
+ virtual void bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dststride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op);
KisCompositeOpList userVisiblecompositeOps() const;
protected:
- void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeAlphaDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
+ void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeAlphaDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
private:
friend class KisGrayColorSpaceTester;
- static const Q_UINT8 PIXEL_GRAY = 0;
- static const Q_UINT8 PIXEL_GRAY_ALPHA = 1;
+ static const TQ_UINT8 PIXEL_GRAY = 0;
+ static const TQ_UINT8 PIXEL_GRAY_ALPHA = 1;
};
class KisGrayColorSpaceFactory : public KisColorSpaceFactory
@@ -102,13 +102,13 @@ public:
/**
* lcms colorspace type definition.
*/
- virtual Q_UINT32 colorSpaceType() { return TYPE_GRAYA_8; };
+ virtual TQ_UINT32 colorSpaceType() { return TYPE_GRAYA_8; };
virtual icColorSpaceSignature colorSpaceSignature() { return icSigGrayData; };
- virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisGrayColorSpace(parent, p); };
+ virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisGrayColorSpace(tqparent, p); };
- virtual QString defaultProfile() { return "gray built-in - (lcms internal)"; };
+ virtual TQString defaultProfile() { return "gray built-in - (lcms internal)"; };
};
#endif // KIS_STRATEGY_COLORSPACE_GRAYSCALE_H_
diff --git a/krita/colorspaces/gray_u8/tests/kis_strategy_colorspace_grayscale_tester.cpp b/krita/colorspaces/gray_u8/tests/kis_strategy_colorspace_grayscale_tester.cpp
index 3c91d6d1..0374c072 100644
--- a/krita/colorspaces/gray_u8/tests/kis_strategy_colorspace_grayscale_tester.cpp
+++ b/krita/colorspaces/gray_u8/tests/kis_strategy_colorspace_grayscale_tester.cpp
@@ -50,29 +50,29 @@ void KisGrayColorSpaceTester::testBasics()
KisGrayColorSpace *cs = new KisGrayColorSpace(profile);
- Q_UINT8 pixel[MAX_CHANNEL_GRAYSCALEA];
+ TQ_UINT8 pixel[MAX_CHANNEL_GRAYSCALEA];
pixel[KisGrayColorSpace::PIXEL_GRAY] = 255;
pixel[KisGrayColorSpace::PIXEL_GRAY_ALPHA] = 128;
- QString valueText = cs->channelValueText(pixel, GRAY_CHANNEL);
- CHECK(valueText, QString("255"));
+ TQString valueText = cs->channelValueText(pixel, GRAY_CHANNEL);
+ CHECK(valueText, TQString("255"));
valueText = cs->channelValueText(pixel, ALPHA_CHANNEL);
- CHECK(valueText, QString("128"));
+ CHECK(valueText, TQString("128"));
valueText = cs->normalisedChannelValueText(pixel, GRAY_CHANNEL);
- CHECK(valueText, QString().setNum(1.0));
+ CHECK(valueText, TQString().setNum(1.0));
valueText = cs->normalisedChannelValueText(pixel, ALPHA_CHANNEL);
- CHECK(valueText, QString().setNum(128.0 / 255.0));
+ CHECK(valueText, TQString().setNum(128.0 / 255.0));
cs->setPixel(pixel, 128, 192l);
CHECK((uint)pixel[KisGrayColorSpace::PIXEL_GRAY], 128u);
CHECK((uint)pixel[KisGrayColorSpace::PIXEL_GRAY_ALPHA], 192u);
- Q_UINT8 gray;
- Q_UINT8 alpha;
+ TQ_UINT8 gray;
+ TQ_UINT8 alpha;
cs->getPixel(pixel, &gray, &alpha);
CHECK((uint)gray, 128u);
@@ -86,9 +86,9 @@ void KisGrayColorSpaceTester::testMixColors()
KisProfile *profile = new KisProfile(cmsCreate_sRGBProfile());
KisAbstractColorSpace * cs = new KisGrayColorSpace(profile);
- Q_UINT8 pixel1[MAX_CHANNEL_GRAYSCALEA];
- Q_UINT8 pixel2[MAX_CHANNEL_GRAYSCALEA];
- Q_UINT8 outputPixel[MAX_CHANNEL_GRAYSCALEA];
+ TQ_UINT8 pixel1[MAX_CHANNEL_GRAYSCALEA];
+ TQ_UINT8 pixel2[MAX_CHANNEL_GRAYSCALEA];
+ TQ_UINT8 outputPixel[MAX_CHANNEL_GRAYSCALEA];
pixel1[KisGrayColorSpace::PIXEL_GRAY] = 255;
pixel1[KisGrayColorSpace::PIXEL_GRAY_ALPHA] = 255;
@@ -96,8 +96,8 @@ void KisGrayColorSpaceTester::testMixColors()
pixel2[KisGrayColorSpace::PIXEL_GRAY] = 0;
pixel2[KisGrayColorSpace::PIXEL_GRAY_ALPHA] = 0;
- const Q_UINT8 *pixelPtrs[2];
- Q_UINT8 weights[2];
+ const TQ_UINT8 *pixelPtrs[2];
+ TQ_UINT8 weights[2];
pixelPtrs[0] = pixel1;
pixelPtrs[1] = pixel2;
diff --git a/krita/colorspaces/lms_f32/kis_lms_f32_colorspace.cc b/krita/colorspaces/lms_f32/kis_lms_f32_colorspace.cc
index 0c8b91bf..57475a03 100644
--- a/krita/colorspaces/lms_f32/kis_lms_f32_colorspace.cc
+++ b/krita/colorspaces/lms_f32/kis_lms_f32_colorspace.cc
@@ -25,7 +25,7 @@
#include <stdlib.h>
#include LCMS_HEADER
-#include <qimage.h>
+#include <tqimage.h>
#include <kdebug.h>
#include <klocale.h>
@@ -34,8 +34,8 @@
#include "kis_color_conversions.h"
namespace {
- const Q_INT32 MAX_CHANNEL_LMS = 3;
- const Q_INT32 MAX_CHANNEL_LMSA = 4;
+ const TQ_INT32 MAX_CHANNEL_LMS = 3;
+ const TQ_INT32 MAX_CHANNEL_LMSA = 4;
}
#include "kis_integer_maths.h"
@@ -48,8 +48,8 @@ namespace {
#define F32_LCMS_TYPE TYPE_BGRA_16
// disable the lcms handling by setting profile=0
-KisLmsF32ColorSpace::KisLmsF32ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile */*p*/) :
- KisF32BaseColorSpace(KisID("LMSAF32", i18n("LMS (32-bit float/channel)")), F32_LCMS_TYPE, icSig3colorData, parent, 0)
+KisLmsF32ColorSpace::KisLmsF32ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile */*p*/) :
+ KisF32BaseColorSpace(KisID("LMSAF32", i18n("LMS (32-bit float/channel)")), F32_LCMS_TYPE, icSig3colorData, tqparent, 0)
{
m_channels.push_back(new KisChannelInfo(i18n("Long"), i18n("L"), PIXEL_LONGWAVE * sizeof(float), KisChannelInfo::COLOR, KisChannelInfo::FLOAT32, sizeof(float)));
m_channels.push_back(new KisChannelInfo(i18n("Middle"), i18n("M"), PIXEL_MIDDLEWAVE * sizeof(float), KisChannelInfo::COLOR, KisChannelInfo::FLOAT32, sizeof(float)));
@@ -63,7 +63,7 @@ KisLmsF32ColorSpace::~KisLmsF32ColorSpace()
{
}
-void KisLmsF32ColorSpace::setPixel(Q_UINT8 *dst, float longWave, float middleWave, float shortWave, float alpha) const
+void KisLmsF32ColorSpace::setPixel(TQ_UINT8 *dst, float longWave, float middleWave, float shortWave, float alpha) const
{
Pixel *dstPixel = reinterpret_cast<Pixel *>(dst);
@@ -73,7 +73,7 @@ void KisLmsF32ColorSpace::setPixel(Q_UINT8 *dst, float longWave, float middleWav
dstPixel->alpha = alpha;
}
-void KisLmsF32ColorSpace::getPixel(const Q_UINT8 *src, float *longWave, float *middleWave, float *shortWave, float *alpha) const
+void KisLmsF32ColorSpace::getPixel(const TQ_UINT8 *src, float *longWave, float *middleWave, float *shortWave, float *alpha) const
{
const Pixel *srcPixel = reinterpret_cast<const Pixel *>(src);
@@ -83,7 +83,7 @@ void KisLmsF32ColorSpace::getPixel(const Q_UINT8 *src, float *longWave, float *m
*alpha = srcPixel->alpha;
}
-void KisLmsF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfile * /*profile*/)
+void KisLmsF32ColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 *dstU8, KisProfile * /*profile*/)
{
Pixel *dst = reinterpret_cast<Pixel *>(dstU8);
@@ -92,7 +92,7 @@ void KisLmsF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfile
dst->shortWave = computeShort(c.red(),c.green(),c.blue());
}
-void KisLmsF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dstU8, KisProfile * /*profile*/)
+void KisLmsF32ColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dstU8, KisProfile * /*profile*/)
{
Pixel *dst = reinterpret_cast<Pixel *>(dstU8);
@@ -102,14 +102,14 @@ void KisLmsF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *
dst->alpha = UINT8_TO_FLOAT(opacity);
}
-void KisLmsF32ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, KisProfile * /*profile*/)
+void KisLmsF32ColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, KisProfile * /*profile*/)
{
const Pixel *src = reinterpret_cast<const Pixel *>(srcU8);
c->setRgb(computeRed(src->longWave,src->middleWave,src->shortWave), computeGreen(src->longWave,src->middleWave,src->shortWave), computeBlue(src->longWave,src->middleWave,src->shortWave));
}
-void KisLmsF32ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opacity, KisProfile * /*profile*/)
+void KisLmsF32ColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, TQ_UINT8 *opacity, KisProfile * /*profile*/)
{
const Pixel *src = reinterpret_cast<const Pixel *>(srcU8);
@@ -117,17 +117,17 @@ void KisLmsF32ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opa
*opacity = FLOAT_TO_UINT8(src->alpha);
}
-Q_UINT8 KisLmsF32ColorSpace::difference(const Q_UINT8 *src1U8, const Q_UINT8 *src2U8)
+TQ_UINT8 KisLmsF32ColorSpace::difference(const TQ_UINT8 *src1U8, const TQ_UINT8 *src2U8)
{
const Pixel *src1 = reinterpret_cast<const Pixel *>(src1U8);
const Pixel *src2 = reinterpret_cast<const Pixel *>(src2U8);
- return FLOAT_TO_UINT8(QMAX(QABS(src2->longWave - src1->longWave),
- QMAX(QABS(src2->middleWave - src1->middleWave),
- QABS(src2->shortWave - src1->shortWave))));
+ return FLOAT_TO_UINT8(TQMAX(TQABS(src2->longWave - src1->longWave),
+ TQMAX(TQABS(src2->middleWave - src1->middleWave),
+ TQABS(src2->shortWave - src1->shortWave))));
}
-void KisLmsF32ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const
+void KisLmsF32ColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const
{
float totalLong = 0, totalMiddle = 0, totalShort = 0, newAlpha = 0;
@@ -164,37 +164,37 @@ void KisLmsF32ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weigh
dstPixel->shortWave = totalShort;
}
-QValueVector<KisChannelInfo *> KisLmsF32ColorSpace::channels() const
+TQValueVector<KisChannelInfo *> KisLmsF32ColorSpace::channels() const
{
return m_channels;
}
-Q_UINT32 KisLmsF32ColorSpace::nChannels() const
+TQ_UINT32 KisLmsF32ColorSpace::nChannels() const
{
return MAX_CHANNEL_LMSA;
}
-Q_UINT32 KisLmsF32ColorSpace::nColorChannels() const
+TQ_UINT32 KisLmsF32ColorSpace::nColorChannels() const
{
return MAX_CHANNEL_LMS;
}
-Q_UINT32 KisLmsF32ColorSpace::pixelSize() const
+TQ_UINT32 KisLmsF32ColorSpace::pixelSize() const
{
return MAX_CHANNEL_LMSA * sizeof(float);
}
-QImage KisLmsF32ColorSpace::convertToQImage(const Q_UINT8 *dataU8, Q_INT32 width, Q_INT32 height,
+TQImage KisLmsF32ColorSpace::convertToTQImage(const TQ_UINT8 *dataU8, TQ_INT32 width, TQ_INT32 height,
KisProfile * /*dstProfile*/,
- Q_INT32 /*renderingIntent*/, float /*exposure*/)
+ TQ_INT32 /*renderingIntent*/, float /*exposure*/)
{
const float *data = reinterpret_cast<const float *>(dataU8);
- QImage img = QImage(width, height, 32, 0, QImage::LittleEndian);
+ TQImage img = TQImage(width, height, 32, 0, TQImage::LittleEndian);
img.setAlphaBuffer(true);
- Q_INT32 i = 0;
+ TQ_INT32 i = 0;
uchar *j = img.bits();
while ( i < width * height * MAX_CHANNEL_LMSA) {
@@ -220,27 +220,27 @@ QImage KisLmsF32ColorSpace::convertToQImage(const Q_UINT8 *dataU8, Q_INT32 width
}
-void KisLmsF32ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity)
+void KisLmsF32ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity)
{
while (rows > 0) {
const float *src = reinterpret_cast<const float *>(srcRowStart);
float *dst = reinterpret_cast<float *>(dstRowStart);
- const Q_UINT8 *mask = maskRowStart;
- Q_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
+ TQ_INT32 columns = numColumns;
while (columns > 0) {
float srcAlpha = src[PIXEL_ALPHA];
- // apply the alphamask
- if (mask != 0) {
- Q_UINT8 U8_mask = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ TQ_UINT8 U8_tqmask = *tqmask;
- if (U8_mask != OPACITY_OPAQUE) {
- srcAlpha *= UINT8_TO_FLOAT(U8_mask);
+ if (U8_tqmask != OPACITY_OPAQUE) {
+ srcAlpha *= UINT8_TO_FLOAT(U8_tqmask);
}
- mask++;
+ tqmask++;
}
if (srcAlpha > F32_OPACITY_TRANSPARENT + EPSILON) {
@@ -287,40 +287,40 @@ void KisLmsF32ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart) {
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart) {
+ tqmaskRowStart += tqmaskRowStride;
}
}
}
-void KisLmsF32ColorSpace::compositeErase(Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_INT32 rows,
- Q_INT32 cols,
+void KisLmsF32ColorSpace::compositeErase(TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
float /*opacity*/)
{
while (rows-- > 0)
{
const Pixel *s = reinterpret_cast<const Pixel *>(src);
Pixel *d = reinterpret_cast<Pixel *>(dst);
- const Q_UINT8 *mask = srcAlphaMask;
+ const TQ_UINT8 *tqmask = srcAlphaMask;
- for (Q_INT32 i = cols; i > 0; i--, s++, d++)
+ for (TQ_INT32 i = cols; i > 0; i--, s++, d++)
{
float srcAlpha = s->alpha;
- // apply the alphamask
- if (mask != 0) {
- Q_UINT8 U8_mask = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ TQ_UINT8 U8_tqmask = *tqmask;
- if (U8_mask != OPACITY_OPAQUE) {
- srcAlpha = FLOAT_BLEND(srcAlpha, F32_OPACITY_OPAQUE, UINT8_TO_FLOAT(U8_mask));
+ if (U8_tqmask != OPACITY_OPAQUE) {
+ srcAlpha = FLOAT_BLEND(srcAlpha, F32_OPACITY_OPAQUE, UINT8_TO_FLOAT(U8_tqmask));
}
- mask++;
+ tqmask++;
}
d->alpha = srcAlpha * d->alpha;
}
@@ -328,13 +328,13 @@ void KisLmsF32ColorSpace::compositeErase(Q_UINT8 *dst,
dst += dstRowSize;
src += srcRowSize;
if(srcAlphaMask) {
- srcAlphaMask += maskRowStride;
+ srcAlphaMask += tqmaskRowStride;
}
}
}
-void KisLmsF32ColorSpace::compositeCopy(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride,
- const Q_UINT8 */*maskRowStart*/, Q_INT32 /*maskRowStride*/, Q_INT32 rows, Q_INT32 numColumns, float /*opacity*/)
+void KisLmsF32ColorSpace::compositeCopy(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride,
+ const TQ_UINT8 */*tqmaskRowStart*/, TQ_INT32 /*tqmaskRowStride*/, TQ_INT32 rows, TQ_INT32 numColumns, float /*opacity*/)
{
while (rows > 0) {
memcpy(dstRowStart, srcRowStart, numColumns * sizeof(Pixel));
@@ -344,15 +344,15 @@ void KisLmsF32ColorSpace::compositeCopy(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
}
}
-void KisLmsF32ColorSpace::bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *mask,
- Q_INT32 maskRowStride,
- Q_UINT8 U8_opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+void KisLmsF32ColorSpace::bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *tqmask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 U8_opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op)
{
float opacity = UINT8_TO_FLOAT(U8_opacity);
@@ -362,13 +362,13 @@ void KisLmsF32ColorSpace::bitBlt(Q_UINT8 *dst,
// Undefined == no composition
break;
case COMPOSITE_OVER:
- compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COPY:
- compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
- compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
default:
break;
diff --git a/krita/colorspaces/lms_f32/kis_lms_f32_colorspace.h b/krita/colorspaces/lms_f32/kis_lms_f32_colorspace.h
index 8d5d27d9..82a1c2aa 100644
--- a/krita/colorspaces/lms_f32/kis_lms_f32_colorspace.h
+++ b/krita/colorspaces/lms_f32/kis_lms_f32_colorspace.h
@@ -21,7 +21,7 @@
#ifndef KIS_STRATEGY_COLORSPACE_LMS_F32_H_
#define KIS_STRATEGY_COLORSPACE_LMS_F32_H_
-#include <qcolor.h>
+#include <tqcolor.h>
#include <klocale.h>
@@ -34,7 +34,7 @@ class KisColorSpaceFactoryRegistry;
class KRITATOOL_EXPORT KisLmsF32ColorSpace : public KisF32BaseColorSpace {
public:
- KisLmsF32ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p);
+ KisLmsF32ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p);
virtual ~KisLmsF32ColorSpace();
virtual bool willDegrade(ColorSpaceIndependence independence)
@@ -47,28 +47,28 @@ public:
public:
- void setPixel(Q_UINT8 *pixel, float longWave, float middleWave, float shortWave, float alpha) const;
- void getPixel(const Q_UINT8 *pixel, float *longWave, float *middleWave, float *shortWave, float *alpha) const;
+ void setPixel(TQ_UINT8 *pixel, float longWave, float middleWave, float shortWave, float alpha) const;
+ void getPixel(const TQ_UINT8 *pixel, float *longWave, float *middleWave, float *shortWave, float *alpha) const;
- virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0);
- virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0);
+ virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0);
+ virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0);
- virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0);
- virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0);
+ virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0);
+ virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0);
- virtual Q_UINT8 difference(const Q_UINT8 *src1, const Q_UINT8 *src2);
- virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
+ virtual TQ_UINT8 difference(const TQ_UINT8 *src1, const TQ_UINT8 *src2);
+ virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const;
- virtual QValueVector<KisChannelInfo *> channels() const;
- virtual Q_UINT32 nChannels() const;
- virtual Q_UINT32 nColorChannels() const;
- virtual Q_UINT32 pixelSize() const;
+ virtual TQValueVector<KisChannelInfo *> channels() const;
+ virtual TQ_UINT32 nChannels() const;
+ virtual TQ_UINT32 nColorChannels() const;
+ virtual TQ_UINT32 pixelSize() const;
virtual bool hasHighDynamicRange() const { return false; }
- virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height,
+ virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height,
KisProfile * dstProfile,
- Q_INT32 renderingIntent,
+ TQ_INT32 renderingIntent,
float exposure = 0.0f);
virtual KisCompositeOpList userVisiblecompositeOps() const;
@@ -76,53 +76,53 @@ public:
protected:
- virtual void bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+ virtual void bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op);
- void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
- void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
- void compositeCopy(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
+ void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
+ void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
+ void compositeCopy(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
private:
- inline Q_UINT8 computeRed(float l, float m, float s) const
+ inline TQ_UINT8 computeRed(float l, float m, float s) const
{
return FLOAT_TO_UINT8(4.4679*l - 3.58738*m + 0.1193*s);
}
- inline Q_UINT8 computeGreen(float l, float m, float s) const
+ inline TQ_UINT8 computeGreen(float l, float m, float s) const
{
return FLOAT_TO_UINT8(-1.2186*l + 2.3809*m - 0.1624*s);
}
- inline Q_UINT8 computeBlue(float l, float m, float s) const
+ inline TQ_UINT8 computeBlue(float l, float m, float s) const
{
return FLOAT_TO_UINT8(0.0497*l - 0.2439*m + 1.2045*s);
}
- inline float computeLong(Q_UINT8 r, Q_UINT8 g, Q_UINT8 b) const
+ inline float computeLong(TQ_UINT8 r, TQ_UINT8 g, TQ_UINT8 b) const
{
return 0.3811*UINT8_TO_FLOAT(r) + 0.5783*UINT8_TO_FLOAT(g) + 0.0402*UINT8_TO_FLOAT(b);
}
- inline float computeMiddle(Q_UINT8 r, Q_UINT8 g, Q_UINT8 b) const
+ inline float computeMiddle(TQ_UINT8 r, TQ_UINT8 g, TQ_UINT8 b) const
{
return 0.1967*UINT8_TO_FLOAT(r) + 0.7244*UINT8_TO_FLOAT(g) + 0.0782*UINT8_TO_FLOAT(b);
}
- inline float computeShort(Q_UINT8 r, Q_UINT8 g, Q_UINT8 b) const
+ inline float computeShort(TQ_UINT8 r, TQ_UINT8 g, TQ_UINT8 b) const
{
return 0.0241*UINT8_TO_FLOAT(r) + 0.1288*UINT8_TO_FLOAT(g) + 0.8444*UINT8_TO_FLOAT(b);
}
friend class KisLmsF32ColorSpaceTester;
- static const Q_UINT8 PIXEL_LONGWAVE = 0;
- static const Q_UINT8 PIXEL_MIDDLEWAVE = 1;
- static const Q_UINT8 PIXEL_SHORTWAVE = 2;
- static const Q_UINT8 PIXEL_ALPHA = 3;
+ static const TQ_UINT8 PIXEL_LONGWAVE = 0;
+ static const TQ_UINT8 PIXEL_MIDDLEWAVE = 1;
+ static const TQ_UINT8 PIXEL_SHORTWAVE = 2;
+ static const TQ_UINT8 PIXEL_ALPHA = 3;
struct Pixel {
float longWave;
@@ -144,13 +144,13 @@ public:
/**
* lcms colorspace type definition.
*/
- virtual Q_UINT32 colorSpaceType() { return 0; }; // FIXME: lcms do not support LMS cone space
+ virtual TQ_UINT32 colorSpaceType() { return 0; }; // FIXME: lcms do not support LMS cone space
virtual icColorSpaceSignature colorSpaceSignature() { return icMaxEnumData; };
- virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisLmsF32ColorSpace(parent, p); };
+ virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisLmsF32ColorSpace(tqparent, p); };
- virtual QString defaultProfile() { return "sRGB built-in - (lcms internal)"; };
+ virtual TQString defaultProfile() { return "sRGB built-in - (lcms internal)"; };
};
#endif // KIS_STRATEGY_COLORSPACE_LMS_F32_H_
diff --git a/krita/colorspaces/lms_f32/lms_f32_plugin.cc b/krita/colorspaces/lms_f32/lms_f32_plugin.cc
index 67df5e4f..b04dd86d 100644
--- a/krita/colorspaces/lms_f32/lms_f32_plugin.cc
+++ b/krita/colorspaces/lms_f32/lms_f32_plugin.cc
@@ -36,14 +36,14 @@ typedef KGenericFactory<LMSF32Plugin> LMSF32PluginFactory;
K_EXPORT_COMPONENT_FACTORY( krita_lms_f32_plugin, LMSF32PluginFactory( "krita" ) )
-LMSF32Plugin::LMSF32Plugin(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+LMSF32Plugin::LMSF32Plugin(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(LMSF32PluginFactory::instance());
- if ( parent->inherits("KisColorSpaceFactoryRegistry") )
+ if ( tqparent->inherits("KisColorSpaceFactoryRegistry") )
{
- KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>(parent);
+ KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>(tqparent);
KisColorSpace * colorSpaceLMSF32 = new KisLmsF32ColorSpace(f, 0);
diff --git a/krita/colorspaces/lms_f32/lms_f32_plugin.h b/krita/colorspaces/lms_f32/lms_f32_plugin.h
index b8d02b18..7d9229a6 100644
--- a/krita/colorspaces/lms_f32/lms_f32_plugin.h
+++ b/krita/colorspaces/lms_f32/lms_f32_plugin.h
@@ -29,8 +29,9 @@
class LMSF32Plugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- LMSF32Plugin(QObject *parent, const char *name, const QStringList &);
+ LMSF32Plugin(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~LMSF32Plugin();
};
diff --git a/krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.cc b/krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.cc
index a1826b97..fb2df8c1 100644
--- a/krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.cc
+++ b/krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.cc
@@ -22,7 +22,7 @@
#include <stdlib.h>
#include LCMS_HEADER
-#include <qimage.h>
+#include <tqimage.h>
#include <kdebug.h>
#include <klocale.h>
@@ -32,8 +32,8 @@
#include "kis_color_conversions.h"
namespace {
- const Q_INT32 MAX_CHANNEL_RGB = 3;
- const Q_INT32 MAX_CHANNEL_RGBA = 4;
+ const TQ_INT32 MAX_CHANNEL_RGB = 3;
+ const TQ_INT32 MAX_CHANNEL_RGBA = 4;
}
#include "kis_integer_maths.h"
@@ -50,8 +50,8 @@ namespace {
// FIXME: lcms doesn't support 16-bit float
#define RGBAF16HALF_LCMS_TYPE TYPE_BGRA_16
-KisRgbF16HalfColorSpace::KisRgbF16HalfColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) :
- KisF16HalfBaseColorSpace(KisID("RGBAF16HALF", i18n("RGB (16-bit float/channel)")), RGBAF16HALF_LCMS_TYPE, icSigRgbData, parent, p)
+KisRgbF16HalfColorSpace::KisRgbF16HalfColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) :
+ KisF16HalfBaseColorSpace(KisID("RGBAF16HALF", i18n("RGB (16-bit float/channel)")), RGBAF16HALF_LCMS_TYPE, icSigRgbData, tqparent, p)
{
m_channels.push_back(new KisChannelInfo(i18n("Red"), i18n("R"), PIXEL_RED * sizeof(half), KisChannelInfo::COLOR, KisChannelInfo::FLOAT16, sizeof(half)));
m_channels.push_back(new KisChannelInfo(i18n("Green"), i18n("G"), PIXEL_GREEN * sizeof(half), KisChannelInfo::COLOR, KisChannelInfo::FLOAT16, sizeof(half)));
@@ -68,7 +68,7 @@ KisRgbF16HalfColorSpace::~KisRgbF16HalfColorSpace()
{
}
-void KisRgbF16HalfColorSpace::setPixel(Q_UINT8 *dst, half red, half green, half blue, half alpha) const
+void KisRgbF16HalfColorSpace::setPixel(TQ_UINT8 *dst, half red, half green, half blue, half alpha) const
{
Pixel *dstPixel = reinterpret_cast<Pixel *>(dst);
@@ -78,7 +78,7 @@ void KisRgbF16HalfColorSpace::setPixel(Q_UINT8 *dst, half red, half green, half
dstPixel->alpha = alpha;
}
-void KisRgbF16HalfColorSpace::getPixel(const Q_UINT8 *src, half *red, half *green, half *blue, half *alpha) const
+void KisRgbF16HalfColorSpace::getPixel(const TQ_UINT8 *src, half *red, half *green, half *blue, half *alpha) const
{
const Pixel *srcPixel = reinterpret_cast<const Pixel *>(src);
@@ -88,7 +88,7 @@ void KisRgbF16HalfColorSpace::getPixel(const Q_UINT8 *src, half *red, half *gree
*alpha = srcPixel->alpha;
}
-void KisRgbF16HalfColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfile *)
+void KisRgbF16HalfColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 *dstU8, KisProfile *)
{
Pixel *dst = reinterpret_cast<Pixel *>(dstU8);
@@ -97,7 +97,7 @@ void KisRgbF16HalfColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisPro
dst->blue = UINT8_TO_HALF(c.blue());
}
-void KisRgbF16HalfColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dstU8, KisProfile *)
+void KisRgbF16HalfColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dstU8, KisProfile *)
{
Pixel *dst = reinterpret_cast<Pixel *>(dstU8);
@@ -107,14 +107,14 @@ void KisRgbF16HalfColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UIN
dst->alpha = UINT8_TO_HALF(opacity);
}
-void KisRgbF16HalfColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, KisProfile *)
+void KisRgbF16HalfColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, KisProfile *)
{
const Pixel *src = reinterpret_cast<const Pixel *>(srcU8);
c->setRgb(HALF_TO_UINT8(src->red), HALF_TO_UINT8(src->green), HALF_TO_UINT8(src->blue));
}
-void KisRgbF16HalfColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opacity, KisProfile *)
+void KisRgbF16HalfColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, TQ_UINT8 *opacity, KisProfile *)
{
const Pixel *src = reinterpret_cast<const Pixel *>(srcU8);
@@ -122,17 +122,17 @@ void KisRgbF16HalfColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8
*opacity = HALF_TO_UINT8(src->alpha);
}
-Q_UINT8 KisRgbF16HalfColorSpace::difference(const Q_UINT8 *src1U8, const Q_UINT8 *src2U8)
+TQ_UINT8 KisRgbF16HalfColorSpace::difference(const TQ_UINT8 *src1U8, const TQ_UINT8 *src2U8)
{
const Pixel *src1 = reinterpret_cast<const Pixel *>(src1U8);
const Pixel *src2 = reinterpret_cast<const Pixel *>(src2U8);
- return HALF_TO_UINT8(QMAX(QABS(src2->red - src1->red),
- QMAX(QABS(src2->green - src1->green),
- QABS(src2->blue - src1->blue))));
+ return HALF_TO_UINT8(TQMAX(TQABS(src2->red - src1->red),
+ TQMAX(TQABS(src2->green - src1->green),
+ TQABS(src2->blue - src1->blue))));
}
-void KisRgbF16HalfColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const
+void KisRgbF16HalfColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const
{
half totalRed = 0, totalGreen = 0, totalBlue = 0, newAlpha = 0;
@@ -169,7 +169,7 @@ void KisRgbF16HalfColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *w
dstPixel->blue = totalBlue;
}
-void KisRgbF16HalfColorSpace::convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const
+void KisRgbF16HalfColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const
{
half totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0;
@@ -202,9 +202,9 @@ void KisRgbF16HalfColorSpace::convolveColors(Q_UINT8** colors, Q_INT32 * kernelV
}
-void KisRgbF16HalfColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels)
+void KisRgbF16HalfColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels)
{
- Q_UINT32 psize = pixelSize();
+ TQ_UINT32 psize = pixelSize();
while (nPixels--)
{
@@ -218,7 +218,7 @@ void KisRgbF16HalfColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels)
}
-Q_UINT8 KisRgbF16HalfColorSpace::intensity8(const Q_UINT8 * src) const
+TQ_UINT8 KisRgbF16HalfColorSpace::intensity8(const TQ_UINT8 * src) const
{
const Pixel * p = reinterpret_cast<const Pixel *>( src );
@@ -226,27 +226,27 @@ Q_UINT8 KisRgbF16HalfColorSpace::intensity8(const Q_UINT8 * src) const
}
-QValueVector<KisChannelInfo *> KisRgbF16HalfColorSpace::channels() const
+TQValueVector<KisChannelInfo *> KisRgbF16HalfColorSpace::channels() const
{
return m_channels;
}
-Q_UINT32 KisRgbF16HalfColorSpace::nChannels() const
+TQ_UINT32 KisRgbF16HalfColorSpace::nChannels() const
{
return MAX_CHANNEL_RGBA;
}
-Q_UINT32 KisRgbF16HalfColorSpace::nColorChannels() const
+TQ_UINT32 KisRgbF16HalfColorSpace::nColorChannels() const
{
return MAX_CHANNEL_RGB;
}
-Q_UINT32 KisRgbF16HalfColorSpace::pixelSize() const
+TQ_UINT32 KisRgbF16HalfColorSpace::pixelSize() const
{
return MAX_CHANNEL_RGBA * sizeof(half);
}
-Q_UINT8 convertToDisplay(float value, float exposureFactor, float gamma)
+TQ_UINT8 convertToDisplay(float value, float exposureFactor, float gamma)
{
//value *= pow(2, exposure + 2.47393);
value *= exposureFactor;
@@ -262,17 +262,17 @@ Q_UINT8 convertToDisplay(float value, float exposureFactor, float gamma)
return CLAMP(valueInt, 0, 255);
}
-QImage KisRgbF16HalfColorSpace::convertToQImage(const Q_UINT8 *dataU8, Q_INT32 width, Q_INT32 height,
+TQImage KisRgbF16HalfColorSpace::convertToTQImage(const TQ_UINT8 *dataU8, TQ_INT32 width, TQ_INT32 height,
KisProfile * /*dstProfile*/,
- Q_INT32 /*renderingIntent*/, float exposure)
+ TQ_INT32 /*renderingIntent*/, float exposure)
{
const half *data = reinterpret_cast<const half *>(dataU8);
- QImage img = QImage(width, height, 32, 0, QImage::LittleEndian);
+ TQImage img = TQImage(width, height, 32, 0, TQImage::LittleEndian);
img.setAlphaBuffer(true);
- Q_INT32 i = 0;
+ TQ_INT32 i = 0;
uchar *j = img.bits();
// XXX: For now assume gamma 2.2.
@@ -299,27 +299,27 @@ QImage KisRgbF16HalfColorSpace::convertToQImage(const Q_UINT8 *dataU8, Q_INT32 w
}
-void KisRgbF16HalfColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity)
+void KisRgbF16HalfColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity)
{
while (rows > 0) {
const half *src = reinterpret_cast<const half *>(srcRowStart);
half *dst = reinterpret_cast<half *>(dstRowStart);
- const Q_UINT8 *mask = maskRowStart;
- Q_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
+ TQ_INT32 columns = numColumns;
while (columns > 0) {
half srcAlpha = src[PIXEL_ALPHA];
- // apply the alphamask
- if (mask != 0) {
- Q_UINT8 U8_mask = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ TQ_UINT8 U8_tqmask = *tqmask;
- if (U8_mask != OPACITY_OPAQUE) {
- srcAlpha *= UINT8_TO_HALF(U8_mask);
+ if (U8_tqmask != OPACITY_OPAQUE) {
+ srcAlpha *= UINT8_TO_HALF(U8_tqmask);
}
- mask++;
+ tqmask++;
}
if (srcAlpha > F16HALF_OPACITY_TRANSPARENT + EPSILON) {
@@ -366,8 +366,8 @@ void KisRgbF16HalfColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRow
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart) {
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart) {
+ tqmaskRowStart += tqmaskRowStride;
}
}
}
@@ -377,23 +377,23 @@ void KisRgbF16HalfColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRow
\
const half *src = reinterpret_cast<const half *>(srcRowStart); \
half *dst = reinterpret_cast<half *>(dstRowStart); \
- Q_INT32 columns = numColumns; \
- const Q_UINT8 *mask = maskRowStart; \
+ TQ_INT32 columns = numColumns; \
+ const TQ_UINT8 *tqmask = tqmaskRowStart; \
\
while (columns > 0) { \
\
half srcAlpha = src[PIXEL_ALPHA]; \
half dstAlpha = dst[PIXEL_ALPHA]; \
\
- srcAlpha = QMIN(srcAlpha, dstAlpha); \
+ srcAlpha = TQMIN(srcAlpha, dstAlpha); \
\
- if (mask != 0) { \
- Q_UINT8 U8_mask = *mask; \
+ if (tqmask != 0) { \
+ TQ_UINT8 U8_tqmask = *tqmask; \
\
- if (U8_mask != OPACITY_OPAQUE) { \
- srcAlpha *= UINT8_TO_HALF(U8_mask); \
+ if (U8_tqmask != OPACITY_OPAQUE) { \
+ srcAlpha *= UINT8_TO_HALF(U8_tqmask); \
} \
- mask++; \
+ tqmask++; \
} \
\
if (srcAlpha > F16HALF_OPACITY_TRANSPARENT + EPSILON) { \
@@ -428,12 +428,12 @@ void KisRgbF16HalfColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRow
rows--; \
srcRowStart += srcRowStride; \
dstRowStart += dstRowStride; \
- if(maskRowStart) { \
- maskRowStart += maskRowStride; \
+ if(tqmaskRowStart) { \
+ tqmaskRowStart += tqmaskRowStride; \
} \
}
-void KisRgbF16HalfColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity)
+void KisRgbF16HalfColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -463,7 +463,7 @@ void KisRgbF16HalfColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 ds
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF16HalfColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity)
+void KisRgbF16HalfColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -473,7 +473,7 @@ void KisRgbF16HalfColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstR
half srcColor = src[channel];
half dstColor = dst[channel];
- srcColor = QMIN(dstColor / (srcColor + EPSILON), HALF_MAX);
+ srcColor = TQMIN(dstColor / (srcColor + EPSILON), HALF_MAX);
half newColor = HALF_BLEND(srcColor, dstColor, srcBlend);
@@ -484,7 +484,7 @@ void KisRgbF16HalfColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstR
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF16HalfColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity)
+void KisRgbF16HalfColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -505,7 +505,7 @@ void KisRgbF16HalfColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstR
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF16HalfColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity)
+void KisRgbF16HalfColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -526,7 +526,7 @@ void KisRgbF16HalfColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dst
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF16HalfColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity)
+void KisRgbF16HalfColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -536,7 +536,7 @@ void KisRgbF16HalfColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRo
half srcColor = src[channel];
half dstColor = dst[channel];
- srcColor = QMIN(dstColor / (HALF_MAX + EPSILON - srcColor), HALF_MAX);
+ srcColor = TQMIN(dstColor / (HALF_MAX + EPSILON - srcColor), HALF_MAX);
half newColor = HALF_BLEND(srcColor, dstColor, srcBlend);
@@ -547,7 +547,7 @@ void KisRgbF16HalfColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRo
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF16HalfColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity)
+void KisRgbF16HalfColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -557,7 +557,7 @@ void KisRgbF16HalfColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRow
half srcColor = src[channel];
half dstColor = dst[channel];
- srcColor = QMIN((HALF_MAX - dstColor) / (srcColor + EPSILON), HALF_MAX);
+ srcColor = TQMIN((HALF_MAX - dstColor) / (srcColor + EPSILON), HALF_MAX);
srcColor = CLAMP(HALF_MAX - srcColor, 0, HALF_MAX);
half newColor = HALF_BLEND(srcColor, dstColor, srcBlend);
@@ -569,7 +569,7 @@ void KisRgbF16HalfColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRow
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF16HalfColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity)
+void KisRgbF16HalfColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -579,7 +579,7 @@ void KisRgbF16HalfColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstR
half srcColor = src[channel];
half dstColor = dst[channel];
- srcColor = QMIN(srcColor, dstColor);
+ srcColor = TQMIN(srcColor, dstColor);
half newColor = HALF_BLEND(srcColor, dstColor, srcBlend);
@@ -590,7 +590,7 @@ void KisRgbF16HalfColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstR
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF16HalfColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity)
+void KisRgbF16HalfColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -600,7 +600,7 @@ void KisRgbF16HalfColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dst
half srcColor = src[channel];
half dstColor = dst[channel];
- srcColor = QMAX(srcColor, dstColor);
+ srcColor = TQMAX(srcColor, dstColor);
half newColor = HALF_BLEND(srcColor, dstColor, srcBlend);
@@ -611,7 +611,7 @@ void KisRgbF16HalfColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dst
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF16HalfColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity)
+void KisRgbF16HalfColorSpace::compositeHue(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -645,7 +645,7 @@ void KisRgbF16HalfColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF16HalfColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity)
+void KisRgbF16HalfColorSpace::compositeSaturation(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -679,7 +679,7 @@ void KisRgbF16HalfColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF16HalfColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity)
+void KisRgbF16HalfColorSpace::compositeValue(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -713,7 +713,7 @@ void KisRgbF16HalfColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRo
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF16HalfColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, half opacity)
+void KisRgbF16HalfColorSpace::compositeColor(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, half opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -747,34 +747,34 @@ void KisRgbF16HalfColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRo
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF16HalfColorSpace::compositeErase(Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_INT32 rows,
- Q_INT32 cols,
+void KisRgbF16HalfColorSpace::compositeErase(TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
half /*opacity*/)
{
while (rows-- > 0)
{
const Pixel *s = reinterpret_cast<const Pixel *>(src);
Pixel *d = reinterpret_cast<Pixel *>(dst);
- const Q_UINT8 *mask = srcAlphaMask;
+ const TQ_UINT8 *tqmask = srcAlphaMask;
- for (Q_INT32 i = cols; i > 0; i--, s++, d++)
+ for (TQ_INT32 i = cols; i > 0; i--, s++, d++)
{
half srcAlpha = s->alpha;
- // apply the alphamask
- if (mask != 0) {
- Q_UINT8 U8_mask = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ TQ_UINT8 U8_tqmask = *tqmask;
- if (U8_mask != OPACITY_OPAQUE) {
- srcAlpha = HALF_BLEND(srcAlpha, F16HALF_OPACITY_OPAQUE, UINT8_TO_HALF(U8_mask));
+ if (U8_tqmask != OPACITY_OPAQUE) {
+ srcAlpha = HALF_BLEND(srcAlpha, F16HALF_OPACITY_OPAQUE, UINT8_TO_HALF(U8_tqmask));
}
- mask++;
+ tqmask++;
}
d->alpha = srcAlpha * d->alpha;
}
@@ -782,20 +782,20 @@ void KisRgbF16HalfColorSpace::compositeErase(Q_UINT8 *dst,
dst += dstRowSize;
src += srcRowSize;
if(srcAlphaMask) {
- srcAlphaMask += maskRowStride;
+ srcAlphaMask += tqmaskRowStride;
}
}
}
-void KisRgbF16HalfColorSpace::bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *mask,
- Q_INT32 maskRowStride,
- Q_UINT8 U8_opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+void KisRgbF16HalfColorSpace::bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *tqmask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 U8_opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op)
{
half opacity = UINT8_TO_HALF(U8_opacity);
@@ -805,7 +805,7 @@ void KisRgbF16HalfColorSpace::bitBlt(Q_UINT8 *dst,
// Undefined == no composition
break;
case COMPOSITE_OVER:
- compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_IN:
//compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -834,16 +834,16 @@ void KisRgbF16HalfColorSpace::bitBlt(Q_UINT8 *dst,
//compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_MULT:
- compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DIVIDE:
- compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BUMPMAP:
//compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_COPY:
- compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, U8_opacity);
+ compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, U8_opacity);
break;
case COMPOSITE_COPY_RED:
//compositeCopyRed(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -878,22 +878,22 @@ void KisRgbF16HalfColorSpace::bitBlt(Q_UINT8 *dst,
// No composition.
break;
case COMPOSITE_DARKEN:
- compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_LIGHTEN:
- compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_HUE:
- compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_SATURATION:
- compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_VALUE:
- compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLOR:
- compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLORIZE:
//compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -902,24 +902,24 @@ void KisRgbF16HalfColorSpace::bitBlt(Q_UINT8 *dst,
//compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_SCREEN:
- compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_OVERLAY:
- compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
- compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DODGE:
- compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BURN:
- compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ALPHA_DARKEN:
abstractCompositeAlphaDarken<half, F16HalfMult, Uint8ToF16Half, F16HalfOpacityTest,
PIXEL_ALPHA, MAX_CHANNEL_RGB, MAX_CHANNEL_RGBA>(
- dst, dstRowStride, src, srcRowStride, mask, maskRowStride,
+ dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride,
rows, cols,
U8_opacity, F16HalfMult(), Uint8ToF16Half(), F16HalfOpacityTest());
break;
diff --git a/krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.h b/krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.h
index c56d7f63..c4a356c0 100644
--- a/krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.h
+++ b/krita/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.h
@@ -19,7 +19,7 @@
#ifndef KIS_RGB_F16HALF_COLORSPACE_H_
#define KIS_RGB_F16HALF_COLORSPACE_H_
-#include <qcolor.h>
+#include <tqcolor.h>
#include <klocale.h>
@@ -31,7 +31,7 @@
class KRITATOOL_EXPORT KisRgbF16HalfColorSpace : public KisF16HalfBaseColorSpace {
public:
- KisRgbF16HalfColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p);
+ KisRgbF16HalfColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p);
virtual ~KisRgbF16HalfColorSpace();
virtual bool willDegrade(ColorSpaceIndependence independence)
@@ -44,29 +44,29 @@ public:
public:
- void setPixel(Q_UINT8 *pixel, half red, half green, half blue, half alpha) const;
- void getPixel(const Q_UINT8 *pixel, half *red, half *green, half *blue, half *alpha) const;
+ void setPixel(TQ_UINT8 *pixel, half red, half green, half blue, half alpha) const;
+ void getPixel(const TQ_UINT8 *pixel, half *red, half *green, half *blue, half *alpha) const;
- virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0);
- virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0);
+ virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0);
+ virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0);
- virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0);
- virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0);
+ virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0);
+ virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0);
- virtual Q_UINT8 difference(const Q_UINT8 *src1, const Q_UINT8 *src2);
- virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
- virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels);
- virtual void convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const;
- virtual Q_UINT8 intensity8(const Q_UINT8 * src) const;
+ virtual TQ_UINT8 difference(const TQ_UINT8 *src1, const TQ_UINT8 *src2);
+ virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const;
+ virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels);
+ virtual void convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const;
+ virtual TQ_UINT8 intensity8(const TQ_UINT8 * src) const;
- virtual QValueVector<KisChannelInfo *> channels() const;
- virtual Q_UINT32 nChannels() const;
- virtual Q_UINT32 nColorChannels() const;
- virtual Q_UINT32 pixelSize() const;
+ virtual TQValueVector<KisChannelInfo *> channels() const;
+ virtual TQ_UINT32 nChannels() const;
+ virtual TQ_UINT32 nColorChannels() const;
+ virtual TQ_UINT32 pixelSize() const;
- virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height,
+ virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height,
KisProfile * dstProfile,
- Q_INT32 renderingIntent,
+ TQ_INT32 renderingIntent,
float exposure = 0.0f);
virtual KisCompositeOpList userVisiblecompositeOps() const;
@@ -74,39 +74,39 @@ public:
protected:
- virtual void bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+ virtual void bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op);
- void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity);
- void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity);
- void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity);
- void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity);
- void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity);
- void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity);
- void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity);
- void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity);
- void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity);
- void compositeHue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity);
- void compositeSaturation(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity);
- void compositeValue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity);
- void compositeColor(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity);
- void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, half opacity);
+ void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity);
+ void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity);
+ void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity);
+ void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity);
+ void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity);
+ void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity);
+ void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity);
+ void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity);
+ void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity);
+ void compositeHue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity);
+ void compositeSaturation(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity);
+ void compositeValue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity);
+ void compositeColor(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity);
+ void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, half opacity);
private:
friend class KisRgbF16HalfColorSpaceTester;
- static const Q_UINT8 PIXEL_BLUE = 0;
- static const Q_UINT8 PIXEL_GREEN = 1;
- static const Q_UINT8 PIXEL_RED = 2;
- static const Q_UINT8 PIXEL_ALPHA = 3;
+ static const TQ_UINT8 PIXEL_BLUE = 0;
+ static const TQ_UINT8 PIXEL_GREEN = 1;
+ static const TQ_UINT8 PIXEL_RED = 2;
+ static const TQ_UINT8 PIXEL_ALPHA = 3;
struct Pixel {
half blue;
@@ -131,13 +131,13 @@ public:
/**
* lcms colorspace type definition.
*/
- virtual Q_UINT32 colorSpaceType() { return RGBAF16HALF_LCMS_TYPE; };
+ virtual TQ_UINT32 colorSpaceType() { return RGBAF16HALF_LCMS_TYPE; };
virtual icColorSpaceSignature colorSpaceSignature() { return icSigRgbData; };
- virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisRgbF16HalfColorSpace(parent, p); };
+ virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisRgbF16HalfColorSpace(tqparent, p); };
- virtual QString defaultProfile() { return "sRGB built-in - (lcms internal)"; };
+ virtual TQString defaultProfile() { return "sRGB built-in - (lcms internal)"; };
};
#endif // KIS_RGB_F16HALF_COLORSPACE_H_
diff --git a/krita/colorspaces/rgb_f16half/rgb_f16half_plugin.cc b/krita/colorspaces/rgb_f16half/rgb_f16half_plugin.cc
index 0674cde7..52c42c10 100644
--- a/krita/colorspaces/rgb_f16half/rgb_f16half_plugin.cc
+++ b/krita/colorspaces/rgb_f16half/rgb_f16half_plugin.cc
@@ -35,14 +35,14 @@ typedef KGenericFactory<RGBF16HalfPlugin> RGBF16HalfPluginFactory;
K_EXPORT_COMPONENT_FACTORY( krita_rgb_f16half_plugin, RGBF16HalfPluginFactory( "krita" ) )
-RGBF16HalfPlugin::RGBF16HalfPlugin(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+RGBF16HalfPlugin::RGBF16HalfPlugin(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(RGBF16HalfPluginFactory::instance());
- if ( parent->inherits("KisColorSpaceFactoryRegistry") )
+ if ( tqparent->inherits("KisColorSpaceFactoryRegistry") )
{
- KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );
+ KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( tqparent );
KisColorSpace * colorSpaceRGBF16Half = new KisRgbF16HalfColorSpace(f, 0);
KisColorSpaceFactory *csf = new KisRgbF16HalfColorSpaceFactory();
diff --git a/krita/colorspaces/rgb_f16half/rgb_f16half_plugin.h b/krita/colorspaces/rgb_f16half/rgb_f16half_plugin.h
index 00c361a1..a970247c 100644
--- a/krita/colorspaces/rgb_f16half/rgb_f16half_plugin.h
+++ b/krita/colorspaces/rgb_f16half/rgb_f16half_plugin.h
@@ -28,8 +28,9 @@
class RGBF16HalfPlugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- RGBF16HalfPlugin(QObject *parent, const char *name, const QStringList &);
+ RGBF16HalfPlugin(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~RGBF16HalfPlugin();
};
diff --git a/krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.cc b/krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.cc
index 20f417d9..59eb8e5f 100644
--- a/krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.cc
+++ b/krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.cc
@@ -58,7 +58,7 @@ void KisRgbF16HalfColorSpaceTester::allTests()
KisFactory *factory = new KisFactory();
testBasics();
- testToQImage();
+ testToTQImage();
testCompositeOps();
testMixColors();
@@ -79,7 +79,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics()
CHECK(cs->nColorChannels(), NUM_COLOUR_CHANNELS);
CHECK(cs->pixelSize(), NUM_CHANNELS * CHANNEL_SIZE);
- QValueVector<KisChannelInfo *> channels = cs->channels();
+ TQValueVector<KisChannelInfo *> channels = cs->channels();
// Red
CHECK(channels[0]->pos(), PIXEL_RED * CHANNEL_SIZE);
@@ -114,39 +114,39 @@ void KisRgbF16HalfColorSpaceTester::testBasics()
half pixel[NUM_CHANNELS];
- cs->fromQColor(qRgb(255, 255, 255), reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(255, 255, 255), reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK(pixel[PIXEL_RED], CHANNEL_VALUE_ONE);
CHECK(pixel[PIXEL_GREEN], CHANNEL_VALUE_ONE);
CHECK(pixel[PIXEL_BLUE], CHANNEL_VALUE_ONE);
- cs->fromQColor(qRgb(0, 0, 0), reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(0, 0, 0), reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK(pixel[PIXEL_RED], CHANNEL_VALUE_ZERO);
CHECK(pixel[PIXEL_GREEN], CHANNEL_VALUE_ZERO);
CHECK(pixel[PIXEL_BLUE], CHANNEL_VALUE_ZERO);
- cs->fromQColor(qRgb(128, 64, 192), reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(128, 64, 192), reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK(pixel[PIXEL_RED], UINT8_TO_HALF(128));
CHECK(pixel[PIXEL_GREEN], UINT8_TO_HALF(64));
CHECK(pixel[PIXEL_BLUE], UINT8_TO_HALF(192));
- cs->fromQColor(qRgb(255, 255, 255), OPACITY_OPAQUE, reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_OPAQUE, reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK(pixel[PIXEL_RED], CHANNEL_VALUE_ONE);
CHECK(pixel[PIXEL_GREEN], CHANNEL_VALUE_ONE);
CHECK(pixel[PIXEL_BLUE], CHANNEL_VALUE_ONE);
CHECK(pixel[PIXEL_ALPHA], CHANNEL_VALUE_ONE);
- cs->fromQColor(qRgb(255, 255, 255), OPACITY_TRANSPARENT, reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_TRANSPARENT, reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK(pixel[PIXEL_RED], CHANNEL_VALUE_ONE);
CHECK(pixel[PIXEL_GREEN], CHANNEL_VALUE_ONE);
CHECK(pixel[PIXEL_BLUE], CHANNEL_VALUE_ONE);
CHECK(pixel[PIXEL_ALPHA], F16HALF_OPACITY_TRANSPARENT);
- cs->fromQColor(qRgb(255, 255, 255), OPACITY_OPAQUE / 2, reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_OPAQUE / 2, reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK(pixel[PIXEL_RED], CHANNEL_VALUE_ONE);
CHECK(pixel[PIXEL_GREEN], CHANNEL_VALUE_ONE);
@@ -157,9 +157,9 @@ void KisRgbF16HalfColorSpaceTester::testBasics()
pixel[PIXEL_GREEN] = CHANNEL_VALUE_ONE;
pixel[PIXEL_BLUE] = CHANNEL_VALUE_ONE;
- QColor c;
+ TQColor c;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c);
CHECK(c.red(), 255);
CHECK(c.green(), 255);
@@ -169,7 +169,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics()
pixel[PIXEL_GREEN] = CHANNEL_VALUE_ZERO;
pixel[PIXEL_BLUE] = CHANNEL_VALUE_ZERO;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c);
CHECK(c.red(), 0);
CHECK(c.green(), 0);
@@ -179,7 +179,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics()
pixel[PIXEL_GREEN] = CHANNEL_VALUE_ONE / 2;
pixel[PIXEL_BLUE] = (3 * CHANNEL_VALUE_ONE) / 4;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c);
CHECK(c.red(), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 4));
CHECK(c.green(), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 2));
@@ -190,9 +190,9 @@ void KisRgbF16HalfColorSpaceTester::testBasics()
pixel[PIXEL_BLUE] = CHANNEL_VALUE_ONE;
pixel[PIXEL_ALPHA] = CHANNEL_VALUE_ONE;
- Q_UINT8 opacity;
+ TQ_UINT8 opacity;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c, &opacity);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c, &opacity);
CHECK(c.red(), 255);
CHECK(c.green(), 255);
@@ -201,7 +201,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics()
pixel[PIXEL_ALPHA] = F16HALF_OPACITY_OPAQUE;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c, &opacity);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c, &opacity);
CHECK(c.red(), 255);
CHECK(c.green(), 255);
@@ -213,7 +213,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics()
pixel[PIXEL_BLUE] = CHANNEL_VALUE_ZERO;
pixel[PIXEL_ALPHA] = F16HALF_OPACITY_TRANSPARENT;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c, &opacity);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c, &opacity);
CHECK(c.red(), 0);
CHECK(c.green(), 0);
@@ -225,7 +225,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics()
pixel[PIXEL_BLUE] = (3 * CHANNEL_VALUE_ONE) / 4;
pixel[PIXEL_ALPHA] = CHANNEL_VALUE_ONE / 2;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c, &opacity);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c, &opacity);
CHECK(c.red(), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 4));
CHECK(c.green(), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 2));
@@ -241,7 +241,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics()
{CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ONE}
};
- cs->setAlpha(reinterpret_cast<Q_UINT8 *>(pixels), OPACITY_OPAQUE / 2, NUM_PIXELS);
+ cs->setAlpha(reinterpret_cast<TQ_UINT8 *>(pixels), OPACITY_OPAQUE / 2, NUM_PIXELS);
CHECK(pixels[0].red, CHANNEL_VALUE_ONE);
CHECK(pixels[0].green, CHANNEL_VALUE_ONE);
@@ -268,31 +268,31 @@ void KisRgbF16HalfColorSpaceTester::testBasics()
pixel[PIXEL_BLUE] = CHANNEL_VALUE_ONE / 4;
pixel[PIXEL_ALPHA] = CHANNEL_VALUE_ZERO;
- QString valueText = cs->channelValueText(reinterpret_cast<Q_UINT8 *>(pixel), RED_CHANNEL);
- CHECK(valueText, QString().setNum(CHANNEL_VALUE_ONE));
+ TQString valueText = cs->channelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), RED_CHANNEL);
+ CHECK(valueText, TQString().setNum(CHANNEL_VALUE_ONE));
- valueText = cs->channelValueText(reinterpret_cast<Q_UINT8 *>(pixel), GREEN_CHANNEL);
- CHECK(valueText, QString().setNum(CHANNEL_VALUE_ONE / 2));
+ valueText = cs->channelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), GREEN_CHANNEL);
+ CHECK(valueText, TQString().setNum(CHANNEL_VALUE_ONE / 2));
- valueText = cs->channelValueText(reinterpret_cast<Q_UINT8 *>(pixel), BLUE_CHANNEL);
- CHECK(valueText, QString().setNum(CHANNEL_VALUE_ONE / 4));
+ valueText = cs->channelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), BLUE_CHANNEL);
+ CHECK(valueText, TQString().setNum(CHANNEL_VALUE_ONE / 4));
- valueText = cs->channelValueText(reinterpret_cast<Q_UINT8 *>(pixel), ALPHA_CHANNEL);
- CHECK(valueText, QString().setNum(CHANNEL_VALUE_ZERO));
+ valueText = cs->channelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), ALPHA_CHANNEL);
+ CHECK(valueText, TQString().setNum(CHANNEL_VALUE_ZERO));
- valueText = cs->normalisedChannelValueText(reinterpret_cast<Q_UINT8 *>(pixel), RED_CHANNEL);
- CHECK(valueText, QString().setNum(CHANNEL_VALUE_ONE));
+ valueText = cs->normalisedChannelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), RED_CHANNEL);
+ CHECK(valueText, TQString().setNum(CHANNEL_VALUE_ONE));
- valueText = cs->normalisedChannelValueText(reinterpret_cast<Q_UINT8 *>(pixel), GREEN_CHANNEL);
- CHECK(valueText, QString().setNum(CHANNEL_VALUE_ONE / 2));
+ valueText = cs->normalisedChannelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), GREEN_CHANNEL);
+ CHECK(valueText, TQString().setNum(CHANNEL_VALUE_ONE / 2));
- valueText = cs->normalisedChannelValueText(reinterpret_cast<Q_UINT8 *>(pixel), BLUE_CHANNEL);
- CHECK(valueText, QString().setNum(CHANNEL_VALUE_ONE / 4));
+ valueText = cs->normalisedChannelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), BLUE_CHANNEL);
+ CHECK(valueText, TQString().setNum(CHANNEL_VALUE_ONE / 4));
- valueText = cs->normalisedChannelValueText(reinterpret_cast<Q_UINT8 *>(pixel), ALPHA_CHANNEL);
- CHECK(valueText, QString().setNum(CHANNEL_VALUE_ZERO));
+ valueText = cs->normalisedChannelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), ALPHA_CHANNEL);
+ CHECK(valueText, TQString().setNum(CHANNEL_VALUE_ZERO));
- cs->setPixel(reinterpret_cast<Q_UINT8 *>(pixel), 0.128, 0.192, 0.64, 0.99);
+ cs->setPixel(reinterpret_cast<TQ_UINT8 *>(pixel), 0.128, 0.192, 0.64, 0.99);
CHECK(pixel[PIXEL_RED], (half)0.128f);
CHECK(pixel[PIXEL_GREEN], (half)0.192f);
CHECK(pixel[PIXEL_BLUE], (half)0.64f);
@@ -303,7 +303,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics()
half blue;
half alpha;
- cs->getPixel(reinterpret_cast<const Q_UINT8 *>(pixel), &red, &green, &blue, &alpha);
+ cs->getPixel(reinterpret_cast<const TQ_UINT8 *>(pixel), &red, &green, &blue, &alpha);
CHECK(red, (half)0.128f);
CHECK(green, (half)0.192f);
CHECK(blue, (half)0.64f);
@@ -347,16 +347,16 @@ void KisRgbF16HalfColorSpaceTester::testMixColors()
pixel2[PIXEL_BLUE] = 0;
pixel2[PIXEL_ALPHA] = 0;
- const Q_UINT8 *pixelPtrs[2];
- Q_UINT8 weights[2];
+ const TQ_UINT8 *pixelPtrs[2];
+ TQ_UINT8 weights[2];
- pixelPtrs[0] = reinterpret_cast<const Q_UINT8 *>(pixel1);
- pixelPtrs[1] = reinterpret_cast<const Q_UINT8 *>(pixel2);
+ pixelPtrs[0] = reinterpret_cast<const TQ_UINT8 *>(pixel1);
+ pixelPtrs[1] = reinterpret_cast<const TQ_UINT8 *>(pixel2);
weights[0] = 255;
weights[1] = 0;
- cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<Q_UINT8 *>(outputPixel));
+ cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<TQ_UINT8 *>(outputPixel));
CHECK(outputPixel[PIXEL_RED], CHANNEL_VALUE_ONE);
CHECK(outputPixel[PIXEL_GREEN], CHANNEL_VALUE_ONE);
@@ -366,7 +366,7 @@ void KisRgbF16HalfColorSpaceTester::testMixColors()
weights[0] = 0;
weights[1] = 255;
- cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<Q_UINT8 *>(outputPixel));
+ cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<TQ_UINT8 *>(outputPixel));
CHECK(outputPixel[PIXEL_RED], (half)0.0f);
CHECK(outputPixel[PIXEL_GREEN], (half)0.0f);
@@ -376,7 +376,7 @@ void KisRgbF16HalfColorSpaceTester::testMixColors()
weights[0] = 128;
weights[1] = 127;
- cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<Q_UINT8 *>(outputPixel));
+ cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<TQ_UINT8 *>(outputPixel));
CHECK(outputPixel[PIXEL_RED], CHANNEL_VALUE_ONE);
CHECK(outputPixel[PIXEL_GREEN], CHANNEL_VALUE_ONE);
@@ -393,7 +393,7 @@ void KisRgbF16HalfColorSpaceTester::testMixColors()
pixel2[PIXEL_BLUE] = 2000;
pixel2[PIXEL_ALPHA] = CHANNEL_VALUE_ONE;
- cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<Q_UINT8 *>(outputPixel));
+ cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<TQ_UINT8 *>(outputPixel));
CHECK_TOLERANCE(outputPixel[PIXEL_RED], (128 * 20000 + 127 * 10000) / 255, 5);
CHECK_TOLERANCE(outputPixel[PIXEL_GREEN], (128 * 10000 + 127 * 20000) / 255, 5);
@@ -413,7 +413,7 @@ void KisRgbF16HalfColorSpaceTester::testMixColors()
weights[0] = 89;
weights[1] = 166;
- cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<Q_UINT8 *>(outputPixel));
+ cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<TQ_UINT8 *>(outputPixel));
CHECK(outputPixel[PIXEL_RED], CHANNEL_VALUE_ONE);
CHECK(outputPixel[PIXEL_GREEN], CHANNEL_VALUE_ONE);
@@ -424,7 +424,7 @@ void KisRgbF16HalfColorSpaceTester::testMixColors()
#define PIXELS_WIDTH 2
#define PIXELS_HEIGHT 2
-void KisRgbF16HalfColorSpaceTester::testToQImage()
+void KisRgbF16HalfColorSpaceTester::testToTQImage()
{
KisProfile *profile = new KisProfile(cmsCreate_sRGBProfile());
@@ -437,37 +437,37 @@ void KisRgbF16HalfColorSpaceTester::testToQImage()
{CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ONE}
};
- QImage image = cs->convertToQImage(reinterpret_cast<const Q_UINT8 *>(pixels), PIXELS_WIDTH, PIXELS_HEIGHT, 0, 0);
+ TQImage image = cs->convertToTQImage(reinterpret_cast<const TQ_UINT8 *>(pixels), PIXELS_WIDTH, PIXELS_HEIGHT, 0, 0);
- QRgb c = image.pixel(0, 0);
+ TQRgb c = image.pixel(0, 0);
// Exposure comes into play here.
/*
- CHECK(qRed(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE));
- CHECK(qGreen(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE));
- CHECK(qBlue(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE));
- CHECK(qAlpha(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 4));
+ CHECK(tqRed(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE));
+ CHECK(tqGreen(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE));
+ CHECK(tqBlue(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE));
+ CHECK(tqAlpha(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 4));
c = image.pixel(1, 0);
- CHECK(qRed(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 3));
- CHECK(qGreen(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 2));
- CHECK(qBlue(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 4));
- CHECK(qAlpha(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 2));
+ CHECK(tqRed(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 3));
+ CHECK(tqGreen(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 2));
+ CHECK(tqBlue(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 4));
+ CHECK(tqAlpha(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE / 2));
c = image.pixel(0, 1);
- CHECK(qRed(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE));
- CHECK(qGreen(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE));
- CHECK(qBlue(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE));
- CHECK(qAlpha(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ZERO));
+ CHECK(tqRed(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE));
+ CHECK(tqGreen(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE));
+ CHECK(tqBlue(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE));
+ CHECK(tqAlpha(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ZERO));
c = image.pixel(1, 1);
- CHECK(qRed(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ZERO));
- CHECK(qGreen(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ZERO));
- CHECK(qBlue(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ZERO));
- CHECK(qAlpha(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE));
+ CHECK(tqRed(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ZERO));
+ CHECK(tqGreen(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ZERO));
+ CHECK(tqBlue(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ZERO));
+ CHECK(tqAlpha(c), (int)HALF_TO_UINT8(CHANNEL_VALUE_ONE));
*/
}
@@ -501,22 +501,22 @@ void KisRgbF16HalfColorSpaceTester::testCompositeOps()
dstPixel = srcPixel;
- cs->compositeDivide(reinterpret_cast<Q_UINT8 *>(&dstPixel), 1, reinterpret_cast<const Q_UINT8 *>(&srcPixel),
+ cs->compositeDivide(reinterpret_cast<TQ_UINT8 *>(&dstPixel), 1, reinterpret_cast<const TQ_UINT8 *>(&srcPixel),
1, 0, 0, 1, 1, F16HALF_OPACITY_OPAQUE);
/*
- CHECK(dstPixel.red, (Q_UINT16)UINT8_TO_UINT16(253));
- CHECK(dstPixel.green, (Q_UINT16)UINT8_TO_UINT16(254));
- CHECK(dstPixel.blue, (Q_UINT16)UINT8_TO_UINT16(254));
+ CHECK(dstPixel.red, (TQ_UINT16)UINT8_TO_UINT16(253));
+ CHECK(dstPixel.green, (TQ_UINT16)UINT8_TO_UINT16(254));
+ CHECK(dstPixel.blue, (TQ_UINT16)UINT8_TO_UINT16(254));
CHECK(dstPixel.alpha, KisRgbF16HalfColorSpace::F16HALF_OPACITY_OPAQUE);
- Q_UINT16 srcColor = 43690;
- Q_UINT16 dstColor = 43690;
+ TQ_UINT16 srcColor = 43690;
+ TQ_UINT16 dstColor = 43690;
- srcColor = QMIN((dstColor * (65535u + 1u) + (srcColor / 2u)) / (1u + srcColor), 65535u);
+ srcColor = TQMIN((dstColor * (65535u + 1u) + (srcColor / 2u)) / (1u + srcColor), 65535u);
CHECK((int)srcColor, 65534);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, 65535u);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, 65535u);
CHECK((int)newColor, 65534);
*/
@@ -536,8 +536,8 @@ void KisRgbF16HalfColorSpaceTester::testCompositeOps()
{CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ZERO, CHANNEL_VALUE_ONE}
};
- cs->compositeOver(reinterpret_cast<Q_UINT8 *>(dstPixels), DST_ROW_STRIDE, reinterpret_cast<const Q_UINT8 *>(srcPixels),
- SRC_ROW_STRIDE, mask, MASK_ROW_STRIDE, NUM_ROWS, NUM_COLUMNS, opacity);
+ cs->compositeOver(reinterpret_cast<TQ_UINT8 *>(dstPixels), DST_ROW_STRIDE, reinterpret_cast<const TQ_UINT8 *>(srcPixels),
+ SRC_ROW_STRIDE, tqmask, MASK_ROW_STRIDE, NUM_ROWS, NUM_COLUMNS, opacity);
*/
delete cs;
diff --git a/krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.h b/krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.h
index db740fa4..6547e35b 100644
--- a/krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.h
+++ b/krita/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.h
@@ -26,11 +26,11 @@
#define CHECK_TOLERANCE( x, y, tolerance ) \
if ((x) <= (y) + (tolerance) && (x) >= (y) - (tolerance)) \
{ \
- success(QString(__FILE__) + "[" + QString::number(__LINE__) + "]: passed " + #x); \
+ success(TQString(__FILE__) + "[" + TQString::number(__LINE__) + "]: passed " + #x); \
} \
else \
{ \
- failure(QString(__FILE__) + "[" + QString::number(__LINE__) + QString("]: failed ") + #x + "\n Expected " + #y + ", Actual result " + QString::number(x)); \
+ failure(TQString(__FILE__) + "[" + TQString::number(__LINE__) + TQString("]: failed ") + #x + "\n Expected " + #y + ", Actual result " + TQString::number(x)); \
} \
class KisRgbF16HalfColorSpaceTester : public KUnitTest::Tester
@@ -39,7 +39,7 @@ public:
void allTests();
void testBasics();
void testMixColors();
- void testToQImage();
+ void testToTQImage();
void testCompositeOps();
};
diff --git a/krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.cc b/krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.cc
index 7db6bd9e..98e0b28b 100644
--- a/krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.cc
+++ b/krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.cc
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include LCMS_HEADER
-#include <qimage.h>
+#include <tqimage.h>
#include <kdebug.h>
#include <klocale.h>
@@ -33,8 +33,8 @@
#include "kis_color_conversions.h"
namespace {
- const Q_INT32 MAX_CHANNEL_RGB = 3;
- const Q_INT32 MAX_CHANNEL_RGBA = 4;
+ const TQ_INT32 MAX_CHANNEL_RGB = 3;
+ const TQ_INT32 MAX_CHANNEL_RGBA = 4;
}
#include "kis_integer_maths.h"
@@ -52,8 +52,8 @@ namespace {
#define F32_LCMS_TYPE TYPE_BGRA_16
// disable the lcms handling by setting profile=0
-KisRgbF32ColorSpace::KisRgbF32ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile */*p*/) :
- KisF32BaseColorSpace(KisID("RGBAF32", i18n("RGB (32-bit float/channel)")), F32_LCMS_TYPE, icSigRgbData, parent, 0)
+KisRgbF32ColorSpace::KisRgbF32ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile */*p*/) :
+ KisF32BaseColorSpace(KisID("RGBAF32", i18n("RGB (32-bit float/channel)")), F32_LCMS_TYPE, icSigRgbData, tqparent, 0)
{
m_channels.push_back(new KisChannelInfo(i18n("Red"), i18n("R"), PIXEL_RED * sizeof(float), KisChannelInfo::COLOR, KisChannelInfo::FLOAT32, sizeof(float)));
m_channels.push_back(new KisChannelInfo(i18n("Green"), i18n("G"), PIXEL_GREEN * sizeof(float), KisChannelInfo::COLOR, KisChannelInfo::FLOAT32, sizeof(float)));
@@ -67,7 +67,7 @@ KisRgbF32ColorSpace::~KisRgbF32ColorSpace()
{
}
-void KisRgbF32ColorSpace::setPixel(Q_UINT8 *dst, float red, float green, float blue, float alpha) const
+void KisRgbF32ColorSpace::setPixel(TQ_UINT8 *dst, float red, float green, float blue, float alpha) const
{
Pixel *dstPixel = reinterpret_cast<Pixel *>(dst);
@@ -77,7 +77,7 @@ void KisRgbF32ColorSpace::setPixel(Q_UINT8 *dst, float red, float green, float b
dstPixel->alpha = alpha;
}
-void KisRgbF32ColorSpace::getPixel(const Q_UINT8 *src, float *red, float *green, float *blue, float *alpha) const
+void KisRgbF32ColorSpace::getPixel(const TQ_UINT8 *src, float *red, float *green, float *blue, float *alpha) const
{
const Pixel *srcPixel = reinterpret_cast<const Pixel *>(src);
@@ -87,7 +87,7 @@ void KisRgbF32ColorSpace::getPixel(const Q_UINT8 *src, float *red, float *green,
*alpha = srcPixel->alpha;
}
-void KisRgbF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfile * /*profile*/)
+void KisRgbF32ColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 *dstU8, KisProfile * /*profile*/)
{
Pixel *dst = reinterpret_cast<Pixel *>(dstU8);
@@ -96,7 +96,7 @@ void KisRgbF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfile
dst->blue = UINT8_TO_FLOAT(c.blue());
}
-void KisRgbF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dstU8, KisProfile * /*profile*/)
+void KisRgbF32ColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dstU8, KisProfile * /*profile*/)
{
Pixel *dst = reinterpret_cast<Pixel *>(dstU8);
@@ -106,14 +106,14 @@ void KisRgbF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *
dst->alpha = UINT8_TO_FLOAT(opacity);
}
-void KisRgbF32ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, KisProfile * /*profile*/)
+void KisRgbF32ColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, KisProfile * /*profile*/)
{
const Pixel *src = reinterpret_cast<const Pixel *>(srcU8);
c->setRgb(FLOAT_TO_UINT8(src->red), FLOAT_TO_UINT8(src->green), FLOAT_TO_UINT8(src->blue));
}
-void KisRgbF32ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opacity, KisProfile * /*profile*/)
+void KisRgbF32ColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, TQ_UINT8 *opacity, KisProfile * /*profile*/)
{
const Pixel *src = reinterpret_cast<const Pixel *>(srcU8);
@@ -121,17 +121,17 @@ void KisRgbF32ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opa
*opacity = FLOAT_TO_UINT8(src->alpha);
}
-Q_UINT8 KisRgbF32ColorSpace::difference(const Q_UINT8 *src1U8, const Q_UINT8 *src2U8)
+TQ_UINT8 KisRgbF32ColorSpace::difference(const TQ_UINT8 *src1U8, const TQ_UINT8 *src2U8)
{
const Pixel *src1 = reinterpret_cast<const Pixel *>(src1U8);
const Pixel *src2 = reinterpret_cast<const Pixel *>(src2U8);
- return FLOAT_TO_UINT8(QMAX(QABS(src2->red - src1->red),
- QMAX(QABS(src2->green - src1->green),
- QABS(src2->blue - src1->blue))));
+ return FLOAT_TO_UINT8(TQMAX(TQABS(src2->red - src1->red),
+ TQMAX(TQABS(src2->green - src1->green),
+ TQABS(src2->blue - src1->blue))));
}
-void KisRgbF32ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const
+void KisRgbF32ColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const
{
float totalRed = 0, totalGreen = 0, totalBlue = 0, newAlpha = 0;
@@ -168,7 +168,7 @@ void KisRgbF32ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weigh
dstPixel->blue = totalBlue;
}
-void KisRgbF32ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const
+void KisRgbF32ColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const
{
float totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0;
@@ -201,9 +201,9 @@ void KisRgbF32ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32 * kernelValue
}
-void KisRgbF32ColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels)
+void KisRgbF32ColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels)
{
- Q_UINT32 psize = pixelSize();
+ TQ_UINT32 psize = pixelSize();
while (nPixels--)
{
@@ -216,7 +216,7 @@ void KisRgbF32ColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels)
}
-Q_UINT8 KisRgbF32ColorSpace::intensity8(const Q_UINT8 * src) const
+TQ_UINT8 KisRgbF32ColorSpace::intensity8(const TQ_UINT8 * src) const
{
const Pixel * p = reinterpret_cast<const Pixel *>( src );
@@ -225,27 +225,27 @@ Q_UINT8 KisRgbF32ColorSpace::intensity8(const Q_UINT8 * src) const
-QValueVector<KisChannelInfo *> KisRgbF32ColorSpace::channels() const
+TQValueVector<KisChannelInfo *> KisRgbF32ColorSpace::channels() const
{
return m_channels;
}
-Q_UINT32 KisRgbF32ColorSpace::nChannels() const
+TQ_UINT32 KisRgbF32ColorSpace::nChannels() const
{
return MAX_CHANNEL_RGBA;
}
-Q_UINT32 KisRgbF32ColorSpace::nColorChannels() const
+TQ_UINT32 KisRgbF32ColorSpace::nColorChannels() const
{
return MAX_CHANNEL_RGB;
}
-Q_UINT32 KisRgbF32ColorSpace::pixelSize() const
+TQ_UINT32 KisRgbF32ColorSpace::pixelSize() const
{
return MAX_CHANNEL_RGBA * sizeof(float);
}
-Q_UINT8 convertToDisplay(float value, float exposureFactor, float gamma)
+TQ_UINT8 convertToDisplay(float value, float exposureFactor, float gamma)
{
//value *= pow(2, exposure + 2.47393);
value *= exposureFactor;
@@ -261,17 +261,17 @@ Q_UINT8 convertToDisplay(float value, float exposureFactor, float gamma)
return CLAMP(valueInt, 0, 255);
}
-QImage KisRgbF32ColorSpace::convertToQImage(const Q_UINT8 *dataU8, Q_INT32 width, Q_INT32 height,
+TQImage KisRgbF32ColorSpace::convertToTQImage(const TQ_UINT8 *dataU8, TQ_INT32 width, TQ_INT32 height,
KisProfile * /*dstProfile*/,
- Q_INT32 /*renderingIntent*/, float exposure)
+ TQ_INT32 /*renderingIntent*/, float exposure)
{
const float *data = reinterpret_cast<const float *>(dataU8);
- QImage img = QImage(width, height, 32, 0, QImage::LittleEndian);
+ TQImage img = TQImage(width, height, 32, 0, TQImage::LittleEndian);
img.setAlphaBuffer(true);
- Q_INT32 i = 0;
+ TQ_INT32 i = 0;
uchar *j = img.bits();
// XXX: For now assume gamma 2.2.
@@ -298,27 +298,27 @@ QImage KisRgbF32ColorSpace::convertToQImage(const Q_UINT8 *dataU8, Q_INT32 width
}
-void KisRgbF32ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity)
+void KisRgbF32ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity)
{
while (rows > 0) {
const float *src = reinterpret_cast<const float *>(srcRowStart);
float *dst = reinterpret_cast<float *>(dstRowStart);
- const Q_UINT8 *mask = maskRowStart;
- Q_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
+ TQ_INT32 columns = numColumns;
while (columns > 0) {
float srcAlpha = src[PIXEL_ALPHA];
- // apply the alphamask
- if (mask != 0) {
- Q_UINT8 U8_mask = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ TQ_UINT8 U8_tqmask = *tqmask;
- if (U8_mask != OPACITY_OPAQUE) {
- srcAlpha *= UINT8_TO_FLOAT(U8_mask);
+ if (U8_tqmask != OPACITY_OPAQUE) {
+ srcAlpha *= UINT8_TO_FLOAT(U8_tqmask);
}
- mask++;
+ tqmask++;
}
if (srcAlpha > F32_OPACITY_TRANSPARENT + EPSILON) {
@@ -365,8 +365,8 @@ void KisRgbF32ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart) {
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart) {
+ tqmaskRowStart += tqmaskRowStride;
}
}
}
@@ -376,23 +376,23 @@ void KisRgbF32ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
\
const float *src = reinterpret_cast<const float *>(srcRowStart); \
float *dst = reinterpret_cast<float *>(dstRowStart); \
- Q_INT32 columns = numColumns; \
- const Q_UINT8 *mask = maskRowStart; \
+ TQ_INT32 columns = numColumns; \
+ const TQ_UINT8 *tqmask = tqmaskRowStart; \
\
while (columns > 0) { \
\
float srcAlpha = src[PIXEL_ALPHA]; \
float dstAlpha = dst[PIXEL_ALPHA]; \
\
- srcAlpha = QMIN(srcAlpha, dstAlpha); \
+ srcAlpha = TQMIN(srcAlpha, dstAlpha); \
\
- if (mask != 0) { \
- Q_UINT8 U8_mask = *mask; \
+ if (tqmask != 0) { \
+ TQ_UINT8 U8_tqmask = *tqmask; \
\
- if (U8_mask != OPACITY_OPAQUE) { \
- srcAlpha *= UINT8_TO_FLOAT(U8_mask); \
+ if (U8_tqmask != OPACITY_OPAQUE) { \
+ srcAlpha *= UINT8_TO_FLOAT(U8_tqmask); \
} \
- mask++; \
+ tqmask++; \
} \
\
if (srcAlpha > F32_OPACITY_TRANSPARENT + EPSILON) { \
@@ -427,12 +427,12 @@ void KisRgbF32ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
rows--; \
srcRowStart += srcRowStride; \
dstRowStart += dstRowStride; \
- if(maskRowStart) { \
- maskRowStart += maskRowStride; \
+ if(tqmaskRowStart) { \
+ tqmaskRowStart += tqmaskRowStride; \
} \
}
-void KisRgbF32ColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity)
+void KisRgbF32ColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -462,7 +462,7 @@ void KisRgbF32ColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRow
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF32ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity)
+void KisRgbF32ColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -472,7 +472,7 @@ void KisRgbF32ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
float srcColor = src[channel];
float dstColor = dst[channel];
- srcColor = QMIN(dstColor / (srcColor + EPSILON), FLOAT_MAX);
+ srcColor = TQMIN(dstColor / (srcColor + EPSILON), FLOAT_MAX);
float newColor = FLOAT_BLEND(srcColor, dstColor, srcBlend);
@@ -483,7 +483,7 @@ void KisRgbF32ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF32ColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity)
+void KisRgbF32ColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -504,7 +504,7 @@ void KisRgbF32ColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF32ColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity)
+void KisRgbF32ColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -525,7 +525,7 @@ void KisRgbF32ColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF32ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity)
+void KisRgbF32ColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -535,7 +535,7 @@ void KisRgbF32ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
float srcColor = src[channel];
float dstColor = dst[channel];
- srcColor = QMIN(dstColor / (FLOAT_MAX + EPSILON - srcColor), FLOAT_MAX);
+ srcColor = TQMIN(dstColor / (FLOAT_MAX + EPSILON - srcColor), FLOAT_MAX);
float newColor = FLOAT_BLEND(srcColor, dstColor, srcBlend);
@@ -546,7 +546,7 @@ void KisRgbF32ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF32ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity)
+void KisRgbF32ColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -556,7 +556,7 @@ void KisRgbF32ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
float srcColor = src[channel];
float dstColor = dst[channel];
- srcColor = QMIN((FLOAT_MAX - dstColor) / (srcColor + EPSILON), FLOAT_MAX);
+ srcColor = TQMIN((FLOAT_MAX - dstColor) / (srcColor + EPSILON), FLOAT_MAX);
srcColor = CLAMP(FLOAT_MAX - srcColor, 0, FLOAT_MAX);
float newColor = FLOAT_BLEND(srcColor, dstColor, srcBlend);
@@ -568,7 +568,7 @@ void KisRgbF32ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF32ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity)
+void KisRgbF32ColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -578,7 +578,7 @@ void KisRgbF32ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
float srcColor = src[channel];
float dstColor = dst[channel];
- srcColor = QMIN(srcColor, dstColor);
+ srcColor = TQMIN(srcColor, dstColor);
float newColor = FLOAT_BLEND(srcColor, dstColor, srcBlend);
@@ -589,7 +589,7 @@ void KisRgbF32ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF32ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity)
+void KisRgbF32ColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -599,7 +599,7 @@ void KisRgbF32ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
float srcColor = src[channel];
float dstColor = dst[channel];
- srcColor = QMAX(srcColor, dstColor);
+ srcColor = TQMAX(srcColor, dstColor);
float newColor = FLOAT_BLEND(srcColor, dstColor, srcBlend);
@@ -610,7 +610,7 @@ void KisRgbF32ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF32ColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity)
+void KisRgbF32ColorSpace::compositeHue(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -644,7 +644,7 @@ void KisRgbF32ColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF32ColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity)
+void KisRgbF32ColorSpace::compositeSaturation(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -678,7 +678,7 @@ void KisRgbF32ColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstR
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF32ColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity)
+void KisRgbF32ColorSpace::compositeValue(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -712,7 +712,7 @@ void KisRgbF32ColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF32ColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, float opacity)
+void KisRgbF32ColorSpace::compositeColor(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, float opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -746,34 +746,34 @@ void KisRgbF32ColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbF32ColorSpace::compositeErase(Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_INT32 rows,
- Q_INT32 cols,
+void KisRgbF32ColorSpace::compositeErase(TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
float /*opacity*/)
{
while (rows-- > 0)
{
const Pixel *s = reinterpret_cast<const Pixel *>(src);
Pixel *d = reinterpret_cast<Pixel *>(dst);
- const Q_UINT8 *mask = srcAlphaMask;
+ const TQ_UINT8 *tqmask = srcAlphaMask;
- for (Q_INT32 i = cols; i > 0; i--, s++, d++)
+ for (TQ_INT32 i = cols; i > 0; i--, s++, d++)
{
float srcAlpha = s->alpha;
- // apply the alphamask
- if (mask != 0) {
- Q_UINT8 U8_mask = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ TQ_UINT8 U8_tqmask = *tqmask;
- if (U8_mask != OPACITY_OPAQUE) {
- srcAlpha = FLOAT_BLEND(srcAlpha, F32_OPACITY_OPAQUE, UINT8_TO_FLOAT(U8_mask));
+ if (U8_tqmask != OPACITY_OPAQUE) {
+ srcAlpha = FLOAT_BLEND(srcAlpha, F32_OPACITY_OPAQUE, UINT8_TO_FLOAT(U8_tqmask));
}
- mask++;
+ tqmask++;
}
d->alpha = srcAlpha * d->alpha;
}
@@ -781,20 +781,20 @@ void KisRgbF32ColorSpace::compositeErase(Q_UINT8 *dst,
dst += dstRowSize;
src += srcRowSize;
if(srcAlphaMask) {
- srcAlphaMask += maskRowStride;
+ srcAlphaMask += tqmaskRowStride;
}
}
}
-void KisRgbF32ColorSpace::bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *mask,
- Q_INT32 maskRowStride,
- Q_UINT8 U8_opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+void KisRgbF32ColorSpace::bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *tqmask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 U8_opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op)
{
float opacity = UINT8_TO_FLOAT(U8_opacity);
@@ -804,7 +804,7 @@ void KisRgbF32ColorSpace::bitBlt(Q_UINT8 *dst,
// Undefined == no composition
break;
case COMPOSITE_OVER:
- compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_IN:
//compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -833,16 +833,16 @@ void KisRgbF32ColorSpace::bitBlt(Q_UINT8 *dst,
//compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_MULT:
- compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DIVIDE:
- compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BUMPMAP:
//compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_COPY:
- compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, U8_opacity);
+ compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, U8_opacity);
break;
case COMPOSITE_COPY_RED:
//compositeCopyRed(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -877,22 +877,22 @@ void KisRgbF32ColorSpace::bitBlt(Q_UINT8 *dst,
// No composition.
break;
case COMPOSITE_DARKEN:
- compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_LIGHTEN:
- compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_HUE:
- compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_SATURATION:
- compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_VALUE:
- compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLOR:
- compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLORIZE:
//compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -901,24 +901,24 @@ void KisRgbF32ColorSpace::bitBlt(Q_UINT8 *dst,
//compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_SCREEN:
- compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_OVERLAY:
- compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
- compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DODGE:
- compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BURN:
- compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ALPHA_DARKEN:
abstractCompositeAlphaDarken<float, F32Mult, Uint8ToF32, F32OpacityTest,
PIXEL_ALPHA, MAX_CHANNEL_RGB, MAX_CHANNEL_RGBA>(
- dst, dstRowStride, src, srcRowStride, mask, maskRowStride,
+ dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride,
rows, cols, U8_opacity, F32Mult(), Uint8ToF32(), F32OpacityTest());
default:
break;
diff --git a/krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.h b/krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.h
index a1681be5..615025cd 100644
--- a/krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.h
+++ b/krita/colorspaces/rgb_f32/kis_rgb_f32_colorspace.h
@@ -20,7 +20,7 @@
#ifndef KIS_STRATEGY_COLORSPACE_RGB_F32_H_
#define KIS_STRATEGY_COLORSPACE_RGB_F32_H_
-#include <qcolor.h>
+#include <tqcolor.h>
#include <klocale.h>
@@ -33,7 +33,7 @@ class KisColorSpaceFactoryRegistry;
class KRITATOOL_EXPORT KisRgbF32ColorSpace : public KisF32BaseColorSpace {
public:
- KisRgbF32ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p);
+ KisRgbF32ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p);
virtual ~KisRgbF32ColorSpace();
virtual bool willDegrade(ColorSpaceIndependence independence)
@@ -47,30 +47,30 @@ public:
public:
- void setPixel(Q_UINT8 *pixel, float red, float green, float blue, float alpha) const;
- void getPixel(const Q_UINT8 *pixel, float *red, float *green, float *blue, float *alpha) const;
+ void setPixel(TQ_UINT8 *pixel, float red, float green, float blue, float alpha) const;
+ void getPixel(const TQ_UINT8 *pixel, float *red, float *green, float *blue, float *alpha) const;
- virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0);
- virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0);
+ virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0);
+ virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0);
- virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0);
- virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0);
+ virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0);
+ virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0);
- virtual Q_UINT8 difference(const Q_UINT8 *src1, const Q_UINT8 *src2);
- virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
- virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels);
- virtual void convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const;
- virtual Q_UINT8 intensity8(const Q_UINT8 * src) const;
+ virtual TQ_UINT8 difference(const TQ_UINT8 *src1, const TQ_UINT8 *src2);
+ virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const;
+ virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels);
+ virtual void convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const;
+ virtual TQ_UINT8 intensity8(const TQ_UINT8 * src) const;
- virtual QValueVector<KisChannelInfo *> channels() const;
- virtual Q_UINT32 nChannels() const;
- virtual Q_UINT32 nColorChannels() const;
- virtual Q_UINT32 pixelSize() const;
+ virtual TQValueVector<KisChannelInfo *> channels() const;
+ virtual TQ_UINT32 nChannels() const;
+ virtual TQ_UINT32 nColorChannels() const;
+ virtual TQ_UINT32 pixelSize() const;
- virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height,
+ virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height,
KisProfile * dstProfile,
- Q_INT32 renderingIntent,
+ TQ_INT32 renderingIntent,
float exposure = 0.0f);
virtual KisCompositeOpList userVisiblecompositeOps() const;
@@ -78,39 +78,39 @@ public:
protected:
- virtual void bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+ virtual void bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op);
- void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
- void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
- void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
- void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
- void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
- void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
- void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
- void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
- void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
- void compositeHue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
- void compositeSaturation(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
- void compositeValue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
- void compositeColor(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
- void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, float opacity);
+ void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
+ void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
+ void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
+ void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
+ void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
+ void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
+ void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
+ void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
+ void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
+ void compositeHue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
+ void compositeSaturation(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
+ void compositeValue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
+ void compositeColor(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
+ void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, float opacity);
private:
friend class KisRgbF32ColorSpaceTester;
- static const Q_UINT8 PIXEL_BLUE = 0;
- static const Q_UINT8 PIXEL_GREEN = 1;
- static const Q_UINT8 PIXEL_RED = 2;
- static const Q_UINT8 PIXEL_ALPHA = 3;
+ static const TQ_UINT8 PIXEL_BLUE = 0;
+ static const TQ_UINT8 PIXEL_GREEN = 1;
+ static const TQ_UINT8 PIXEL_RED = 2;
+ static const TQ_UINT8 PIXEL_ALPHA = 3;
struct Pixel {
float blue;
@@ -126,7 +126,7 @@ private:
}
};
struct Uint8ToF32 {
- inline float operator()(const Q_UINT8 src) const {
+ inline float operator()(const TQ_UINT8 src) const {
return UINT8_TO_FLOAT(src);
}
};
@@ -152,13 +152,13 @@ public:
/**
* lcms colorspace type definition.
*/
- virtual Q_UINT32 colorSpaceType() { return F32_LCMS_TYPE; };
+ virtual TQ_UINT32 colorSpaceType() { return F32_LCMS_TYPE; };
virtual icColorSpaceSignature colorSpaceSignature() { return icSigRgbData; };
- virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisRgbF32ColorSpace(parent, p); };
+ virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisRgbF32ColorSpace(tqparent, p); };
- virtual QString defaultProfile() { return "sRGB built-in - (lcms internal)"; };
+ virtual TQString defaultProfile() { return "sRGB built-in - (lcms internal)"; };
};
#endif // KIS_STRATEGY_COLORSPACE_RGB_F32_H_
diff --git a/krita/colorspaces/rgb_f32/rgb_f32_plugin.cc b/krita/colorspaces/rgb_f32/rgb_f32_plugin.cc
index 01dc514a..b8dad3da 100644
--- a/krita/colorspaces/rgb_f32/rgb_f32_plugin.cc
+++ b/krita/colorspaces/rgb_f32/rgb_f32_plugin.cc
@@ -35,14 +35,14 @@ typedef KGenericFactory<RGBF32Plugin> RGBF32PluginFactory;
K_EXPORT_COMPONENT_FACTORY( krita_rgb_f32_plugin, RGBF32PluginFactory( "krita" ) )
-RGBF32Plugin::RGBF32Plugin(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+RGBF32Plugin::RGBF32Plugin(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(RGBF32PluginFactory::instance());
- if ( parent->inherits("KisColorSpaceFactoryRegistry") )
+ if ( tqparent->inherits("KisColorSpaceFactoryRegistry") )
{
- KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>(parent);
+ KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>(tqparent);
KisColorSpace * colorSpaceRGBF32 = new KisRgbF32ColorSpace(f, 0);
diff --git a/krita/colorspaces/rgb_f32/rgb_f32_plugin.h b/krita/colorspaces/rgb_f32/rgb_f32_plugin.h
index f847dc3d..22ec674f 100644
--- a/krita/colorspaces/rgb_f32/rgb_f32_plugin.h
+++ b/krita/colorspaces/rgb_f32/rgb_f32_plugin.h
@@ -28,8 +28,9 @@
class RGBF32Plugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- RGBF32Plugin(QObject *parent, const char *name, const QStringList &);
+ RGBF32Plugin(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~RGBF32Plugin();
};
diff --git a/krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.cc b/krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.cc
index 5694f3e3..b4ec34e9 100644
--- a/krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.cc
+++ b/krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.cc
@@ -55,7 +55,7 @@ void KisRgbF32ColorSpaceTester::allTests()
KisFactory *factory = new KisFactory();
testBasics();
- testToQImage();
+ testToTQImage();
testCompositeOps();
testMixColors();
@@ -74,7 +74,7 @@ void KisRgbF32ColorSpaceTester::testBasics()
CHECK(cs->nColorChannels(), NUM_COLOUR_CHANNELS);
CHECK(cs->pixelSize(), NUM_CHANNELS * CHANNEL_SIZE);
- QValueVector<KisChannelInfo *> channels = cs->channels();
+ TQValueVector<KisChannelInfo *> channels = cs->channels();
// Red
CHECK(channels[0]->pos(), PIXEL_RED * CHANNEL_SIZE);
@@ -109,39 +109,39 @@ void KisRgbF32ColorSpaceTester::testBasics()
float pixel[NUM_CHANNELS];
- cs->fromQColor(qRgb(255, 255, 255), reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(255, 255, 255), reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK(pixel[PIXEL_RED], MAX_CHANNEL_VALUE);
CHECK(pixel[PIXEL_GREEN], MAX_CHANNEL_VALUE);
CHECK(pixel[PIXEL_BLUE], MAX_CHANNEL_VALUE);
- cs->fromQColor(qRgb(0, 0, 0), reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(0, 0, 0), reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK(pixel[PIXEL_RED], MIN_CHANNEL_VALUE);
CHECK(pixel[PIXEL_GREEN], MIN_CHANNEL_VALUE);
CHECK(pixel[PIXEL_BLUE], MIN_CHANNEL_VALUE);
- cs->fromQColor(qRgb(128, 64, 192), reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(128, 64, 192), reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK(pixel[PIXEL_RED], UINT8_TO_FLOAT(128));
CHECK(pixel[PIXEL_GREEN], UINT8_TO_FLOAT(64));
CHECK(pixel[PIXEL_BLUE], UINT8_TO_FLOAT(192));
- cs->fromQColor(qRgb(255, 255, 255), OPACITY_OPAQUE, reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_OPAQUE, reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK(pixel[PIXEL_RED], MAX_CHANNEL_VALUE);
CHECK(pixel[PIXEL_GREEN], MAX_CHANNEL_VALUE);
CHECK(pixel[PIXEL_BLUE], MAX_CHANNEL_VALUE);
CHECK(pixel[PIXEL_ALPHA], MAX_CHANNEL_VALUE);
- cs->fromQColor(qRgb(255, 255, 255), OPACITY_TRANSPARENT, reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_TRANSPARENT, reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK(pixel[PIXEL_RED], MAX_CHANNEL_VALUE);
CHECK(pixel[PIXEL_GREEN], MAX_CHANNEL_VALUE);
CHECK(pixel[PIXEL_BLUE], MAX_CHANNEL_VALUE);
CHECK(pixel[PIXEL_ALPHA], F32_OPACITY_TRANSPARENT);
- cs->fromQColor(qRgb(255, 255, 255), OPACITY_OPAQUE / 2, reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_OPAQUE / 2, reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK(pixel[PIXEL_RED], MAX_CHANNEL_VALUE);
CHECK(pixel[PIXEL_GREEN], MAX_CHANNEL_VALUE);
@@ -152,9 +152,9 @@ void KisRgbF32ColorSpaceTester::testBasics()
pixel[PIXEL_GREEN] = MAX_CHANNEL_VALUE;
pixel[PIXEL_BLUE] = MAX_CHANNEL_VALUE;
- QColor c;
+ TQColor c;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c);
CHECK(c.red(), 255);
CHECK(c.green(), 255);
@@ -164,7 +164,7 @@ void KisRgbF32ColorSpaceTester::testBasics()
pixel[PIXEL_GREEN] = MIN_CHANNEL_VALUE;
pixel[PIXEL_BLUE] = MIN_CHANNEL_VALUE;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c);
CHECK(c.red(), 0);
CHECK(c.green(), 0);
@@ -174,7 +174,7 @@ void KisRgbF32ColorSpaceTester::testBasics()
pixel[PIXEL_GREEN] = MAX_CHANNEL_VALUE / 2;
pixel[PIXEL_BLUE] = (3 * MAX_CHANNEL_VALUE) / 4;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c);
CHECK(c.red(), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 4));
CHECK(c.green(), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 2));
@@ -185,9 +185,9 @@ void KisRgbF32ColorSpaceTester::testBasics()
pixel[PIXEL_BLUE] = MAX_CHANNEL_VALUE;
pixel[PIXEL_ALPHA] = MAX_CHANNEL_VALUE;
- Q_UINT8 opacity;
+ TQ_UINT8 opacity;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c, &opacity);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c, &opacity);
CHECK(c.red(), 255);
CHECK(c.green(), 255);
@@ -196,7 +196,7 @@ void KisRgbF32ColorSpaceTester::testBasics()
pixel[PIXEL_ALPHA] = F32_OPACITY_OPAQUE;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c, &opacity);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c, &opacity);
CHECK(c.red(), 255);
CHECK(c.green(), 255);
@@ -208,7 +208,7 @@ void KisRgbF32ColorSpaceTester::testBasics()
pixel[PIXEL_BLUE] = MIN_CHANNEL_VALUE;
pixel[PIXEL_ALPHA] = F32_OPACITY_TRANSPARENT;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c, &opacity);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c, &opacity);
CHECK(c.red(), 0);
CHECK(c.green(), 0);
@@ -220,7 +220,7 @@ void KisRgbF32ColorSpaceTester::testBasics()
pixel[PIXEL_BLUE] = (3 * MAX_CHANNEL_VALUE) / 4;
pixel[PIXEL_ALPHA] = MAX_CHANNEL_VALUE / 2;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c, &opacity);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c, &opacity);
CHECK(c.red(), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 4));
CHECK(c.green(), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 2));
@@ -236,7 +236,7 @@ void KisRgbF32ColorSpaceTester::testBasics()
{MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MAX_CHANNEL_VALUE}
};
- cs->setAlpha(reinterpret_cast<Q_UINT8 *>(pixels), OPACITY_OPAQUE / 2, NUM_PIXELS);
+ cs->setAlpha(reinterpret_cast<TQ_UINT8 *>(pixels), OPACITY_OPAQUE / 2, NUM_PIXELS);
CHECK(pixels[0].red, MAX_CHANNEL_VALUE);
CHECK(pixels[0].green, MAX_CHANNEL_VALUE);
@@ -263,31 +263,31 @@ void KisRgbF32ColorSpaceTester::testBasics()
pixel[PIXEL_BLUE] = MAX_CHANNEL_VALUE / 4;
pixel[PIXEL_ALPHA] = MIN_CHANNEL_VALUE;
- QString valueText = cs->channelValueText(reinterpret_cast<Q_UINT8 *>(pixel), RED_CHANNEL);
- CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE));
+ TQString valueText = cs->channelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), RED_CHANNEL);
+ CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE));
- valueText = cs->channelValueText(reinterpret_cast<Q_UINT8 *>(pixel), GREEN_CHANNEL);
- CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE / 2));
+ valueText = cs->channelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), GREEN_CHANNEL);
+ CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE / 2));
- valueText = cs->channelValueText(reinterpret_cast<Q_UINT8 *>(pixel), BLUE_CHANNEL);
- CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE / 4));
+ valueText = cs->channelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), BLUE_CHANNEL);
+ CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE / 4));
- valueText = cs->channelValueText(reinterpret_cast<Q_UINT8 *>(pixel), ALPHA_CHANNEL);
- CHECK(valueText, QString().setNum(MIN_CHANNEL_VALUE));
+ valueText = cs->channelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), ALPHA_CHANNEL);
+ CHECK(valueText, TQString().setNum(MIN_CHANNEL_VALUE));
- valueText = cs->normalisedChannelValueText(reinterpret_cast<Q_UINT8 *>(pixel), RED_CHANNEL);
- CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE));
+ valueText = cs->normalisedChannelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), RED_CHANNEL);
+ CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE));
- valueText = cs->normalisedChannelValueText(reinterpret_cast<Q_UINT8 *>(pixel), GREEN_CHANNEL);
- CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE / 2));
+ valueText = cs->normalisedChannelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), GREEN_CHANNEL);
+ CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE / 2));
- valueText = cs->normalisedChannelValueText(reinterpret_cast<Q_UINT8 *>(pixel), BLUE_CHANNEL);
- CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE / 4));
+ valueText = cs->normalisedChannelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), BLUE_CHANNEL);
+ CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE / 4));
- valueText = cs->normalisedChannelValueText(reinterpret_cast<Q_UINT8 *>(pixel), ALPHA_CHANNEL);
- CHECK(valueText, QString().setNum(MIN_CHANNEL_VALUE));
+ valueText = cs->normalisedChannelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), ALPHA_CHANNEL);
+ CHECK(valueText, TQString().setNum(MIN_CHANNEL_VALUE));
- cs->setPixel(reinterpret_cast<Q_UINT8 *>(pixel), 0.128, 0.192, 0.64, 0.99);
+ cs->setPixel(reinterpret_cast<TQ_UINT8 *>(pixel), 0.128, 0.192, 0.64, 0.99);
CHECK(pixel[PIXEL_RED], 0.128f);
CHECK(pixel[PIXEL_GREEN], 0.192f);
CHECK(pixel[PIXEL_BLUE], 0.64f);
@@ -298,7 +298,7 @@ void KisRgbF32ColorSpaceTester::testBasics()
float blue;
float alpha;
- cs->getPixel(reinterpret_cast<const Q_UINT8 *>(pixel), &red, &green, &blue, &alpha);
+ cs->getPixel(reinterpret_cast<const TQ_UINT8 *>(pixel), &red, &green, &blue, &alpha);
CHECK(red, 0.128f);
CHECK(green, 0.192f);
CHECK(blue, 0.64f);
@@ -343,16 +343,16 @@ void KisRgbF32ColorSpaceTester::testMixColors()
pixel2[PIXEL_BLUE] = 0;
pixel2[PIXEL_ALPHA] = 0;
- const Q_UINT8 *pixelPtrs[2];
- Q_UINT8 weights[2];
+ const TQ_UINT8 *pixelPtrs[2];
+ TQ_UINT8 weights[2];
- pixelPtrs[0] = reinterpret_cast<const Q_UINT8 *>(pixel1);
- pixelPtrs[1] = reinterpret_cast<const Q_UINT8 *>(pixel2);
+ pixelPtrs[0] = reinterpret_cast<const TQ_UINT8 *>(pixel1);
+ pixelPtrs[1] = reinterpret_cast<const TQ_UINT8 *>(pixel2);
weights[0] = 255;
weights[1] = 0;
- cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<Q_UINT8 *>(outputPixel));
+ cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<TQ_UINT8 *>(outputPixel));
CHECK(outputPixel[PIXEL_RED], MAX_CHANNEL_VALUE);
CHECK(outputPixel[PIXEL_GREEN], MAX_CHANNEL_VALUE);
@@ -362,7 +362,7 @@ void KisRgbF32ColorSpaceTester::testMixColors()
weights[0] = 0;
weights[1] = 255;
- cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<Q_UINT8 *>(outputPixel));
+ cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<TQ_UINT8 *>(outputPixel));
CHECK(outputPixel[PIXEL_RED], 0.0f);
CHECK(outputPixel[PIXEL_GREEN], 0.0f);
@@ -372,7 +372,7 @@ void KisRgbF32ColorSpaceTester::testMixColors()
weights[0] = 128;
weights[1] = 127;
- cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<Q_UINT8 *>(outputPixel));
+ cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<TQ_UINT8 *>(outputPixel));
CHECK(outputPixel[PIXEL_RED], MAX_CHANNEL_VALUE);
CHECK(outputPixel[PIXEL_GREEN], MAX_CHANNEL_VALUE);
@@ -389,7 +389,7 @@ void KisRgbF32ColorSpaceTester::testMixColors()
pixel2[PIXEL_BLUE] = 2000;
pixel2[PIXEL_ALPHA] = MAX_CHANNEL_VALUE;
- cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<Q_UINT8 *>(outputPixel));
+ cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<TQ_UINT8 *>(outputPixel));
CHECK_TOLERANCE(outputPixel[PIXEL_RED], (128 * 20000 + 127 * 10000) / 255, 5);
CHECK_TOLERANCE(outputPixel[PIXEL_GREEN], (128 * 10000 + 127 * 20000) / 255, 5);
@@ -409,7 +409,7 @@ void KisRgbF32ColorSpaceTester::testMixColors()
weights[0] = 89;
weights[1] = 166;
- cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<Q_UINT8 *>(outputPixel));
+ cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<TQ_UINT8 *>(outputPixel));
CHECK(outputPixel[PIXEL_RED], MAX_CHANNEL_VALUE);
CHECK(outputPixel[PIXEL_GREEN], MAX_CHANNEL_VALUE);
@@ -420,7 +420,7 @@ void KisRgbF32ColorSpaceTester::testMixColors()
#define PIXELS_WIDTH 2
#define PIXELS_HEIGHT 2
-void KisRgbF32ColorSpaceTester::testToQImage()
+void KisRgbF32ColorSpaceTester::testToTQImage()
{
KisProfile *profile = new KisProfile(cmsCreate_sRGBProfile());
@@ -433,37 +433,37 @@ void KisRgbF32ColorSpaceTester::testToQImage()
{MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MAX_CHANNEL_VALUE}
};
- QImage image = cs->convertToQImage(reinterpret_cast<const Q_UINT8 *>(pixels), PIXELS_WIDTH, PIXELS_HEIGHT, 0, 0);
+ TQImage image = cs->convertToTQImage(reinterpret_cast<const TQ_UINT8 *>(pixels), PIXELS_WIDTH, PIXELS_HEIGHT, 0, 0);
- QRgb c = image.pixel(0, 0);
+ TQRgb c = image.pixel(0, 0);
// Exposure comes into play here.
/*
- CHECK(qRed(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE));
- CHECK(qGreen(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE));
- CHECK(qBlue(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE));
- CHECK(qAlpha(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 4));
+ CHECK(tqRed(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE));
+ CHECK(tqGreen(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE));
+ CHECK(tqBlue(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE));
+ CHECK(tqAlpha(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 4));
c = image.pixel(1, 0);
- CHECK(qRed(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 3));
- CHECK(qGreen(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 2));
- CHECK(qBlue(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 4));
- CHECK(qAlpha(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 2));
+ CHECK(tqRed(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 3));
+ CHECK(tqGreen(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 2));
+ CHECK(tqBlue(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 4));
+ CHECK(tqAlpha(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE / 2));
c = image.pixel(0, 1);
- CHECK(qRed(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE));
- CHECK(qGreen(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE));
- CHECK(qBlue(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE));
- CHECK(qAlpha(c), (int)FLOAT_TO_UINT8(MIN_CHANNEL_VALUE));
+ CHECK(tqRed(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE));
+ CHECK(tqGreen(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE));
+ CHECK(tqBlue(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE));
+ CHECK(tqAlpha(c), (int)FLOAT_TO_UINT8(MIN_CHANNEL_VALUE));
c = image.pixel(1, 1);
- CHECK(qRed(c), (int)FLOAT_TO_UINT8(MIN_CHANNEL_VALUE));
- CHECK(qGreen(c), (int)FLOAT_TO_UINT8(MIN_CHANNEL_VALUE));
- CHECK(qBlue(c), (int)FLOAT_TO_UINT8(MIN_CHANNEL_VALUE));
- CHECK(qAlpha(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE));
+ CHECK(tqRed(c), (int)FLOAT_TO_UINT8(MIN_CHANNEL_VALUE));
+ CHECK(tqGreen(c), (int)FLOAT_TO_UINT8(MIN_CHANNEL_VALUE));
+ CHECK(tqBlue(c), (int)FLOAT_TO_UINT8(MIN_CHANNEL_VALUE));
+ CHECK(tqAlpha(c), (int)FLOAT_TO_UINT8(MAX_CHANNEL_VALUE));
*/
}
@@ -497,22 +497,22 @@ void KisRgbF32ColorSpaceTester::testCompositeOps()
dstPixel = srcPixel;
- cs->compositeDivide(reinterpret_cast<Q_UINT8 *>(&dstPixel), 1, reinterpret_cast<const Q_UINT8 *>(&srcPixel),
+ cs->compositeDivide(reinterpret_cast<TQ_UINT8 *>(&dstPixel), 1, reinterpret_cast<const TQ_UINT8 *>(&srcPixel),
1, 0, 0, 1, 1, F32_OPACITY_OPAQUE);
/*
- CHECK(dstPixel.red, (Q_UINT16)UINT8_TO_UINT16(253));
- CHECK(dstPixel.green, (Q_UINT16)UINT8_TO_UINT16(254));
- CHECK(dstPixel.blue, (Q_UINT16)UINT8_TO_UINT16(254));
+ CHECK(dstPixel.red, (TQ_UINT16)UINT8_TO_UINT16(253));
+ CHECK(dstPixel.green, (TQ_UINT16)UINT8_TO_UINT16(254));
+ CHECK(dstPixel.blue, (TQ_UINT16)UINT8_TO_UINT16(254));
CHECK(dstPixel.alpha, KisRgbF32ColorSpace::F32_OPACITY_OPAQUE);
- Q_UINT16 srcColor = 43690;
- Q_UINT16 dstColor = 43690;
+ TQ_UINT16 srcColor = 43690;
+ TQ_UINT16 dstColor = 43690;
- srcColor = QMIN((dstColor * (65535u + 1u) + (srcColor / 2u)) / (1u + srcColor), 65535u);
+ srcColor = TQMIN((dstColor * (65535u + 1u) + (srcColor / 2u)) / (1u + srcColor), 65535u);
CHECK((int)srcColor, 65534);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, 65535u);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, 65535u);
CHECK((int)newColor, 65534);
*/
@@ -532,8 +532,8 @@ void KisRgbF32ColorSpaceTester::testCompositeOps()
{MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MAX_CHANNEL_VALUE}
};
- cs->compositeOver(reinterpret_cast<Q_UINT8 *>(dstPixels), DST_ROW_STRIDE, reinterpret_cast<const Q_UINT8 *>(srcPixels),
- SRC_ROW_STRIDE, mask, MASK_ROW_STRIDE, NUM_ROWS, NUM_COLUMNS, opacity);
+ cs->compositeOver(reinterpret_cast<TQ_UINT8 *>(dstPixels), DST_ROW_STRIDE, reinterpret_cast<const TQ_UINT8 *>(srcPixels),
+ SRC_ROW_STRIDE, tqmask, MASK_ROW_STRIDE, NUM_ROWS, NUM_COLUMNS, opacity);
*/
delete cs;
diff --git a/krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.h b/krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.h
index d6e47704..1153f147 100644
--- a/krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.h
+++ b/krita/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.h
@@ -26,11 +26,11 @@
#define CHECK_TOLERANCE( x, y, tolerance ) \
if ((x) <= (y) + (tolerance) && (x) >= (y) - (tolerance)) \
{ \
- success(QString(__FILE__) + "[" + QString::number(__LINE__) + "]: passed " + #x); \
+ success(TQString(__FILE__) + "[" + TQString::number(__LINE__) + "]: passed " + #x); \
} \
else \
{ \
- failure(QString(__FILE__) + "[" + QString::number(__LINE__) + QString("]: failed ") + #x + "\n Expected " + #y + ", Actual result " + QString::number(x)); \
+ failure(TQString(__FILE__) + "[" + TQString::number(__LINE__) + TQString("]: failed ") + #x + "\n Expected " + #y + ", Actual result " + TQString::number(x)); \
} \
class KisRgbF32ColorSpaceTester : public KUnitTest::Tester
@@ -39,7 +39,7 @@ public:
void allTests();
void testBasics();
void testMixColors();
- void testToQImage();
+ void testToTQImage();
void testCompositeOps();
};
diff --git a/krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.cc b/krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.cc
index 7ec94671..c61433d2 100644
--- a/krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.cc
+++ b/krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.cc
@@ -23,8 +23,8 @@
#include <stdlib.h>
#include LCMS_HEADER
-#include <qimage.h>
-#include <qcolor.h>
+#include <tqimage.h>
+#include <tqcolor.h>
#include <kdebug.h>
#include <klocale.h>
@@ -36,23 +36,23 @@
#include "kis_integer_maths.h"
namespace {
- const Q_INT32 MAX_CHANNEL_RGB = 3;
- const Q_INT32 MAX_CHANNEL_RGBA = 4;
+ const TQ_INT32 MAX_CHANNEL_RGB = 3;
+ const TQ_INT32 MAX_CHANNEL_RGBA = 4;
}
// XXX: already defined is superclass?
-//const Q_UINT16 KisRgbU16ColorSpace::U16_OPACITY_OPAQUE;
-//const Q_UINT16 KisRgbU16ColorSpace::U16_OPACITY_TRANSPARENT;
+//const TQ_UINT16 KisRgbU16ColorSpace::U16_OPACITY_OPAQUE;
+//const TQ_UINT16 KisRgbU16ColorSpace::U16_OPACITY_TRANSPARENT;
-KisRgbU16ColorSpace::KisRgbU16ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) :
- KisU16BaseColorSpace(KisID("RGBA16", i18n("RGB (16-bit integer/channel)")), TYPE_BGRA_16, icSigRgbData, parent, p)
+KisRgbU16ColorSpace::KisRgbU16ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) :
+ KisU16BaseColorSpace(KisID("RGBA16", i18n("RGB (16-bit integer/channel)")), TYPE_BGRA_16, icSigRgbData, tqparent, p)
{
- m_channels.push_back(new KisChannelInfo(i18n("Red"), i18n("R"), PIXEL_RED * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), QColor(255,0,0)));
- m_channels.push_back(new KisChannelInfo(i18n("Green"), i18n("G"), PIXEL_GREEN * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), QColor(0,255,0)));
- m_channels.push_back(new KisChannelInfo(i18n("Blue"), i18n("B"), PIXEL_BLUE * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16), QColor(0,0,255)));
- m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), PIXEL_ALPHA * sizeof(Q_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(Q_UINT16)));
+ m_channels.push_back(new KisChannelInfo(i18n("Red"), i18n("R"), PIXEL_RED * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQColor(255,0,0)));
+ m_channels.push_back(new KisChannelInfo(i18n("Green"), i18n("G"), PIXEL_GREEN * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQColor(0,255,0)));
+ m_channels.push_back(new KisChannelInfo(i18n("Blue"), i18n("B"), PIXEL_BLUE * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQColor(0,0,255)));
+ m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), PIXEL_ALPHA * sizeof(TQ_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(TQ_UINT16)));
- m_alphaPos = PIXEL_ALPHA * sizeof(Q_UINT16);
+ m_alphaPos = PIXEL_ALPHA * sizeof(TQ_UINT16);
init();
}
@@ -61,7 +61,7 @@ KisRgbU16ColorSpace::~KisRgbU16ColorSpace()
{
}
-void KisRgbU16ColorSpace::setPixel(Q_UINT8 *dst, Q_UINT16 red, Q_UINT16 green, Q_UINT16 blue, Q_UINT16 alpha) const
+void KisRgbU16ColorSpace::setPixel(TQ_UINT8 *dst, TQ_UINT16 red, TQ_UINT16 green, TQ_UINT16 blue, TQ_UINT16 alpha) const
{
Pixel *dstPixel = reinterpret_cast<Pixel *>(dst);
@@ -71,7 +71,7 @@ void KisRgbU16ColorSpace::setPixel(Q_UINT8 *dst, Q_UINT16 red, Q_UINT16 green, Q
dstPixel->alpha = alpha;
}
-void KisRgbU16ColorSpace::getPixel(const Q_UINT8 *src, Q_UINT16 *red, Q_UINT16 *green, Q_UINT16 *blue, Q_UINT16 *alpha) const
+void KisRgbU16ColorSpace::getPixel(const TQ_UINT8 *src, TQ_UINT16 *red, TQ_UINT16 *green, TQ_UINT16 *blue, TQ_UINT16 *alpha) const
{
const Pixel *srcPixel = reinterpret_cast<const Pixel *>(src);
@@ -81,16 +81,16 @@ void KisRgbU16ColorSpace::getPixel(const Q_UINT8 *src, Q_UINT16 *red, Q_UINT16 *
*alpha = srcPixel->alpha;
}
-void KisRgbU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const
+void KisRgbU16ColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const
{
- Q_UINT32 totalRed = 0, totalGreen = 0, totalBlue = 0, newAlpha = 0;
+ TQ_UINT32 totalRed = 0, totalGreen = 0, totalBlue = 0, newAlpha = 0;
while (nColors--)
{
const Pixel *pixel = reinterpret_cast<const Pixel *>(*colors);
- Q_UINT32 alpha = pixel->alpha;
- Q_UINT32 alphaTimesWeight = UINT16_MULT(alpha, UINT8_TO_UINT16(*weights));
+ TQ_UINT32 alpha = pixel->alpha;
+ TQ_UINT32 alphaTimesWeight = UINT16_MULT(alpha, UINT8_TO_UINT16(*weights));
totalRed += UINT16_MULT(pixel->red, alphaTimesWeight);
totalGreen += UINT16_MULT(pixel->green, alphaTimesWeight);
@@ -119,16 +119,16 @@ void KisRgbU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weigh
}
-void KisRgbU16ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst,
- Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const
+void KisRgbU16ColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst,
+ TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const
{
- Q_INT32 totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0;
+ TQ_INT32 totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0;
while (nColors--)
{
const Pixel * pixel = reinterpret_cast<const Pixel *>( *colors );
- Q_INT32 weight = *kernelValues;
+ TQ_INT32 weight = *kernelValues;
if (weight != 0) {
totalRed += pixel->red * weight;
@@ -143,80 +143,80 @@ void KisRgbU16ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues
Pixel * p = reinterpret_cast< Pixel *>( dst );
if (channelFlags & KisChannelInfo::FLAG_COLOR) {
- p->red = CLAMP( ( totalRed / factor) + offset, 0, Q_UINT16_MAX);
- p->green = CLAMP( ( totalGreen / factor) + offset, 0, Q_UINT16_MAX);
- p->blue = CLAMP( ( totalBlue / factor) + offset, 0, Q_UINT16_MAX);
+ p->red = CLAMP( ( totalRed / factor) + offset, 0, TQ_UINT16_MAX);
+ p->green = CLAMP( ( totalGreen / factor) + offset, 0, TQ_UINT16_MAX);
+ p->blue = CLAMP( ( totalBlue / factor) + offset, 0, TQ_UINT16_MAX);
}
if (channelFlags & KisChannelInfo::FLAG_ALPHA) {
- p->alpha = CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT16_MAX);
+ p->alpha = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT16_MAX);
}
}
-void KisRgbU16ColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels)
+void KisRgbU16ColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels)
{
- Q_UINT32 psize = pixelSize();
+ TQ_UINT32 psize = pixelSize();
while (nPixels--)
{
Pixel * p = reinterpret_cast< Pixel *>( src );
- p->red = Q_UINT16_MAX - p->red;
- p->green = Q_UINT16_MAX - p->green;
- p->blue = Q_UINT16_MAX - p->blue;
+ p->red = TQ_UINT16_MAX - p->red;
+ p->green = TQ_UINT16_MAX - p->green;
+ p->blue = TQ_UINT16_MAX - p->blue;
src += psize;
}
}
-Q_UINT8 KisRgbU16ColorSpace::intensity8(const Q_UINT8 * src) const
+TQ_UINT8 KisRgbU16ColorSpace::intensity8(const TQ_UINT8 * src) const
{
const Pixel * p = reinterpret_cast<const Pixel *>( src );
- return UINT16_TO_UINT8(static_cast<Q_UINT16>((p->red * 0.30 + p->green * 0.59 + p->blue * 0.11) + 0.5));
+ return UINT16_TO_UINT8(static_cast<TQ_UINT16>((p->red * 0.30 + p->green * 0.59 + p->blue * 0.11) + 0.5));
}
-QValueVector<KisChannelInfo *> KisRgbU16ColorSpace::channels() const
+TQValueVector<KisChannelInfo *> KisRgbU16ColorSpace::channels() const
{
return m_channels;
}
-Q_UINT32 KisRgbU16ColorSpace::nChannels() const
+TQ_UINT32 KisRgbU16ColorSpace::nChannels() const
{
return MAX_CHANNEL_RGBA;
}
-Q_UINT32 KisRgbU16ColorSpace::nColorChannels() const
+TQ_UINT32 KisRgbU16ColorSpace::nColorChannels() const
{
return MAX_CHANNEL_RGB;
}
-Q_UINT32 KisRgbU16ColorSpace::pixelSize() const
+TQ_UINT32 KisRgbU16ColorSpace::pixelSize() const
{
- return MAX_CHANNEL_RGBA * sizeof(Q_UINT16);
+ return MAX_CHANNEL_RGBA * sizeof(TQ_UINT16);
}
-void KisRgbU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisRgbU16ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
while (rows > 0) {
- const Q_UINT16 *src = reinterpret_cast<const Q_UINT16 *>(srcRowStart);
- Q_UINT16 *dst = reinterpret_cast<Q_UINT16 *>(dstRowStart);
- const Q_UINT8 *mask = maskRowStart;
- Q_INT32 columns = numColumns;
+ const TQ_UINT16 *src = reinterpret_cast<const TQ_UINT16 *>(srcRowStart);
+ TQ_UINT16 *dst = reinterpret_cast<TQ_UINT16 *>(dstRowStart);
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
+ TQ_INT32 columns = numColumns;
while (columns > 0) {
- Q_UINT16 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT16 srcAlpha = src[PIXEL_ALPHA];
- // apply the alphamask
- if (mask != 0) {
- Q_UINT8 U8_mask = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ TQ_UINT8 U8_tqmask = *tqmask;
- if (U8_mask != OPACITY_OPAQUE) {
- srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask));
+ if (U8_tqmask != OPACITY_OPAQUE) {
+ srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask));
}
- mask++;
+ tqmask++;
}
if (srcAlpha != U16_OPACITY_TRANSPARENT) {
@@ -226,16 +226,16 @@ void KisRgbU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
}
if (srcAlpha == U16_OPACITY_OPAQUE) {
- memcpy(dst, src, MAX_CHANNEL_RGBA * sizeof(Q_UINT16));
+ memcpy(dst, src, MAX_CHANNEL_RGBA * sizeof(TQ_UINT16));
} else {
- Q_UINT16 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT16 dstAlpha = dst[PIXEL_ALPHA];
- Q_UINT16 srcBlend;
+ TQ_UINT16 srcBlend;
if (dstAlpha == U16_OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -246,7 +246,7 @@ void KisRgbU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
}
if (srcBlend == U16_OPACITY_OPAQUE) {
- memcpy(dst, src, MAX_CHANNEL_RGB * sizeof(Q_UINT16));
+ memcpy(dst, src, MAX_CHANNEL_RGB * sizeof(TQ_UINT16));
} else {
dst[PIXEL_RED] = UINT16_BLEND(src[PIXEL_RED], dst[PIXEL_RED], srcBlend);
dst[PIXEL_GREEN] = UINT16_BLEND(src[PIXEL_GREEN], dst[PIXEL_GREEN], srcBlend);
@@ -263,8 +263,8 @@ void KisRgbU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart) {
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart) {
+ tqmaskRowStart += tqmaskRowStride;
}
}
}
@@ -272,25 +272,25 @@ void KisRgbU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
#define COMMON_COMPOSITE_OP_PROLOG() \
while (rows > 0) { \
\
- const Q_UINT16 *src = reinterpret_cast<const Q_UINT16 *>(srcRowStart); \
- Q_UINT16 *dst = reinterpret_cast<Q_UINT16 *>(dstRowStart); \
- Q_INT32 columns = numColumns; \
- const Q_UINT8 *mask = maskRowStart; \
+ const TQ_UINT16 *src = reinterpret_cast<const TQ_UINT16 *>(srcRowStart); \
+ TQ_UINT16 *dst = reinterpret_cast<TQ_UINT16 *>(dstRowStart); \
+ TQ_INT32 columns = numColumns; \
+ const TQ_UINT8 *tqmask = tqmaskRowStart; \
\
while (columns > 0) { \
\
- Q_UINT16 srcAlpha = src[PIXEL_ALPHA]; \
- Q_UINT16 dstAlpha = dst[PIXEL_ALPHA]; \
+ TQ_UINT16 srcAlpha = src[PIXEL_ALPHA]; \
+ TQ_UINT16 dstAlpha = dst[PIXEL_ALPHA]; \
\
- srcAlpha = QMIN(srcAlpha, dstAlpha); \
+ srcAlpha = TQMIN(srcAlpha, dstAlpha); \
\
- if (mask != 0) { \
- Q_UINT8 U8_mask = *mask; \
+ if (tqmask != 0) { \
+ TQ_UINT8 U8_tqmask = *tqmask; \
\
- if (U8_mask != OPACITY_OPAQUE) { \
- srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask)); \
+ if (U8_tqmask != OPACITY_OPAQUE) { \
+ srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask)); \
} \
- mask++; \
+ tqmask++; \
} \
\
if (srcAlpha != U16_OPACITY_TRANSPARENT) { \
@@ -299,12 +299,12 @@ void KisRgbU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
srcAlpha = UINT16_MULT(srcAlpha, opacity); \
} \
\
- Q_UINT16 srcBlend; \
+ TQ_UINT16 srcBlend; \
\
if (dstAlpha == U16_OPACITY_OPAQUE) { \
srcBlend = srcAlpha; \
} else { \
- Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); \
+ TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha); \
dst[PIXEL_ALPHA] = newAlpha; \
\
if (newAlpha != 0) { \
@@ -325,20 +325,20 @@ void KisRgbU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
rows--; \
srcRowStart += srcRowStride; \
dstRowStart += dstRowStride; \
- if(maskRowStart) { \
- maskRowStart += maskRowStride; \
+ if(tqmaskRowStart) { \
+ tqmaskRowStart += tqmaskRowStride; \
} \
}
-void KisRgbU16ColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisRgbU16ColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
srcColor = UINT16_MULT(srcColor, dstColor);
@@ -350,19 +350,19 @@ void KisRgbU16ColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRow
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbU16ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisRgbU16ColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
- srcColor = QMIN((dstColor * (UINT16_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT16_MAX);
+ srcColor = TQMIN((dstColor * (UINT16_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT16_MAX);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -371,19 +371,19 @@ void KisRgbU16ColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbU16ColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisRgbU16ColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
srcColor = UINT16_MAX - UINT16_MULT(UINT16_MAX - dstColor, UINT16_MAX - srcColor);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -392,19 +392,19 @@ void KisRgbU16ColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbU16ColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisRgbU16ColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
srcColor = UINT16_MULT(dstColor, dstColor + 2u * UINT16_MULT(srcColor, UINT16_MAX - dstColor));
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -413,19 +413,19 @@ void KisRgbU16ColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbU16ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisRgbU16ColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
- srcColor = QMIN((dstColor * (UINT16_MAX + 1u)) / (UINT16_MAX + 1u - srcColor), UINT16_MAX);
+ srcColor = TQMIN((dstColor * (UINT16_MAX + 1u)) / (UINT16_MAX + 1u - srcColor), UINT16_MAX);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -434,20 +434,20 @@ void KisRgbU16ColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbU16ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisRgbU16ColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
srcColor = kMin(((UINT16_MAX - dstColor) * (UINT16_MAX + 1u)) / (srcColor + 1u), UINT16_MAX);
srcColor = kClamp(UINT16_MAX - srcColor, 0u, UINT16_MAX);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -456,19 +456,19 @@ void KisRgbU16ColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbU16ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisRgbU16ColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
- srcColor = QMIN(srcColor, dstColor);
+ srcColor = TQMIN(srcColor, dstColor);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -477,19 +477,19 @@ void KisRgbU16ColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbU16ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisRgbU16ColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
{
for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) {
- Q_UINT16 srcColor = src[channel];
- Q_UINT16 dstColor = dst[channel];
+ TQ_UINT16 srcColor = src[channel];
+ TQ_UINT16 dstColor = dst[channel];
- srcColor = QMAX(srcColor, dstColor);
+ srcColor = TQMAX(srcColor, dstColor);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -498,7 +498,7 @@ void KisRgbU16ColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbU16ColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisRgbU16ColorSpace::compositeHue(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -507,9 +507,9 @@ void KisRgbU16ColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
float FSrcGreen = static_cast<float>(src[PIXEL_GREEN]) / UINT16_MAX;
float FSrcBlue = static_cast<float>(src[PIXEL_BLUE]) / UINT16_MAX;
- Q_UINT16 dstRed = dst[PIXEL_RED];
- Q_UINT16 dstGreen = dst[PIXEL_GREEN];
- Q_UINT16 dstBlue = dst[PIXEL_BLUE];
+ TQ_UINT16 dstRed = dst[PIXEL_RED];
+ TQ_UINT16 dstGreen = dst[PIXEL_GREEN];
+ TQ_UINT16 dstBlue = dst[PIXEL_BLUE];
float FDstRed = static_cast<float>(dstRed) / UINT16_MAX;
float FDstGreen = static_cast<float>(dstGreen) / UINT16_MAX;
@@ -528,9 +528,9 @@ void KisRgbU16ColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
HSVToRGB(srcHue, dstSaturation, dstValue, &FSrcRed, &FSrcGreen, &FSrcBlue);
- Q_UINT16 srcRed = static_cast<Q_UINT16>(FSrcRed * UINT16_MAX + 0.5);
- Q_UINT16 srcGreen = static_cast<Q_UINT16>(FSrcGreen * UINT16_MAX + 0.5);
- Q_UINT16 srcBlue = static_cast<Q_UINT16>(FSrcBlue * UINT16_MAX + 0.5);
+ TQ_UINT16 srcRed = static_cast<TQ_UINT16>(FSrcRed * UINT16_MAX + 0.5);
+ TQ_UINT16 srcGreen = static_cast<TQ_UINT16>(FSrcGreen * UINT16_MAX + 0.5);
+ TQ_UINT16 srcBlue = static_cast<TQ_UINT16>(FSrcBlue * UINT16_MAX + 0.5);
dst[PIXEL_RED] = UINT16_BLEND(srcRed, dstRed, srcBlend);
dst[PIXEL_GREEN] = UINT16_BLEND(srcGreen, dstGreen, srcBlend);
@@ -540,7 +540,7 @@ void KisRgbU16ColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbU16ColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisRgbU16ColorSpace::compositeSaturation(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -549,9 +549,9 @@ void KisRgbU16ColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstR
float FSrcGreen = static_cast<float>(src[PIXEL_GREEN]) / UINT16_MAX;
float FSrcBlue = static_cast<float>(src[PIXEL_BLUE]) / UINT16_MAX;
- Q_UINT16 dstRed = dst[PIXEL_RED];
- Q_UINT16 dstGreen = dst[PIXEL_GREEN];
- Q_UINT16 dstBlue = dst[PIXEL_BLUE];
+ TQ_UINT16 dstRed = dst[PIXEL_RED];
+ TQ_UINT16 dstGreen = dst[PIXEL_GREEN];
+ TQ_UINT16 dstBlue = dst[PIXEL_BLUE];
float FDstRed = static_cast<float>(dstRed) / UINT16_MAX;
float FDstGreen = static_cast<float>(dstGreen) / UINT16_MAX;
@@ -570,9 +570,9 @@ void KisRgbU16ColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstR
HSVToRGB(dstHue, srcSaturation, dstValue, &FSrcRed, &FSrcGreen, &FSrcBlue);
- Q_UINT16 srcRed = static_cast<Q_UINT16>(FSrcRed * UINT16_MAX + 0.5);
- Q_UINT16 srcGreen = static_cast<Q_UINT16>(FSrcGreen * UINT16_MAX + 0.5);
- Q_UINT16 srcBlue = static_cast<Q_UINT16>(FSrcBlue * UINT16_MAX + 0.5);
+ TQ_UINT16 srcRed = static_cast<TQ_UINT16>(FSrcRed * UINT16_MAX + 0.5);
+ TQ_UINT16 srcGreen = static_cast<TQ_UINT16>(FSrcGreen * UINT16_MAX + 0.5);
+ TQ_UINT16 srcBlue = static_cast<TQ_UINT16>(FSrcBlue * UINT16_MAX + 0.5);
dst[PIXEL_RED] = UINT16_BLEND(srcRed, dstRed, srcBlend);
dst[PIXEL_GREEN] = UINT16_BLEND(srcGreen, dstGreen, srcBlend);
@@ -582,7 +582,7 @@ void KisRgbU16ColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstR
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbU16ColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisRgbU16ColorSpace::compositeValue(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -591,9 +591,9 @@ void KisRgbU16ColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
float FSrcGreen = static_cast<float>(src[PIXEL_GREEN]) / UINT16_MAX;
float FSrcBlue = static_cast<float>(src[PIXEL_BLUE]) / UINT16_MAX;
- Q_UINT16 dstRed = dst[PIXEL_RED];
- Q_UINT16 dstGreen = dst[PIXEL_GREEN];
- Q_UINT16 dstBlue = dst[PIXEL_BLUE];
+ TQ_UINT16 dstRed = dst[PIXEL_RED];
+ TQ_UINT16 dstGreen = dst[PIXEL_GREEN];
+ TQ_UINT16 dstBlue = dst[PIXEL_BLUE];
float FDstRed = static_cast<float>(dstRed) / UINT16_MAX;
float FDstGreen = static_cast<float>(dstGreen) / UINT16_MAX;
@@ -612,9 +612,9 @@ void KisRgbU16ColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
HSVToRGB(dstHue, dstSaturation, srcValue, &FSrcRed, &FSrcGreen, &FSrcBlue);
- Q_UINT16 srcRed = static_cast<Q_UINT16>(FSrcRed * UINT16_MAX + 0.5);
- Q_UINT16 srcGreen = static_cast<Q_UINT16>(FSrcGreen * UINT16_MAX + 0.5);
- Q_UINT16 srcBlue = static_cast<Q_UINT16>(FSrcBlue * UINT16_MAX + 0.5);
+ TQ_UINT16 srcRed = static_cast<TQ_UINT16>(FSrcRed * UINT16_MAX + 0.5);
+ TQ_UINT16 srcGreen = static_cast<TQ_UINT16>(FSrcGreen * UINT16_MAX + 0.5);
+ TQ_UINT16 srcBlue = static_cast<TQ_UINT16>(FSrcBlue * UINT16_MAX + 0.5);
dst[PIXEL_RED] = UINT16_BLEND(srcRed, dstRed, srcBlend);
dst[PIXEL_GREEN] = UINT16_BLEND(srcGreen, dstGreen, srcBlend);
@@ -624,7 +624,7 @@ void KisRgbU16ColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbU16ColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT16 opacity)
+void KisRgbU16ColorSpace::compositeColor(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT16 opacity)
{
COMMON_COMPOSITE_OP_PROLOG();
@@ -633,9 +633,9 @@ void KisRgbU16ColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
float FSrcGreen = static_cast<float>(src[PIXEL_GREEN]) / UINT16_MAX;
float FSrcBlue = static_cast<float>(src[PIXEL_BLUE]) / UINT16_MAX;
- Q_UINT16 dstRed = dst[PIXEL_RED];
- Q_UINT16 dstGreen = dst[PIXEL_GREEN];
- Q_UINT16 dstBlue = dst[PIXEL_BLUE];
+ TQ_UINT16 dstRed = dst[PIXEL_RED];
+ TQ_UINT16 dstGreen = dst[PIXEL_GREEN];
+ TQ_UINT16 dstBlue = dst[PIXEL_BLUE];
float FDstRed = static_cast<float>(dstRed) / UINT16_MAX;
float FDstGreen = static_cast<float>(dstGreen) / UINT16_MAX;
@@ -654,9 +654,9 @@ void KisRgbU16ColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
HSLToRGB(srcHue, srcSaturation, dstLightness, &FSrcRed, &FSrcGreen, &FSrcBlue);
- Q_UINT16 srcRed = static_cast<Q_UINT16>(FSrcRed * UINT16_MAX + 0.5);
- Q_UINT16 srcGreen = static_cast<Q_UINT16>(FSrcGreen * UINT16_MAX + 0.5);
- Q_UINT16 srcBlue = static_cast<Q_UINT16>(FSrcBlue * UINT16_MAX + 0.5);
+ TQ_UINT16 srcRed = static_cast<TQ_UINT16>(FSrcRed * UINT16_MAX + 0.5);
+ TQ_UINT16 srcGreen = static_cast<TQ_UINT16>(FSrcGreen * UINT16_MAX + 0.5);
+ TQ_UINT16 srcBlue = static_cast<TQ_UINT16>(FSrcBlue * UINT16_MAX + 0.5);
dst[PIXEL_RED] = UINT16_BLEND(srcRed, dstRed, srcBlend);
dst[PIXEL_GREEN] = UINT16_BLEND(srcGreen, dstGreen, srcBlend);
@@ -666,34 +666,34 @@ void KisRgbU16ColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
COMMON_COMPOSITE_OP_EPILOG();
}
-void KisRgbU16ColorSpace::compositeErase(Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT16 /*opacity*/)
+void KisRgbU16ColorSpace::compositeErase(TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT16 /*opacity*/)
{
while (rows-- > 0)
{
const Pixel *s = reinterpret_cast<const Pixel *>(src);
Pixel *d = reinterpret_cast<Pixel *>(dst);
- const Q_UINT8 *mask = srcAlphaMask;
+ const TQ_UINT8 *tqmask = srcAlphaMask;
- for (Q_INT32 i = cols; i > 0; i--, s++, d++)
+ for (TQ_INT32 i = cols; i > 0; i--, s++, d++)
{
- Q_UINT16 srcAlpha = s->alpha;
+ TQ_UINT16 srcAlpha = s->alpha;
- // apply the alphamask
- if (mask != 0) {
- Q_UINT8 U8_mask = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ TQ_UINT8 U8_tqmask = *tqmask;
- if (U8_mask != OPACITY_OPAQUE) {
- srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_mask));
+ if (U8_tqmask != OPACITY_OPAQUE) {
+ srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_tqmask));
}
- mask++;
+ tqmask++;
}
d->alpha = UINT16_MULT(srcAlpha, d->alpha);
}
@@ -701,30 +701,30 @@ void KisRgbU16ColorSpace::compositeErase(Q_UINT8 *dst,
dst += dstRowSize;
src += srcRowSize;
if(srcAlphaMask) {
- srcAlphaMask += maskRowStride;
+ srcAlphaMask += tqmaskRowStride;
}
}
}
-void KisRgbU16ColorSpace::bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *mask,
- Q_INT32 maskRowStride,
- Q_UINT8 U8_opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+void KisRgbU16ColorSpace::bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *tqmask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 U8_opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op)
{
- Q_UINT16 opacity = UINT8_TO_UINT16(U8_opacity);
+ TQ_UINT16 opacity = UINT8_TO_UINT16(U8_opacity);
switch (op.op()) {
case COMPOSITE_UNDEF:
// Undefined == no composition
break;
case COMPOSITE_OVER:
- compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_IN:
//compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -753,16 +753,16 @@ void KisRgbU16ColorSpace::bitBlt(Q_UINT8 *dst,
//compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_MULT:
- compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DIVIDE:
- compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BUMPMAP:
//compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_COPY:
- compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, U8_opacity);
+ compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, U8_opacity);
break;
case COMPOSITE_COPY_RED:
//compositeCopyRed(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -797,22 +797,22 @@ void KisRgbU16ColorSpace::bitBlt(Q_UINT8 *dst,
// No composition.
break;
case COMPOSITE_DARKEN:
- compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_LIGHTEN:
- compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_HUE:
- compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_SATURATION:
- compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_VALUE:
- compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLOR:
- compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLORIZE:
//compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -821,24 +821,24 @@ void KisRgbU16ColorSpace::bitBlt(Q_UINT8 *dst,
//compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_SCREEN:
- compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_OVERLAY:
- compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
- compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DODGE:
- compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BURN:
- compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ALPHA_DARKEN:
- abstractCompositeAlphaDarken<Q_UINT16, U16Mult, Uint8ToU16, U16OpacityTest,
+ abstractCompositeAlphaDarken<TQ_UINT16, U16Mult, Uint8ToU16, U16OpacityTest,
PIXEL_ALPHA, MAX_CHANNEL_RGB, MAX_CHANNEL_RGBA>(
- dst, dstRowStride, src, srcRowStride, mask, maskRowStride,
+ dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride,
rows, cols, opacity, U16Mult(), Uint8ToU16(), U16OpacityTest());
break;
default:
diff --git a/krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.h b/krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.h
index 73a79eb3..abb9b42b 100644
--- a/krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.h
+++ b/krita/colorspaces/rgb_u16/kis_rgb_u16_colorspace.h
@@ -32,13 +32,13 @@ class KRITATOOL_EXPORT KisRgbU16ColorSpace : public KisU16BaseColorSpace {
public:
struct Pixel {
- Q_UINT16 blue;
- Q_UINT16 green;
- Q_UINT16 red;
- Q_UINT16 alpha;
+ TQ_UINT16 blue;
+ TQ_UINT16 green;
+ TQ_UINT16 red;
+ TQ_UINT16 alpha;
};
public:
- KisRgbU16ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p);
+ KisRgbU16ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p);
virtual ~KisRgbU16ColorSpace();
virtual bool willDegrade(ColorSpaceIndependence independence)
@@ -52,56 +52,56 @@ public:
public:
- void setPixel(Q_UINT8 *pixel, Q_UINT16 red, Q_UINT16 green, Q_UINT16 blue, Q_UINT16 alpha) const;
- void getPixel(const Q_UINT8 *pixel, Q_UINT16 *red, Q_UINT16 *green, Q_UINT16 *blue, Q_UINT16 *alpha) const;
+ void setPixel(TQ_UINT8 *pixel, TQ_UINT16 red, TQ_UINT16 green, TQ_UINT16 blue, TQ_UINT16 alpha) const;
+ void getPixel(const TQ_UINT8 *pixel, TQ_UINT16 *red, TQ_UINT16 *green, TQ_UINT16 *blue, TQ_UINT16 *alpha) const;
- virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
- virtual void convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const;
- virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels);
- virtual Q_UINT8 intensity8(const Q_UINT8 * src) const;
+ virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const;
+ virtual void convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const;
+ virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels);
+ virtual TQ_UINT8 intensity8(const TQ_UINT8 * src) const;
- virtual QValueVector<KisChannelInfo *> channels() const;
- virtual Q_UINT32 nChannels() const;
- virtual Q_UINT32 nColorChannels() const;
- virtual Q_UINT32 pixelSize() const;
+ virtual TQValueVector<KisChannelInfo *> channels() const;
+ virtual TQ_UINT32 nChannels() const;
+ virtual TQ_UINT32 nColorChannels() const;
+ virtual TQ_UINT32 pixelSize() const;
virtual KisCompositeOpList userVisiblecompositeOps() const;
protected:
- virtual void bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+ virtual void bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op);
- void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeHue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeSaturation(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeValue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeColor(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
- void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT16 opacity);
+ void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeHue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeSaturation(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeValue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeColor(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
+ void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
private:
friend class KisRgbU16ColorSpaceTester;
- static const Q_UINT8 PIXEL_BLUE = 0;
- static const Q_UINT8 PIXEL_GREEN = 1;
- static const Q_UINT8 PIXEL_RED = 2;
- static const Q_UINT8 PIXEL_ALPHA = 3;
+ static const TQ_UINT8 PIXEL_BLUE = 0;
+ static const TQ_UINT8 PIXEL_GREEN = 1;
+ static const TQ_UINT8 PIXEL_RED = 2;
+ static const TQ_UINT8 PIXEL_ALPHA = 3;
};
class KisRgbU16ColorSpaceFactory : public KisColorSpaceFactory
@@ -116,13 +116,13 @@ public:
/**
* lcms colorspace type definition.
*/
- virtual Q_UINT32 colorSpaceType() { return TYPE_BGRA_16; };
+ virtual TQ_UINT32 colorSpaceType() { return TYPE_BGRA_16; };
virtual icColorSpaceSignature colorSpaceSignature() { return icSigRgbData; };
- virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisRgbU16ColorSpace(parent, p); };
+ virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisRgbU16ColorSpace(tqparent, p); };
- virtual QString defaultProfile() { return "sRGB built-in - (lcms internal)"; };
+ virtual TQString defaultProfile() { return "sRGB built-in - (lcms internal)"; };
};
#endif // KIS_STRATEGY_COLORSPACE_RGB_U16_H_
diff --git a/krita/colorspaces/rgb_u16/rgb_u16_plugin.cc b/krita/colorspaces/rgb_u16/rgb_u16_plugin.cc
index 0f88b158..d05e59f9 100644
--- a/krita/colorspaces/rgb_u16/rgb_u16_plugin.cc
+++ b/krita/colorspaces/rgb_u16/rgb_u16_plugin.cc
@@ -34,14 +34,14 @@ typedef KGenericFactory<RGBU16Plugin> RGBU16PluginFactory;
K_EXPORT_COMPONENT_FACTORY( krita_rgb_u16_plugin, RGBU16PluginFactory( "krita" ) )
-RGBU16Plugin::RGBU16Plugin(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+RGBU16Plugin::RGBU16Plugin(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(RGBU16PluginFactory::instance());
- if ( parent->inherits("KisColorSpaceFactoryRegistry") )
+ if ( tqparent->inherits("KisColorSpaceFactoryRegistry") )
{
- KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry *>( parent );
+ KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry *>( tqparent );
KisColorSpace * colorSpaceRGBU16 = new KisRgbU16ColorSpace(f, 0);
KisColorSpaceFactory * csFactory = new KisRgbU16ColorSpaceFactory();
diff --git a/krita/colorspaces/rgb_u16/rgb_u16_plugin.h b/krita/colorspaces/rgb_u16/rgb_u16_plugin.h
index 643833ce..d5cf4d14 100644
--- a/krita/colorspaces/rgb_u16/rgb_u16_plugin.h
+++ b/krita/colorspaces/rgb_u16/rgb_u16_plugin.h
@@ -27,8 +27,9 @@
class RGBU16Plugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- RGBU16Plugin(QObject *parent, const char *name, const QStringList &);
+ RGBU16Plugin(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~RGBU16Plugin();
};
diff --git a/krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.cc b/krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.cc
index b41d46bc..7861b8e1 100644
--- a/krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.cc
+++ b/krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.cc
@@ -53,7 +53,7 @@ void KisRgbU16ColorSpaceTester::allTests()
KisFactory *factory = new KisFactory();
testBasics();
- testToQImage();
+ testToTQImage();
testCompositeOps();
testMixColors();
@@ -72,7 +72,7 @@ void KisRgbU16ColorSpaceTester::testBasics()
CHECK(cs->nColorChannels(), NUM_COLOUR_CHANNELS);
CHECK(cs->pixelSize(), NUM_CHANNELS * CHANNEL_SIZE);
- QValueVector<KisChannelInfo *> channels = cs->channels();
+ TQValueVector<KisChannelInfo *> channels = cs->channels();
// Red
CHECK(channels[0]->pos(), PIXEL_RED * CHANNEL_SIZE);
@@ -105,41 +105,41 @@ void KisRgbU16ColorSpaceTester::testBasics()
CHECK((int)defaultPixel.blue, 0);
CHECK((int)defaultPixel.alpha, 0);
- Q_UINT16 pixel[NUM_CHANNELS];
+ TQ_UINT16 pixel[NUM_CHANNELS];
- cs->fromQColor(qRgb(255, 255, 255), reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(255, 255, 255), reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK((uint)pixel[PIXEL_RED], MAX_CHANNEL_VALUE);
CHECK((uint)pixel[PIXEL_GREEN], MAX_CHANNEL_VALUE);
CHECK((uint)pixel[PIXEL_BLUE], MAX_CHANNEL_VALUE);
- cs->fromQColor(qRgb(0, 0, 0), reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(0, 0, 0), reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK((uint)pixel[PIXEL_RED], MIN_CHANNEL_VALUE);
CHECK((uint)pixel[PIXEL_GREEN], MIN_CHANNEL_VALUE);
CHECK((uint)pixel[PIXEL_BLUE], MIN_CHANNEL_VALUE);
- cs->fromQColor(qRgb(128, 64, 192), reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(128, 64, 192), reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK((uint)pixel[PIXEL_RED], (uint)UINT8_TO_UINT16(128));
CHECK((uint)pixel[PIXEL_GREEN], (uint)UINT8_TO_UINT16(64));
CHECK((uint)pixel[PIXEL_BLUE], (uint)UINT8_TO_UINT16(192));
- cs->fromQColor(qRgb(255, 255, 255), OPACITY_OPAQUE, reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_OPAQUE, reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK((uint)pixel[PIXEL_RED], MAX_CHANNEL_VALUE);
CHECK((uint)pixel[PIXEL_GREEN], MAX_CHANNEL_VALUE);
CHECK((uint)pixel[PIXEL_BLUE], MAX_CHANNEL_VALUE);
CHECK((uint)pixel[PIXEL_ALPHA], MAX_CHANNEL_VALUE);
- cs->fromQColor(qRgb(255, 255, 255), OPACITY_TRANSPARENT, reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_TRANSPARENT, reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK((uint)pixel[PIXEL_RED], MAX_CHANNEL_VALUE);
CHECK((uint)pixel[PIXEL_GREEN], MAX_CHANNEL_VALUE);
CHECK((uint)pixel[PIXEL_BLUE], MAX_CHANNEL_VALUE);
CHECK((uint)pixel[PIXEL_ALPHA], MIN_CHANNEL_VALUE);
- cs->fromQColor(qRgb(255, 255, 255), OPACITY_OPAQUE / 2, reinterpret_cast<Q_UINT8 *>(pixel));
+ cs->fromTQColor(tqRgb(255, 255, 255), OPACITY_OPAQUE / 2, reinterpret_cast<TQ_UINT8 *>(pixel));
CHECK((uint)pixel[PIXEL_RED], MAX_CHANNEL_VALUE);
CHECK((uint)pixel[PIXEL_GREEN], MAX_CHANNEL_VALUE);
@@ -150,9 +150,9 @@ void KisRgbU16ColorSpaceTester::testBasics()
pixel[PIXEL_GREEN] = MAX_CHANNEL_VALUE;
pixel[PIXEL_BLUE] = MAX_CHANNEL_VALUE;
- QColor c;
+ TQColor c;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c);
CHECK(c.red(), 255);
CHECK(c.green(), 255);
@@ -162,7 +162,7 @@ void KisRgbU16ColorSpaceTester::testBasics()
pixel[PIXEL_GREEN] = MIN_CHANNEL_VALUE;
pixel[PIXEL_BLUE] = MIN_CHANNEL_VALUE;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c);
CHECK(c.red(), 0);
CHECK(c.green(), 0);
@@ -172,7 +172,7 @@ void KisRgbU16ColorSpaceTester::testBasics()
pixel[PIXEL_GREEN] = MAX_CHANNEL_VALUE / 2;
pixel[PIXEL_BLUE] = (3 * MAX_CHANNEL_VALUE) / 4;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c);
CHECK(c.red(), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 4));
CHECK(c.green(), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 2));
@@ -183,9 +183,9 @@ void KisRgbU16ColorSpaceTester::testBasics()
pixel[PIXEL_BLUE] = MAX_CHANNEL_VALUE;
pixel[PIXEL_ALPHA] = MAX_CHANNEL_VALUE;
- Q_UINT8 opacity;
+ TQ_UINT8 opacity;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c, &opacity);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c, &opacity);
CHECK(c.red(), 255);
CHECK(c.green(), 255);
@@ -194,7 +194,7 @@ void KisRgbU16ColorSpaceTester::testBasics()
pixel[PIXEL_ALPHA] = MAX_CHANNEL_VALUE;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c, &opacity);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c, &opacity);
CHECK(c.red(), 255);
CHECK(c.green(), 255);
@@ -206,7 +206,7 @@ void KisRgbU16ColorSpaceTester::testBasics()
pixel[PIXEL_BLUE] = MIN_CHANNEL_VALUE;
pixel[PIXEL_ALPHA] = MIN_CHANNEL_VALUE;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c, &opacity);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c, &opacity);
CHECK(c.red(), 0);
CHECK(c.green(), 0);
@@ -218,7 +218,7 @@ void KisRgbU16ColorSpaceTester::testBasics()
pixel[PIXEL_BLUE] = (3 * MAX_CHANNEL_VALUE) / 4;
pixel[PIXEL_ALPHA] = MAX_CHANNEL_VALUE / 2;
- cs->toQColor(reinterpret_cast<const Q_UINT8 *>(pixel), &c, &opacity);
+ cs->toTQColor(reinterpret_cast<const TQ_UINT8 *>(pixel), &c, &opacity);
CHECK(c.red(), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 4));
CHECK(c.green(), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 2));
@@ -234,7 +234,7 @@ void KisRgbU16ColorSpaceTester::testBasics()
{MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MAX_CHANNEL_VALUE}
};
- cs->setAlpha(reinterpret_cast<Q_UINT8 *>(pixels), OPACITY_OPAQUE / 2, NUM_PIXELS);
+ cs->setAlpha(reinterpret_cast<TQ_UINT8 *>(pixels), OPACITY_OPAQUE / 2, NUM_PIXELS);
CHECK((uint)pixels[0].red, MAX_CHANNEL_VALUE);
CHECK((uint)pixels[0].green, MAX_CHANNEL_VALUE);
@@ -261,42 +261,42 @@ void KisRgbU16ColorSpaceTester::testBasics()
pixel[PIXEL_BLUE] = MAX_CHANNEL_VALUE / 4;
pixel[PIXEL_ALPHA] = MIN_CHANNEL_VALUE;
- QString valueText = cs->channelValueText(reinterpret_cast<Q_UINT8 *>(pixel), RED_CHANNEL);
- CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE));
+ TQString valueText = cs->channelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), RED_CHANNEL);
+ CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE));
- valueText = cs->channelValueText(reinterpret_cast<Q_UINT8 *>(pixel), GREEN_CHANNEL);
- CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE / 2));
+ valueText = cs->channelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), GREEN_CHANNEL);
+ CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE / 2));
- valueText = cs->channelValueText(reinterpret_cast<Q_UINT8 *>(pixel), BLUE_CHANNEL);
- CHECK(valueText, QString().setNum(MAX_CHANNEL_VALUE / 4));
+ valueText = cs->channelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), BLUE_CHANNEL);
+ CHECK(valueText, TQString().setNum(MAX_CHANNEL_VALUE / 4));
- valueText = cs->channelValueText(reinterpret_cast<Q_UINT8 *>(pixel), ALPHA_CHANNEL);
- CHECK(valueText, QString().setNum(MIN_CHANNEL_VALUE));
+ valueText = cs->channelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), ALPHA_CHANNEL);
+ CHECK(valueText, TQString().setNum(MIN_CHANNEL_VALUE));
- valueText = cs->normalisedChannelValueText(reinterpret_cast<Q_UINT8 *>(pixel), RED_CHANNEL);
- CHECK(valueText, QString().setNum(static_cast<float>(MAX_CHANNEL_VALUE) / MAX_CHANNEL_VALUE));
+ valueText = cs->normalisedChannelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), RED_CHANNEL);
+ CHECK(valueText, TQString().setNum(static_cast<float>(MAX_CHANNEL_VALUE) / MAX_CHANNEL_VALUE));
- valueText = cs->normalisedChannelValueText(reinterpret_cast<Q_UINT8 *>(pixel), GREEN_CHANNEL);
- CHECK(valueText, QString().setNum(static_cast<float>(MAX_CHANNEL_VALUE / 2) / MAX_CHANNEL_VALUE));
+ valueText = cs->normalisedChannelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), GREEN_CHANNEL);
+ CHECK(valueText, TQString().setNum(static_cast<float>(MAX_CHANNEL_VALUE / 2) / MAX_CHANNEL_VALUE));
- valueText = cs->normalisedChannelValueText(reinterpret_cast<Q_UINT8 *>(pixel), BLUE_CHANNEL);
- CHECK(valueText, QString().setNum(static_cast<float>(MAX_CHANNEL_VALUE / 4) / MAX_CHANNEL_VALUE));
+ valueText = cs->normalisedChannelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), BLUE_CHANNEL);
+ CHECK(valueText, TQString().setNum(static_cast<float>(MAX_CHANNEL_VALUE / 4) / MAX_CHANNEL_VALUE));
- valueText = cs->normalisedChannelValueText(reinterpret_cast<Q_UINT8 *>(pixel), ALPHA_CHANNEL);
- CHECK(valueText, QString().setNum(static_cast<float>(MIN_CHANNEL_VALUE) / MAX_CHANNEL_VALUE));
+ valueText = cs->normalisedChannelValueText(reinterpret_cast<TQ_UINT8 *>(pixel), ALPHA_CHANNEL);
+ CHECK(valueText, TQString().setNum(static_cast<float>(MIN_CHANNEL_VALUE) / MAX_CHANNEL_VALUE));
- cs->setPixel(reinterpret_cast<Q_UINT8 *>(pixel), 128, 192, 64, 99);
+ cs->setPixel(reinterpret_cast<TQ_UINT8 *>(pixel), 128, 192, 64, 99);
CHECK((uint)pixel[PIXEL_RED], 128u);
CHECK((uint)pixel[PIXEL_GREEN], 192u);
CHECK((uint)pixel[PIXEL_BLUE], 64u);
CHECK((uint)pixel[PIXEL_ALPHA], 99u);
- Q_UINT16 red;
- Q_UINT16 green;
- Q_UINT16 blue;
- Q_UINT16 alpha;
+ TQ_UINT16 red;
+ TQ_UINT16 green;
+ TQ_UINT16 blue;
+ TQ_UINT16 alpha;
- cs->getPixel(reinterpret_cast<const Q_UINT8 *>(pixel), &red, &green, &blue, &alpha);
+ cs->getPixel(reinterpret_cast<const TQ_UINT8 *>(pixel), &red, &green, &blue, &alpha);
CHECK((uint)red, 128u);
CHECK((uint)green, 192u);
CHECK((uint)blue, 64u);
@@ -310,9 +310,9 @@ void KisRgbU16ColorSpaceTester::testMixColors()
KisAbstractColorSpace * cs = new KisRgbU16ColorSpace(defProfile);
// Test mixColors.
- Q_UINT16 pixel1[NUM_CHANNELS];
- Q_UINT16 pixel2[NUM_CHANNELS];
- Q_UINT16 outputPixel[NUM_CHANNELS];
+ TQ_UINT16 pixel1[NUM_CHANNELS];
+ TQ_UINT16 pixel2[NUM_CHANNELS];
+ TQ_UINT16 outputPixel[NUM_CHANNELS];
outputPixel[PIXEL_RED] = 0;
outputPixel[PIXEL_GREEN] = 0;
@@ -329,16 +329,16 @@ void KisRgbU16ColorSpaceTester::testMixColors()
pixel2[PIXEL_BLUE] = 0;
pixel2[PIXEL_ALPHA] = 0;
- const Q_UINT8 *pixelPtrs[2];
- Q_UINT8 weights[2];
+ const TQ_UINT8 *pixelPtrs[2];
+ TQ_UINT8 weights[2];
- pixelPtrs[0] = reinterpret_cast<const Q_UINT8 *>(pixel1);
- pixelPtrs[1] = reinterpret_cast<const Q_UINT8 *>(pixel2);
+ pixelPtrs[0] = reinterpret_cast<const TQ_UINT8 *>(pixel1);
+ pixelPtrs[1] = reinterpret_cast<const TQ_UINT8 *>(pixel2);
weights[0] = 255;
weights[1] = 0;
- cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<Q_UINT8 *>(outputPixel));
+ cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<TQ_UINT8 *>(outputPixel));
CHECK((uint)outputPixel[PIXEL_RED], UINT16_MAX);
CHECK((uint)outputPixel[PIXEL_GREEN], UINT16_MAX);
@@ -348,7 +348,7 @@ void KisRgbU16ColorSpaceTester::testMixColors()
weights[0] = 0;
weights[1] = 255;
- cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<Q_UINT8 *>(outputPixel));
+ cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<TQ_UINT8 *>(outputPixel));
CHECK((int)outputPixel[PIXEL_RED], 0);
CHECK((int)outputPixel[PIXEL_GREEN], 0);
@@ -358,7 +358,7 @@ void KisRgbU16ColorSpaceTester::testMixColors()
weights[0] = 128;
weights[1] = 127;
- cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<Q_UINT8 *>(outputPixel));
+ cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<TQ_UINT8 *>(outputPixel));
CHECK((uint)outputPixel[PIXEL_RED], UINT16_MAX);
CHECK((uint)outputPixel[PIXEL_GREEN], UINT16_MAX);
@@ -375,7 +375,7 @@ void KisRgbU16ColorSpaceTester::testMixColors()
pixel2[PIXEL_BLUE] = 2000;
pixel2[PIXEL_ALPHA] = UINT16_MAX;
- cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<Q_UINT8 *>(outputPixel));
+ cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<TQ_UINT8 *>(outputPixel));
CHECK_TOLERANCE((uint)outputPixel[PIXEL_RED], (128u * 20000u + 127u * 10000u) / 255u, 5u);
CHECK_TOLERANCE((uint)outputPixel[PIXEL_GREEN], (128u * 10000u + 127u * 20000u) / 255u, 5u);
@@ -395,7 +395,7 @@ void KisRgbU16ColorSpaceTester::testMixColors()
weights[0] = 89;
weights[1] = 166;
- cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<Q_UINT8 *>(outputPixel));
+ cs->mixColors(pixelPtrs, weights, 2, reinterpret_cast<TQ_UINT8 *>(outputPixel));
CHECK((uint)outputPixel[PIXEL_RED], UINT16_MAX);
CHECK((uint)outputPixel[PIXEL_GREEN], UINT16_MAX);
@@ -406,7 +406,7 @@ void KisRgbU16ColorSpaceTester::testMixColors()
#define PIXELS_WIDTH 2
#define PIXELS_HEIGHT 2
-void KisRgbU16ColorSpaceTester::testToQImage()
+void KisRgbU16ColorSpaceTester::testToTQImage()
{
KisProfile *defProfile = new KisProfile(cmsCreate_sRGBProfile());
@@ -419,35 +419,35 @@ void KisRgbU16ColorSpaceTester::testToQImage()
{MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MAX_CHANNEL_VALUE}
};
- QImage image = cs->convertToQImage(reinterpret_cast<const Q_UINT8 *>(pixels), PIXELS_WIDTH, PIXELS_HEIGHT, 0, 0);
+ TQImage image = cs->convertToTQImage(reinterpret_cast<const TQ_UINT8 *>(pixels), PIXELS_WIDTH, PIXELS_HEIGHT, 0, 0);
- QRgb c = image.pixel(0, 0);
+ TQRgb c = image.pixel(0, 0);
- CHECK(qRed(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE));
- CHECK(qGreen(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE));
- CHECK(qBlue(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE));
- CHECK(qAlpha(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 4));
+ CHECK(tqRed(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE));
+ CHECK(tqGreen(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE));
+ CHECK(tqBlue(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE));
+ CHECK(tqAlpha(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 4));
c = image.pixel(1, 0);
- CHECK(qRed(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 3));
- CHECK(qGreen(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 2));
- CHECK_TOLERANCE(qBlue(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 4), 1u);
- CHECK(qAlpha(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 2));
+ CHECK(tqRed(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 3));
+ CHECK(tqGreen(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 2));
+ CHECK_TOLERANCE(tqBlue(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 4), 1u);
+ CHECK(tqAlpha(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE / 2));
c = image.pixel(0, 1);
- CHECK(qRed(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE));
- CHECK(qGreen(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE));
- CHECK(qBlue(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE));
- CHECK(qAlpha(c), (int)UINT16_TO_UINT8(MIN_CHANNEL_VALUE));
+ CHECK(tqRed(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE));
+ CHECK(tqGreen(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE));
+ CHECK(tqBlue(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE));
+ CHECK(tqAlpha(c), (int)UINT16_TO_UINT8(MIN_CHANNEL_VALUE));
c = image.pixel(1, 1);
- CHECK(qRed(c), (int)UINT16_TO_UINT8(MIN_CHANNEL_VALUE));
- CHECK(qGreen(c), (int)UINT16_TO_UINT8(MIN_CHANNEL_VALUE));
- CHECK(qBlue(c), (int)UINT16_TO_UINT8(MIN_CHANNEL_VALUE));
- CHECK(qAlpha(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE));
+ CHECK(tqRed(c), (int)UINT16_TO_UINT8(MIN_CHANNEL_VALUE));
+ CHECK(tqGreen(c), (int)UINT16_TO_UINT8(MIN_CHANNEL_VALUE));
+ CHECK(tqBlue(c), (int)UINT16_TO_UINT8(MIN_CHANNEL_VALUE));
+ CHECK(tqAlpha(c), (int)UINT16_TO_UINT8(MAX_CHANNEL_VALUE));
}
#define NUM_ROWS 2
@@ -480,22 +480,22 @@ void KisRgbU16ColorSpaceTester::testCompositeOps()
dstPixel = srcPixel;
- cs->compositeDivide(reinterpret_cast<Q_UINT8 *>(&dstPixel), 1, reinterpret_cast<const Q_UINT8 *>(&srcPixel),
+ cs->compositeDivide(reinterpret_cast<TQ_UINT8 *>(&dstPixel), 1, reinterpret_cast<const TQ_UINT8 *>(&srcPixel),
1, 0, 0, 1, 1, KisRgbU16ColorSpace::U16_OPACITY_OPAQUE);
/*
- CHECK(dstPixel.red, (Q_UINT16)UINT8_TO_UINT16(253));
- CHECK(dstPixel.green, (Q_UINT16)UINT8_TO_UINT16(254));
- CHECK(dstPixel.blue, (Q_UINT16)UINT8_TO_UINT16(254));
+ CHECK(dstPixel.red, (TQ_UINT16)UINT8_TO_UINT16(253));
+ CHECK(dstPixel.green, (TQ_UINT16)UINT8_TO_UINT16(254));
+ CHECK(dstPixel.blue, (TQ_UINT16)UINT8_TO_UINT16(254));
CHECK(dstPixel.alpha, KisRgbU16ColorSpace::U16_OPACITY_OPAQUE);
- Q_UINT16 srcColor = 43690;
- Q_UINT16 dstColor = 43690;
+ TQ_UINT16 srcColor = 43690;
+ TQ_UINT16 dstColor = 43690;
- srcColor = QMIN((dstColor * (65535u + 1u) + (srcColor / 2u)) / (1u + srcColor), 65535u);
+ srcColor = TQMIN((dstColor * (65535u + 1u) + (srcColor / 2u)) / (1u + srcColor), 65535u);
CHECK((int)srcColor, 65534);
- Q_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, 65535u);
+ TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, 65535u);
CHECK((int)newColor, 65534);
*/
@@ -515,8 +515,8 @@ void KisRgbU16ColorSpaceTester::testCompositeOps()
{MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MIN_CHANNEL_VALUE, MAX_CHANNEL_VALUE}
};
- cs->compositeOver(reinterpret_cast<Q_UINT8 *>(dstPixels), DST_ROW_STRIDE, reinterpret_cast<const Q_UINT8 *>(srcPixels),
- SRC_ROW_STRIDE, mask, MASK_ROW_STRIDE, NUM_ROWS, NUM_COLUMNS, opacity);
+ cs->compositeOver(reinterpret_cast<TQ_UINT8 *>(dstPixels), DST_ROW_STRIDE, reinterpret_cast<const TQ_UINT8 *>(srcPixels),
+ SRC_ROW_STRIDE, tqmask, MASK_ROW_STRIDE, NUM_ROWS, NUM_COLUMNS, opacity);
*/
delete cs;
diff --git a/krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.h b/krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.h
index e80a7a43..848cf1ac 100644
--- a/krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.h
+++ b/krita/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.h
@@ -25,11 +25,11 @@
#define CHECK_TOLERANCE( x, y, tolerance ) \
if ((x) <= (y) + (tolerance) && (x) >= (y) - (tolerance)) \
{ \
- success(QString(__FILE__) + "[" + QString::number(__LINE__) + "]: passed " + #x); \
+ success(TQString(__FILE__) + "[" + TQString::number(__LINE__) + "]: passed " + #x); \
} \
else \
{ \
- failure(QString(__FILE__) + "[" + QString::number(__LINE__) + QString("]: failed ") + #x + "\n Expected " + #y + ", Actual result " + QString::number(x)); \
+ failure(TQString(__FILE__) + "[" + TQString::number(__LINE__) + TQString("]: failed ") + #x + "\n Expected " + #y + ", Actual result " + TQString::number(x)); \
} \
class KisRgbU16ColorSpaceTester : public KUnitTest::Tester
@@ -38,7 +38,7 @@ public:
void allTests();
void testBasics();
void testMixColors();
- void testToQImage();
+ void testToTQImage();
void testCompositeOps();
};
diff --git a/krita/colorspaces/rgb_u8/composite.h b/krita/colorspaces/rgb_u8/composite.h
index 961130ba..d55487b6 100644
--- a/krita/colorspaces/rgb_u8/composite.h
+++ b/krita/colorspaces/rgb_u8/composite.h
@@ -81,36 +81,36 @@
(double)117.0 * (pixel[PIXEL_BLUE)) \
/ 1024.0))
-#define PixelIntensityToQuantum(pixel) ((Q_UINT8)PixelIntensity(pixel))
+#define PixelIntensityToQuantum(pixel) ((TQ_UINT8)PixelIntensity(pixel))
#define PixelIntensityToDouble(pixel) ((double)PixelIntensity(pixel))
-#define RoundSignedToQuantum(value) ((Q_UINT8) (value < 0 ? 0 : \
- (value > Q_UINT8_MAX) ? Q_UINT8_MAX : value + 0.5))
+#define RoundSignedToQuantum(value) ((TQ_UINT8) (value < 0 ? 0 : \
+ (value > TQ_UINT8_MAX) ? TQ_UINT8_MAX : value + 0.5))
-#define RoundToQuantum(value) ((Q_UINT8) (value > Q_UINT8_MAX ? Q_UINT8_MAX : \
+#define RoundToQuantum(value) ((TQ_UINT8) (value > TQ_UINT8_MAX ? TQ_UINT8_MAX : \
value + 0.5))
// And from studio.h
#define AbsoluteValue(x) ((x) < 0 ? -(x) : (x))
-void compositeIn(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeIn(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
if (opacity == OPACITY_TRANSPARENT)
return;
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
- Q_INT32 i;
+ TQ_INT32 i;
double sAlpha, dAlpha;
double alpha;
@@ -122,7 +122,7 @@ void compositeIn(Q_INT32 pixelSize,
if (s[PIXEL_ALPHA] == OPACITY_TRANSPARENT)
{
- memcpy(d, s, pixelSize * sizeof(Q_UINT8));
+ memcpy(d, s, pixelSize * sizeof(TQ_UINT8));
continue;
}
if (d[PIXEL_ALPHA] == OPACITY_TRANSPARENT)
@@ -132,13 +132,13 @@ void compositeIn(Q_INT32 pixelSize,
dAlpha = UINT8_MAX - d[PIXEL_ALPHA];
alpha=(double) (((double) UINT8_MAX - sAlpha) * (UINT8_MAX - dAlpha) / UINT8_MAX);
- d[PIXEL_RED]=(Q_UINT8) (((double) UINT8_MAX - sAlpha) *
+ d[PIXEL_RED]=(TQ_UINT8) (((double) UINT8_MAX - sAlpha) *
(UINT8_MAX-dAlpha) * s[PIXEL_RED] / UINT8_MAX / alpha + 0.5);
- d[PIXEL_GREEN]=(Q_UINT8) (((double) UINT8_MAX - sAlpha)*
+ d[PIXEL_GREEN]=(TQ_UINT8) (((double) UINT8_MAX - sAlpha)*
(UINT8_MAX-dAlpha) * s[PIXEL_GREEN] / UINT8_MAX / alpha + 0.5);
- d[PIXEL_BLUE]=(Q_UINT8) (((double) UINT8_MAX - sAlpha)*
+ d[PIXEL_BLUE]=(TQ_UINT8) (((double) UINT8_MAX - sAlpha)*
(UINT8_MAX - dAlpha) * s[PIXEL_BLUE] / UINT8_MAX / alpha + 0.5);
- d[PIXEL_ALPHA]=(Q_UINT8) ((d[PIXEL_ALPHA] * (UINT8_MAX - alpha) / UINT8_MAX) + 0.5);
+ d[PIXEL_ALPHA]=(TQ_UINT8) ((d[PIXEL_ALPHA] * (UINT8_MAX - alpha) / UINT8_MAX) + 0.5);
}
dst += dstRowSize;
@@ -147,22 +147,22 @@ void compositeIn(Q_INT32 pixelSize,
}
-void compositeOut(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeOut(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
if (opacity == OPACITY_TRANSPARENT)
return;
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
- Q_INT32 i;
+ TQ_INT32 i;
double sAlpha, dAlpha;
double alpha;
@@ -173,7 +173,7 @@ void compositeOut(Q_INT32 pixelSize,
for (i = cols; i > 0; i--, d += pixelSize, s += pixelSize) {
if (s[PIXEL_ALPHA] == OPACITY_TRANSPARENT)
{
- memcpy(d, s, pixelSize * sizeof(Q_UINT8));
+ memcpy(d, s, pixelSize * sizeof(TQ_UINT8));
break;
}
if (d[PIXEL_ALPHA] == OPACITY_OPAQUE)
@@ -185,10 +185,10 @@ void compositeOut(Q_INT32 pixelSize,
dAlpha = UINT8_MAX - d[PIXEL_ALPHA];
alpha=(double) (UINT8_MAX - sAlpha) * d[PIXEL_ALPHA]/UINT8_MAX;
- d[PIXEL_RED] = (Q_UINT8) (((double) UINT8_MAX - sAlpha) * dAlpha * s[PIXEL_RED] / UINT8_MAX / alpha + 0.5);
- d[PIXEL_GREEN] = (Q_UINT8) (((double) UINT8_MAX - sAlpha) * dAlpha * s[PIXEL_GREEN] / UINT8_MAX / alpha + 0.5);
- d[PIXEL_BLUE] = (Q_UINT8) (((double) UINT8_MAX - sAlpha) * dAlpha * s[PIXEL_BLUE] / UINT8_MAX / alpha + 0.5);
- d[PIXEL_ALPHA]=(Q_UINT8) ((d[PIXEL_ALPHA] * (UINT8_MAX - alpha) / UINT8_MAX) + 0.5);
+ d[PIXEL_RED] = (TQ_UINT8) (((double) UINT8_MAX - sAlpha) * dAlpha * s[PIXEL_RED] / UINT8_MAX / alpha + 0.5);
+ d[PIXEL_GREEN] = (TQ_UINT8) (((double) UINT8_MAX - sAlpha) * dAlpha * s[PIXEL_GREEN] / UINT8_MAX / alpha + 0.5);
+ d[PIXEL_BLUE] = (TQ_UINT8) (((double) UINT8_MAX - sAlpha) * dAlpha * s[PIXEL_BLUE] / UINT8_MAX / alpha + 0.5);
+ d[PIXEL_ALPHA]=(TQ_UINT8) ((d[PIXEL_ALPHA] * (UINT8_MAX - alpha) / UINT8_MAX) + 0.5);
}
dst += dstRowSize;
src += srcRowSize;
@@ -196,23 +196,23 @@ void compositeOut(Q_INT32 pixelSize,
}
-void compositeAtop(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeAtop(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
if (opacity == OPACITY_TRANSPARENT)
return;
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
- Q_INT32 i;
+ TQ_INT32 i;
double sAlpha, dAlpha;
double alpha, red, green, blue;
@@ -230,16 +230,16 @@ void compositeAtop(Q_INT32 pixelSize,
red = ((double)(UINT8_MAX - sAlpha) * (UINT8_MAX - dAlpha) * s[PIXEL_RED] / UINT8_MAX +
(double) sAlpha * (UINT8_MAX-dAlpha) * d[PIXEL_RED]/UINT8_MAX) / alpha;
- d[PIXEL_RED] = (Q_UINT8) (red > UINT8_MAX ? UINT8_MAX : red + 0.5);
+ d[PIXEL_RED] = (TQ_UINT8) (red > UINT8_MAX ? UINT8_MAX : red + 0.5);
green = ((double) (UINT8_MAX - sAlpha) * (UINT8_MAX - dAlpha) * s[PIXEL_GREEN] / UINT8_MAX +
(double) sAlpha * (UINT8_MAX-dAlpha) * d[PIXEL_GREEN]/UINT8_MAX)/alpha;
- d[PIXEL_GREEN] = (Q_UINT8) (green > UINT8_MAX ? UINT8_MAX : green + 0.5);
+ d[PIXEL_GREEN] = (TQ_UINT8) (green > UINT8_MAX ? UINT8_MAX : green + 0.5);
blue = ((double) (UINT8_MAX - sAlpha) * (UINT8_MAX- dAlpha) * s[PIXEL_BLUE] / UINT8_MAX +
(double) sAlpha * (UINT8_MAX - dAlpha) * d[PIXEL_BLUE]/UINT8_MAX) / alpha;
- d[PIXEL_BLUE] = (Q_UINT8) (blue > UINT8_MAX ? UINT8_MAX : blue + 0.5);
- d[PIXEL_ALPHA]=(Q_UINT8) (UINT8_MAX - (alpha > UINT8_MAX ? UINT8_MAX : alpha) + 0.5);
+ d[PIXEL_BLUE] = (TQ_UINT8) (blue > UINT8_MAX ? UINT8_MAX : blue + 0.5);
+ d[PIXEL_ALPHA]=(TQ_UINT8) (UINT8_MAX - (alpha > UINT8_MAX ? UINT8_MAX : alpha) + 0.5);
}
dst += dstRowSize;
src += srcRowSize;
@@ -247,22 +247,22 @@ void compositeAtop(Q_INT32 pixelSize,
}
-void compositeXor(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeXor(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
if (opacity == OPACITY_TRANSPARENT)
return;
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
- Q_INT32 i;
+ TQ_INT32 i;
double sAlpha, dAlpha;
double alpha, red, green, blue;
@@ -298,22 +298,22 @@ void compositeXor(Q_INT32 pixelSize,
}
-void compositePlus(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositePlus(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
if (opacity == OPACITY_TRANSPARENT)
return;
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
- Q_INT32 i;
+ TQ_INT32 i;
double sAlpha, dAlpha;
double alpha, red, green, blue;
@@ -345,22 +345,22 @@ void compositePlus(Q_INT32 pixelSize,
-void compositeMinus(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeMinus(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
if (opacity == OPACITY_TRANSPARENT)
return;
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
- Q_INT32 i;
+ TQ_INT32 i;
double sAlpha, dAlpha;
double alpha, red, green, blue;
@@ -392,22 +392,22 @@ void compositeMinus(Q_INT32 pixelSize,
}
-void compositeAdd(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeAdd(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
if (opacity == OPACITY_TRANSPARENT)
return;
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
- Q_INT32 i;
+ TQ_INT32 i;
double sAlpha, dAlpha;
double red, green, blue;
@@ -420,13 +420,13 @@ void compositeAdd(Q_INT32 pixelSize,
dAlpha = UINT8_MAX - d[PIXEL_ALPHA];
red=(double) s[PIXEL_RED]+d[PIXEL_RED];
- d[PIXEL_RED]=(Q_UINT8)
+ d[PIXEL_RED]=(TQ_UINT8)
(red > UINT8_MAX ? red-=UINT8_MAX : red+0.5);
green=(double) s[PIXEL_GREEN]+d[PIXEL_GREEN];
- d[PIXEL_GREEN]=(Q_UINT8)
+ d[PIXEL_GREEN]=(TQ_UINT8)
(green > UINT8_MAX ? green-=UINT8_MAX : green+0.5);
blue=(double) s[PIXEL_BLUE]+d[PIXEL_BLUE];
- d[PIXEL_BLUE]=(Q_UINT8)
+ d[PIXEL_BLUE]=(TQ_UINT8)
(blue > UINT8_MAX ? blue-=UINT8_MAX : blue+0.5);
d[PIXEL_ALPHA]=OPACITY_OPAQUE;
}
@@ -436,22 +436,22 @@ void compositeAdd(Q_INT32 pixelSize,
}
-void compositeSubtract(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeSubtract(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
if (opacity == OPACITY_TRANSPARENT)
return;
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
- Q_INT32 i;
+ TQ_INT32 i;
double red, green, blue;
@@ -461,13 +461,13 @@ void compositeSubtract(Q_INT32 pixelSize,
for (i = cols; i > 0; i--, d += pixelSize, s += pixelSize) {
red=(double) s[PIXEL_RED]-d[PIXEL_RED];
- d[PIXEL_RED]=(Q_UINT8)
+ d[PIXEL_RED]=(TQ_UINT8)
(red < 0 ? red+=UINT8_MAX : red+0.5);
green=(double) s[PIXEL_GREEN]-d[PIXEL_GREEN];
- d[PIXEL_GREEN]=(Q_UINT8)
+ d[PIXEL_GREEN]=(TQ_UINT8)
(green < 0 ? green+=UINT8_MAX : green+0.5);
blue=(double) s[PIXEL_BLUE]-d[PIXEL_BLUE];
- d[PIXEL_BLUE]=(Q_UINT8)
+ d[PIXEL_BLUE]=(TQ_UINT8)
(blue < 0 ? blue+=UINT8_MAX : blue+0.5);
d[PIXEL_ALPHA]=OPACITY_OPAQUE;
@@ -478,22 +478,22 @@ void compositeSubtract(Q_INT32 pixelSize,
}
-void compositeDiff(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeDiff(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
if (opacity == OPACITY_TRANSPARENT)
return;
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
- Q_INT32 i;
+ TQ_INT32 i;
double sAlpha, dAlpha;
@@ -504,13 +504,13 @@ void compositeDiff(Q_INT32 pixelSize,
sAlpha = UINT8_MAX - s[PIXEL_ALPHA];
dAlpha = UINT8_MAX - d[PIXEL_ALPHA];
- d[PIXEL_RED]=(Q_UINT8)
+ d[PIXEL_RED]=(TQ_UINT8)
AbsoluteValue(s[PIXEL_RED]-(double) d[PIXEL_RED]);
- d[PIXEL_GREEN]=(Q_UINT8)
+ d[PIXEL_GREEN]=(TQ_UINT8)
AbsoluteValue(s[PIXEL_GREEN]-(double) d[PIXEL_GREEN]);
- d[PIXEL_BLUE]=(Q_UINT8)
+ d[PIXEL_BLUE]=(TQ_UINT8)
AbsoluteValue(s[PIXEL_BLUE]-(double) d[PIXEL_BLUE]);
- d[PIXEL_ALPHA]=UINT8_MAX - (Q_UINT8)
+ d[PIXEL_ALPHA]=UINT8_MAX - (TQ_UINT8)
AbsoluteValue(sAlpha-(double) dAlpha);
}
@@ -520,22 +520,22 @@ void compositeDiff(Q_INT32 pixelSize,
}
-void compositeBumpmap(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeBumpmap(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
if (opacity == OPACITY_TRANSPARENT)
return;
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
- Q_INT32 i;
+ TQ_INT32 i;
double intensity;
@@ -552,13 +552,13 @@ void compositeBumpmap(Q_INT32 pixelSize,
(double)601.0 * s[PIXEL_GREEN] +
(double)117.0 * s[PIXEL_BLUE]) / 1024.0;
- d[PIXEL_RED]=(Q_UINT8) (((double)
+ d[PIXEL_RED]=(TQ_UINT8) (((double)
intensity * d[PIXEL_RED])/UINT8_MAX +0.5);
- d[PIXEL_GREEN]=(Q_UINT8) (((double)
+ d[PIXEL_GREEN]=(TQ_UINT8) (((double)
intensity * d[PIXEL_GREEN])/UINT8_MAX +0.5);
- d[PIXEL_BLUE]=(Q_UINT8) (((double)
+ d[PIXEL_BLUE]=(TQ_UINT8) (((double)
intensity * d[PIXEL_BLUE])/UINT8_MAX +0.5);
- d[PIXEL_ALPHA]= (Q_UINT8) (((double)
+ d[PIXEL_ALPHA]= (TQ_UINT8) (((double)
intensity * d[PIXEL_ALPHA])/UINT8_MAX +0.5);
@@ -569,20 +569,20 @@ void compositeBumpmap(Q_INT32 pixelSize,
}
-void compositeCopy(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 /*opacity*/ = OPACITY_OPAQUE)
+void compositeCopy(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 /*opacity*/ = OPACITY_OPAQUE)
{
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
d = dst;
s = src;
- Q_UINT32 len = cols * pixelSize;
+ TQ_UINT32 len = cols * pixelSize;
while (rows-- > 0) {
memcpy(d, s, len);
@@ -591,19 +591,19 @@ void compositeCopy(Q_INT32 pixelSize,
}
}
-void compositeCopyChannel(Q_UINT8 pixel,
- Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 /*opacity*/ = OPACITY_OPAQUE)
+void compositeCopyChannel(TQ_UINT8 pixel,
+ TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 /*opacity*/ = OPACITY_OPAQUE)
{
- Q_UINT8 *d;
- const Q_UINT8 *s;
- Q_INT32 i;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
+ TQ_INT32 i;
while (rows-- > 0) {
d = dst;
@@ -619,51 +619,51 @@ void compositeCopyChannel(Q_UINT8 pixel,
}
-void compositeCopyRed(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeCopyRed(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
compositeCopyChannel(PIXEL_RED, pixelSize, dst, dstRowSize, src, srcRowSize, rows, cols, opacity);
}
-void compositeCopyGreen(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeCopyGreen(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
compositeCopyChannel(PIXEL_GREEN, pixelSize, dst, dstRowSize, src, srcRowSize, rows, cols, opacity);
}
-void compositeCopyBlue(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeCopyBlue(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
compositeCopyChannel(PIXEL_BLUE, pixelSize, dst, dstRowSize, src, srcRowSize, rows, cols, opacity);
}
-void compositeCopyOpacity(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeCopyOpacity(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
// XXX: mess with intensity if there isn't an alpha channel, according to GM.
@@ -672,19 +672,19 @@ void compositeCopyOpacity(Q_INT32 pixelSize,
}
-void compositeClear(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 /*srcRowSize*/,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 /*opacity*/ = OPACITY_OPAQUE)
+void compositeClear(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 /*srcRowSize*/,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 /*opacity*/ = OPACITY_OPAQUE)
{
- Q_INT32 linesize = pixelSize * sizeof(Q_UINT8) * cols;
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_INT32 linesize = pixelSize * sizeof(TQ_UINT8) * cols;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
d = dst;
s = src;
@@ -697,22 +697,22 @@ void compositeClear(Q_INT32 pixelSize,
}
-void compositeDissolve(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeDissolve(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
if (opacity == OPACITY_TRANSPARENT)
return;
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
- Q_INT32 i;
+ TQ_INT32 i;
double sAlpha, dAlpha;
@@ -726,11 +726,11 @@ void compositeDissolve(Q_INT32 pixelSize,
sAlpha = UINT8_MAX - s[PIXEL_ALPHA];
dAlpha = UINT8_MAX - d[PIXEL_ALPHA];
- d[PIXEL_RED]=(Q_UINT8) (((double) sAlpha*s[PIXEL_RED]+
+ d[PIXEL_RED]=(TQ_UINT8) (((double) sAlpha*s[PIXEL_RED]+
(UINT8_MAX -sAlpha)*d[PIXEL_RED])/UINT8_MAX +0.5);
- d[PIXEL_GREEN]= (Q_UINT8) (((double) sAlpha*s[PIXEL_GREEN]+
+ d[PIXEL_GREEN]= (TQ_UINT8) (((double) sAlpha*s[PIXEL_GREEN]+
(UINT8_MAX -sAlpha)*d[PIXEL_GREEN])/UINT8_MAX +0.5);
- d[PIXEL_BLUE] = (Q_UINT8) (((double) sAlpha*s[PIXEL_BLUE]+
+ d[PIXEL_BLUE] = (TQ_UINT8) (((double) sAlpha*s[PIXEL_BLUE]+
(UINT8_MAX -sAlpha)*d[PIXEL_BLUE])/UINT8_MAX +0.5);
d[PIXEL_ALPHA] = OPACITY_OPAQUE;
}
@@ -741,18 +741,18 @@ void compositeDissolve(Q_INT32 pixelSize,
}
-void compositeDisplace(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 /*opacity*/ = OPACITY_OPAQUE)
+void compositeDisplace(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 /*opacity*/ = OPACITY_OPAQUE)
{
- Q_INT32 linesize = pixelSize * sizeof(Q_UINT8) * cols;
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_INT32 linesize = pixelSize * sizeof(TQ_UINT8) * cols;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
d = dst;
s = src;
@@ -765,22 +765,22 @@ void compositeDisplace(Q_INT32 pixelSize,
}
#if 0
-void compositeModulate(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeModulate(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
if (opacity == OPACITY_TRANSPARENT)
return;
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
- Q_INT32 i;
+ TQ_INT32 i;
double sAlpha, dAlpha;
long offset;
@@ -820,46 +820,46 @@ void compositeModulate(Q_INT32 pixelSize,
}
-void compositeThreshold(Q_INT32 pixelSize,
- Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 opacity = OPACITY_OPAQUE)
+void compositeThreshold(TQ_INT32 pixelSize,
+ TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 opacity = OPACITY_OPAQUE)
{
- Q_INT32 linesize = pixelSize * sizeof(Q_UINT8) * cols;
- Q_UINT8 *d;
- const Q_UINT8 *s;
- Q_UINT8 alpha;
- Q_UINT8 invAlpha;
- Q_INT32 i;
+ TQ_INT32 linesize = pixelSize * sizeof(TQ_UINT8) * cols;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
+ TQ_UINT8 alpha;
+ TQ_UINT8 invAlpha;
+ TQ_INT32 i;
}
#endif
-void compositeColorize(Q_INT32,
- Q_UINT8 *,
- Q_INT32 ,
- const Q_UINT8 *,
- Q_INT32 ,
- Q_INT32 ,
- Q_INT32 ,
- Q_UINT8 )
+void compositeColorize(TQ_INT32,
+ TQ_UINT8 *,
+ TQ_INT32 ,
+ const TQ_UINT8 *,
+ TQ_INT32 ,
+ TQ_INT32 ,
+ TQ_INT32 ,
+ TQ_UINT8 )
{
}
-void compositeLuminize(Q_INT32 ,
- Q_UINT8 *,
- Q_INT32 ,
- const Q_UINT8 *,
- Q_INT32 ,
- Q_INT32 ,
- Q_INT32 ,
- Q_UINT8 )
+void compositeLuminize(TQ_INT32 ,
+ TQ_UINT8 *,
+ TQ_INT32 ,
+ const TQ_UINT8 *,
+ TQ_INT32 ,
+ TQ_INT32 ,
+ TQ_INT32 ,
+ TQ_UINT8 )
{
}
diff --git a/krita/colorspaces/rgb_u8/kis_rgb_colorspace.cc b/krita/colorspaces/rgb_u8/kis_rgb_colorspace.cc
index 61272e36..34ab79fc 100644
--- a/krita/colorspaces/rgb_u8/kis_rgb_colorspace.cc
+++ b/krita/colorspaces/rgb_u8/kis_rgb_colorspace.cc
@@ -22,8 +22,8 @@
#include <stdlib.h>
#include LCMS_HEADER
-#include <qimage.h>
-#include <qcolor.h>
+#include <tqimage.h>
+#include <tqcolor.h>
#include <kdebug.h>
#include <klocale.h>
@@ -37,19 +37,19 @@
#include "composite.h"
#define downscale(quantum) (quantum) //((unsigned char) ((quantum)/257UL))
-#define upscale(value) (value) // ((Q_UINT8) (257UL*(value)))
+#define upscale(value) (value) // ((TQ_UINT8) (257UL*(value)))
namespace {
- const Q_INT32 MAX_CHANNEL_RGB = 3;
- const Q_INT32 MAX_CHANNEL_RGBA = 4;
+ const TQ_INT32 MAX_CHANNEL_RGB = 3;
+ const TQ_INT32 MAX_CHANNEL_RGBA = 4;
}
-KisRgbColorSpace::KisRgbColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) :
- KisU8BaseColorSpace(KisID("RGBA", i18n("RGB (8-bit integer/channel)")), TYPE_BGRA_8, icSigRgbData, parent, p)
+KisRgbColorSpace::KisRgbColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) :
+ KisU8BaseColorSpace(KisID("RGBA", i18n("RGB (8-bit integer/channel)")), TYPE_BGRA_8, icSigRgbData, tqparent, p)
{
- m_channels.push_back(new KisChannelInfo(i18n("Red"), i18n("R"), 2, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, QColor(255,0,0)));
- m_channels.push_back(new KisChannelInfo(i18n("Green"), i18n("G"), 1, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, QColor(0,255,0)));
- m_channels.push_back(new KisChannelInfo(i18n("Blue"), i18n("B"), 0, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, QColor(0,0,255)));
+ m_channels.push_back(new KisChannelInfo(i18n("Red"), i18n("R"), 2, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQColor(255,0,0)));
+ m_channels.push_back(new KisChannelInfo(i18n("Green"), i18n("G"), 1, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQColor(0,255,0)));
+ m_channels.push_back(new KisChannelInfo(i18n("Blue"), i18n("B"), 0, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQColor(0,0,255)));
m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 3, KisChannelInfo::ALPHA, KisChannelInfo::UINT8));
m_alphaPos = PIXEL_ALPHA;
@@ -60,7 +60,7 @@ KisRgbColorSpace::~KisRgbColorSpace()
{
}
-void KisRgbColorSpace::setPixel(Q_UINT8 *pixel, Q_UINT8 red, Q_UINT8 green, Q_UINT8 blue, Q_UINT8 alpha) const
+void KisRgbColorSpace::setPixel(TQ_UINT8 *pixel, TQ_UINT8 red, TQ_UINT8 green, TQ_UINT8 blue, TQ_UINT8 alpha) const
{
pixel[PIXEL_RED] = red;
pixel[PIXEL_GREEN] = green;
@@ -68,7 +68,7 @@ void KisRgbColorSpace::setPixel(Q_UINT8 *pixel, Q_UINT8 red, Q_UINT8 green, Q_UI
pixel[PIXEL_ALPHA] = alpha;
}
-void KisRgbColorSpace::getPixel(const Q_UINT8 *pixel, Q_UINT8 *red, Q_UINT8 *green, Q_UINT8 *blue, Q_UINT8 *alpha) const
+void KisRgbColorSpace::getPixel(const TQ_UINT8 *pixel, TQ_UINT8 *red, TQ_UINT8 *green, TQ_UINT8 *blue, TQ_UINT8 *alpha) const
{
*red = pixel[PIXEL_RED];
*green = pixel[PIXEL_GREEN];
@@ -76,16 +76,16 @@ void KisRgbColorSpace::getPixel(const Q_UINT8 *pixel, Q_UINT8 *red, Q_UINT8 *gre
*alpha = pixel[PIXEL_ALPHA];
}
-void KisRgbColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const
+void KisRgbColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const
{
- Q_UINT32 totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0;
+ TQ_UINT32 totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0;
while (nColors--)
{
- Q_UINT32 alpha = (*colors)[PIXEL_ALPHA];
+ TQ_UINT32 alpha = (*colors)[PIXEL_ALPHA];
// although we only mult by weight and not by weight*256/255
// we divide by the same amount later, so there is no need
- Q_UINT32 alphaTimesWeight = alpha * *weights;
+ TQ_UINT32 alphaTimesWeight = alpha * *weights;
totalRed += (*colors)[PIXEL_RED] * alphaTimesWeight;
totalGreen += (*colors)[PIXEL_GREEN] * alphaTimesWeight;
@@ -108,29 +108,29 @@ void KisRgbColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights,
totalBlue = totalBlue / totalAlpha;
} // else the values are already 0 too
- Q_UINT32 dstRed = totalRed;
+ TQ_UINT32 dstRed = totalRed;
//Q_ASSERT(dstRed <= 255);
if (dstRed > 255) dstRed = 255;
dst[PIXEL_RED] = dstRed;
- Q_UINT32 dstGreen = totalGreen;
+ TQ_UINT32 dstGreen = totalGreen;
//Q_ASSERT(dstGreen <= 255);
if (dstGreen > 255) dstGreen = 255;
dst[PIXEL_GREEN] = dstGreen;
- Q_UINT32 dstBlue = totalBlue;
+ TQ_UINT32 dstBlue = totalBlue;
//Q_ASSERT(dstBlue <= 255);
if (dstBlue > 255) dstBlue = 255;
dst[PIXEL_BLUE] = dstBlue;
}
-void KisRgbColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const
+void KisRgbColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const
{
- Q_INT64 totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0;
- Q_INT32 totalWeight = 0, totalWeightTransparent = 0;
+ TQ_INT64 totalRed = 0, totalGreen = 0, totalBlue = 0, totalAlpha = 0;
+ TQ_INT32 totalWeight = 0, totalWeightTransparent = 0;
while (nColors--)
{
- Q_INT32 weight = *kernelValues;
+ TQ_INT32 weight = *kernelValues;
if (weight != 0) {
if((*colors)[PIXEL_ALPHA] == 0)
@@ -150,100 +150,100 @@ void KisRgbColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, K
if(totalWeightTransparent == 0)
{
if (channelFlags & KisChannelInfo::FLAG_COLOR) {
- dst[PIXEL_RED] = CLAMP((totalRed / factor) + offset, 0, Q_UINT8_MAX);
- dst[PIXEL_GREEN] = CLAMP((totalGreen / factor) + offset, 0, Q_UINT8_MAX);
- dst[PIXEL_BLUE] = CLAMP((totalBlue / factor) + offset, 0, Q_UINT8_MAX);
+ dst[PIXEL_RED] = CLAMP((totalRed / factor) + offset, 0, TQ_UINT8_MAX);
+ dst[PIXEL_GREEN] = CLAMP((totalGreen / factor) + offset, 0, TQ_UINT8_MAX);
+ dst[PIXEL_BLUE] = CLAMP((totalBlue / factor) + offset, 0, TQ_UINT8_MAX);
}
if (channelFlags & KisChannelInfo::FLAG_ALPHA) {
- dst[PIXEL_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT8_MAX);
+ dst[PIXEL_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT8_MAX);
}
} else if(totalWeightTransparent != totalWeight && (channelFlags & KisChannelInfo::FLAG_COLOR)) {
if(totalWeight == factor)
{
- Q_INT64 a = ( totalWeight - totalWeightTransparent );
- dst[PIXEL_RED] = CLAMP((totalRed / a) + offset, 0, Q_UINT8_MAX);
- dst[PIXEL_GREEN] = CLAMP((totalGreen / a) + offset, 0, Q_UINT8_MAX);
- dst[PIXEL_BLUE] = CLAMP((totalBlue / a) + offset, 0, Q_UINT8_MAX);
+ TQ_INT64 a = ( totalWeight - totalWeightTransparent );
+ dst[PIXEL_RED] = CLAMP((totalRed / a) + offset, 0, TQ_UINT8_MAX);
+ dst[PIXEL_GREEN] = CLAMP((totalGreen / a) + offset, 0, TQ_UINT8_MAX);
+ dst[PIXEL_BLUE] = CLAMP((totalBlue / a) + offset, 0, TQ_UINT8_MAX);
} else {
double a = totalWeight / ( factor * ( totalWeight - totalWeightTransparent ) ); // use double as it can saturate
- dst[PIXEL_RED] = CLAMP( (Q_UINT8)(totalRed * a) + offset, 0, Q_UINT8_MAX);
- dst[PIXEL_GREEN] = CLAMP( (Q_UINT8)(totalGreen * a) + offset, 0, Q_UINT8_MAX);
- dst[PIXEL_BLUE] = CLAMP( (Q_UINT8)(totalBlue * a) + offset, 0, Q_UINT8_MAX);
+ dst[PIXEL_RED] = CLAMP( (TQ_UINT8)(totalRed * a) + offset, 0, TQ_UINT8_MAX);
+ dst[PIXEL_GREEN] = CLAMP( (TQ_UINT8)(totalGreen * a) + offset, 0, TQ_UINT8_MAX);
+ dst[PIXEL_BLUE] = CLAMP( (TQ_UINT8)(totalBlue * a) + offset, 0, TQ_UINT8_MAX);
}
}
if (channelFlags & KisChannelInfo::FLAG_ALPHA) {
- dst[PIXEL_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, Q_UINT8_MAX);
+ dst[PIXEL_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT8_MAX);
}
}
-void KisRgbColorSpace::invertColor(Q_UINT8 * src, Q_INT32 nPixels)
+void KisRgbColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels)
{
- Q_UINT32 psize = pixelSize();
+ TQ_UINT32 psize = pixelSize();
while (nPixels--)
{
- src[PIXEL_RED] = Q_UINT8_MAX - src[PIXEL_RED];
- src[PIXEL_GREEN] = Q_UINT8_MAX - src[PIXEL_GREEN];
- src[PIXEL_BLUE] = Q_UINT8_MAX - src[PIXEL_BLUE];
+ src[PIXEL_RED] = TQ_UINT8_MAX - src[PIXEL_RED];
+ src[PIXEL_GREEN] = TQ_UINT8_MAX - src[PIXEL_GREEN];
+ src[PIXEL_BLUE] = TQ_UINT8_MAX - src[PIXEL_BLUE];
src += psize;
}
}
-void KisRgbColorSpace::darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const
+void KisRgbColorSpace::darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const
{
- Q_UINT32 pSize = pixelSize();
+ TQ_UINT32 pSize = pixelSize();
while (nPixels--) {
if (compensate) {
- dst[PIXEL_RED] = (Q_INT8) QMIN(255,((src[PIXEL_RED] * shade) / (compensation * 255)));
- dst[PIXEL_GREEN] = (Q_INT8) QMIN(255,((src[PIXEL_GREEN] * shade) / (compensation * 255)));
- dst[PIXEL_BLUE] = (Q_INT8) QMIN(255,((src[PIXEL_BLUE] * shade) / (compensation * 255)));
+ dst[PIXEL_RED] = (TQ_INT8) TQMIN(255,((src[PIXEL_RED] * shade) / (compensation * 255)));
+ dst[PIXEL_GREEN] = (TQ_INT8) TQMIN(255,((src[PIXEL_GREEN] * shade) / (compensation * 255)));
+ dst[PIXEL_BLUE] = (TQ_INT8) TQMIN(255,((src[PIXEL_BLUE] * shade) / (compensation * 255)));
}
else {
- dst[PIXEL_RED] = (Q_INT8) QMIN(255, (src[PIXEL_RED] * shade / 255));
- dst[PIXEL_BLUE] = (Q_INT8) QMIN(255, (src[PIXEL_BLUE] * shade / 255));
- dst[PIXEL_GREEN] = (Q_INT8) QMIN(255, (src[PIXEL_GREEN] * shade / 255));
+ dst[PIXEL_RED] = (TQ_INT8) TQMIN(255, (src[PIXEL_RED] * shade / 255));
+ dst[PIXEL_BLUE] = (TQ_INT8) TQMIN(255, (src[PIXEL_BLUE] * shade / 255));
+ dst[PIXEL_GREEN] = (TQ_INT8) TQMIN(255, (src[PIXEL_GREEN] * shade / 255));
}
dst += pSize;
src += pSize;
}
}
-Q_UINT8 KisRgbColorSpace::intensity8(const Q_UINT8 * src) const
+TQ_UINT8 KisRgbColorSpace::intensity8(const TQ_UINT8 * src) const
{
- return (Q_UINT8)((src[PIXEL_RED] * 0.30 + src[PIXEL_GREEN] * 0.59 + src[PIXEL_BLUE] * 0.11) + 0.5);
+ return (TQ_UINT8)((src[PIXEL_RED] * 0.30 + src[PIXEL_GREEN] * 0.59 + src[PIXEL_BLUE] * 0.11) + 0.5);
}
-QValueVector<KisChannelInfo *> KisRgbColorSpace::channels() const
+TQValueVector<KisChannelInfo *> KisRgbColorSpace::channels() const
{
return m_channels;
}
-Q_UINT32 KisRgbColorSpace::nChannels() const
+TQ_UINT32 KisRgbColorSpace::nChannels() const
{
return MAX_CHANNEL_RGBA;
}
-Q_UINT32 KisRgbColorSpace::nColorChannels() const
+TQ_UINT32 KisRgbColorSpace::nColorChannels() const
{
return MAX_CHANNEL_RGB;
}
-Q_UINT32 KisRgbColorSpace::pixelSize() const
+TQ_UINT32 KisRgbColorSpace::pixelSize() const
{
return MAX_CHANNEL_RGBA;
}
-QImage KisRgbColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height,
+TQImage KisRgbColorSpace::convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height,
KisProfile * dstProfile,
- Q_INT32 renderingIntent, float /*exposure*/)
+ TQ_INT32 renderingIntent, float /*exposure*/)
{
Q_ASSERT(data);
- QImage img = QImage(const_cast<Q_UINT8 *>(data), width, height, 32, 0, 0, QImage::LittleEndian);
+ TQImage img = TQImage(const_cast<TQ_UINT8 *>(data), width, height, 32, 0, 0, TQImage::LittleEndian);
img.setAlphaBuffer(true);
// XXX: The previous version of this code used the quantum data directly
// as an optimisation. We're introducing a copy overhead here which could
@@ -263,28 +263,28 @@ QImage KisRgbColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_I
-void KisRgbColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride,
- const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride,
- const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride,
- Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisRgbColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride,
+ const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride,
+ const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride,
+ TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- const Q_UINT8 *mask = maskRowStart;
- Q_INT32 columns = numColumns;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
+ TQ_INT32 columns = numColumns;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_ALPHA];
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -294,16 +294,16 @@ void KisRgbColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride,
}
if (srcAlpha == OPACITY_OPAQUE) {
- memcpy(dst, src, MAX_CHANNEL_RGBA * sizeof(Q_UINT8));
+ memcpy(dst, src, MAX_CHANNEL_RGBA * sizeof(TQ_UINT8));
} else {
- Q_UINT8 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA];
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -314,7 +314,7 @@ void KisRgbColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride,
}
if (srcBlend == OPACITY_OPAQUE) {
- memcpy(dst, src, MAX_CHANNEL_RGB * sizeof(Q_UINT8));
+ memcpy(dst, src, MAX_CHANNEL_RGB * sizeof(TQ_UINT8));
} else {
dst[PIXEL_RED] = UINT8_BLEND(src[PIXEL_RED], dst[PIXEL_RED], srcBlend);
dst[PIXEL_GREEN] = UINT8_BLEND(src[PIXEL_GREEN], dst[PIXEL_GREEN], srcBlend);
@@ -331,35 +331,35 @@ void KisRgbColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride,
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisRgbColorSpace::compositeAlphaDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride,
- const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride,
- const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride,
- Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisRgbColorSpace::compositeAlphaDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride,
+ const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride,
+ const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride,
+ TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- const Q_UINT8 *mask = maskRowStart;
- Q_INT32 columns = numColumns;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
+ TQ_INT32 columns = numColumns;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA];
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (opacity != OPACITY_OPAQUE) {
@@ -368,7 +368,7 @@ void KisRgbColorSpace::compositeAlphaDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRow
if (srcAlpha != OPACITY_TRANSPARENT && srcAlpha >= dstAlpha) {
dst[PIXEL_ALPHA] = srcAlpha;
- memcpy(dst, src, MAX_CHANNEL_RGB * sizeof(Q_UINT8));
+ memcpy(dst, src, MAX_CHANNEL_RGB * sizeof(TQ_UINT8));
}
columns--;
@@ -379,34 +379,34 @@ void KisRgbColorSpace::compositeAlphaDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRow
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisRgbColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisRgbColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
@@ -416,12 +416,12 @@ void KisRgbColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -431,8 +431,8 @@ void KisRgbColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
}
}
- Q_UINT8 srcColor = src[PIXEL_RED];
- Q_UINT8 dstColor = dst[PIXEL_RED];
+ TQ_UINT8 srcColor = src[PIXEL_RED];
+ TQ_UINT8 dstColor = dst[PIXEL_RED];
srcColor = UINT8_MULT(srcColor, dstColor);
@@ -461,33 +461,33 @@ void KisRgbColorSpace::compositeMultiply(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisRgbColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisRgbColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -496,12 +496,12 @@ void KisRgbColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -513,12 +513,12 @@ void KisRgbColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
- srcColor = QMIN((dstColor * (UINT8_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT8_MAX);
+ srcColor = TQMIN((dstColor * (UINT8_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT8_MAX);
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -532,33 +532,33 @@ void KisRgbColorSpace::compositeDivide(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisRgbColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisRgbColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -567,12 +567,12 @@ void KisRgbColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -584,12 +584,12 @@ void KisRgbColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
srcColor = UINT8_MAX - UINT8_MULT(UINT8_MAX - dstColor, UINT8_MAX - srcColor);
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -603,33 +603,33 @@ void KisRgbColorSpace::compositeScreen(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisRgbColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisRgbColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
@@ -639,12 +639,12 @@ void KisRgbColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -656,12 +656,12 @@ void KisRgbColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
srcColor = UINT8_MULT(dstColor, dstColor + UINT8_MULT(2 * srcColor, UINT8_MAX - dstColor));
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -675,33 +675,33 @@ void KisRgbColorSpace::compositeOverlay(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisRgbColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisRgbColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
@@ -711,12 +711,12 @@ void KisRgbColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -728,12 +728,12 @@ void KisRgbColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
- srcColor = QMIN((dstColor * (UINT8_MAX + 1)) / (UINT8_MAX + 1 - srcColor), UINT8_MAX);
+ srcColor = TQMIN((dstColor * (UINT8_MAX + 1)) / (UINT8_MAX + 1 - srcColor), UINT8_MAX);
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -747,33 +747,33 @@ void KisRgbColorSpace::compositeDodge(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisRgbColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisRgbColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -782,12 +782,12 @@ void KisRgbColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride,
srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -799,13 +799,13 @@ void KisRgbColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride,
for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
- srcColor = QMIN(((UINT8_MAX - dstColor) * (UINT8_MAX + 1)) / (srcColor + 1), UINT8_MAX);
+ srcColor = TQMIN(((UINT8_MAX - dstColor) * (UINT8_MAX + 1)) / (srcColor + 1), UINT8_MAX);
if (UINT8_MAX - srcColor > UINT8_MAX) srcColor = UINT8_MAX;
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -819,33 +819,33 @@ void KisRgbColorSpace::compositeBurn(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride,
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisRgbColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisRgbColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -854,12 +854,12 @@ void KisRgbColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -871,12 +871,12 @@ void KisRgbColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
- srcColor = QMIN(srcColor, dstColor);
+ srcColor = TQMIN(srcColor, dstColor);
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -890,33 +890,33 @@ void KisRgbColorSpace::compositeDarken(Q_UINT8 *dstRowStart, Q_INT32 dstRowStrid
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisRgbColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisRgbColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -925,12 +925,12 @@ void KisRgbColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -942,12 +942,12 @@ void KisRgbColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
for (int channel = 0; channel < MAX_CHANNEL_RGB; channel++) {
- Q_UINT8 srcColor = src[channel];
- Q_UINT8 dstColor = dst[channel];
+ TQ_UINT8 srcColor = src[channel];
+ TQ_UINT8 dstColor = dst[channel];
- srcColor = QMAX(srcColor, dstColor);
+ srcColor = TQMAX(srcColor, dstColor);
- Q_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
+ TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
dst[channel] = newColor;
}
@@ -961,33 +961,33 @@ void KisRgbColorSpace::compositeLighten(Q_UINT8 *dstRowStart, Q_INT32 dstRowStri
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisRgbColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisRgbColorSpace::compositeHue(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -996,12 +996,12 @@ void KisRgbColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride,
srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -1044,33 +1044,33 @@ void KisRgbColorSpace::compositeHue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride,
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisRgbColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisRgbColorSpace::compositeSaturation(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -1079,12 +1079,12 @@ void KisRgbColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -1127,33 +1127,33 @@ void KisRgbColorSpace::compositeSaturation(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisRgbColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisRgbColorSpace::compositeValue(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -1162,12 +1162,12 @@ void KisRgbColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -1210,33 +1210,33 @@ void KisRgbColorSpace::compositeValue(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisRgbColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisRgbColorSpace::compositeColor(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- Q_INT32 columns = numColumns;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ TQ_INT32 columns = numColumns;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_ALPHA];
- Q_UINT8 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA];
- srcAlpha = QMIN(srcAlpha, dstAlpha);
+ srcAlpha = TQMIN(srcAlpha, dstAlpha);
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -1245,12 +1245,12 @@ void KisRgbColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
srcAlpha = UINT8_MULT(src[PIXEL_ALPHA], opacity);
}
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -1274,9 +1274,9 @@ void KisRgbColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
rgb_to_hls(src[PIXEL_RED], src[PIXEL_GREEN], src[PIXEL_BLUE], &srcHue, &srcLightness, &srcSaturation);
rgb_to_hls(dstRed, dstGreen, dstBlue, &dstHue, &dstLightness, &dstSaturation);
- Q_UINT8 srcRed;
- Q_UINT8 srcGreen;
- Q_UINT8 srcBlue;
+ TQ_UINT8 srcRed;
+ TQ_UINT8 srcGreen;
+ TQ_UINT8 srcBlue;
hls_to_rgb(srcHue, dstLightness, srcSaturation, &srcRed, &srcGreen, &srcBlue);
@@ -1293,59 +1293,59 @@ void KisRgbColorSpace::compositeColor(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisRgbColorSpace::compositeErase(Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowSize,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_INT32 rows,
- Q_INT32 cols,
- Q_UINT8 /*opacity*/)
+void KisRgbColorSpace::compositeErase(TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowSize,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
+ TQ_UINT8 /*opacity*/)
{
- Q_INT32 i;
- Q_UINT8 srcAlpha;
+ TQ_INT32 i;
+ TQ_UINT8 srcAlpha;
while (rows-- > 0)
{
- const Q_UINT8 *s = src;
- Q_UINT8 *d = dst;
- const Q_UINT8 *mask = srcAlphaMask;
+ const TQ_UINT8 *s = src;
+ TQ_UINT8 *d = dst;
+ const TQ_UINT8 *tqmask = srcAlphaMask;
for (i = cols; i > 0; i--, s+=MAX_CHANNEL_RGBA, d+=MAX_CHANNEL_RGBA)
{
srcAlpha = s[PIXEL_ALPHA];
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, *tqmask);
+ tqmask++;
}
d[PIXEL_ALPHA] = UINT8_MULT(srcAlpha, d[PIXEL_ALPHA]);
}
dst += dstRowSize;
if(srcAlphaMask)
- srcAlphaMask += maskRowStride;
+ srcAlphaMask += tqmaskRowStride;
src += srcRowSize;
}
}
-void KisRgbColorSpace::bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *mask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+void KisRgbColorSpace::bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *tqmask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op)
{
@@ -1354,10 +1354,10 @@ void KisRgbColorSpace::bitBlt(Q_UINT8 *dst,
// Undefined == no composition
break;
case COMPOSITE_OVER:
- compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ALPHA_DARKEN:
- compositeAlphaDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeAlphaDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_IN:
compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -1387,16 +1387,16 @@ void KisRgbColorSpace::bitBlt(Q_UINT8 *dst,
compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_MULT:
- compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DIVIDE:
- compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BUMPMAP:
compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_COPY:
- compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COPY_RED:
compositeCopyRed(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -1431,22 +1431,22 @@ void KisRgbColorSpace::bitBlt(Q_UINT8 *dst,
// No composition.
break;
case COMPOSITE_DARKEN:
- compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_LIGHTEN:
- compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_HUE:
- compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_SATURATION:
- compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_VALUE:
- compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLOR:
- compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLORIZE:
compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -1455,19 +1455,19 @@ void KisRgbColorSpace::bitBlt(Q_UINT8 *dst,
compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_SCREEN:
- compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_OVERLAY:
- compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
- compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DODGE:
- compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BURN:
- compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
default:
break;
diff --git a/krita/colorspaces/rgb_u8/kis_rgb_colorspace.h b/krita/colorspaces/rgb_u8/kis_rgb_colorspace.h
index 40718251..37c54d7f 100644
--- a/krita/colorspaces/rgb_u8/kis_rgb_colorspace.h
+++ b/krita/colorspaces/rgb_u8/kis_rgb_colorspace.h
@@ -24,14 +24,14 @@
#include "kis_u8_base_colorspace.h"
#include "koffice_export.h"
-const Q_UINT8 PIXEL_BLUE = 0;
-const Q_UINT8 PIXEL_GREEN = 1;
-const Q_UINT8 PIXEL_RED = 2;
-const Q_UINT8 PIXEL_ALPHA = 3;
+const TQ_UINT8 PIXEL_BLUE = 0;
+const TQ_UINT8 PIXEL_GREEN = 1;
+const TQ_UINT8 PIXEL_RED = 2;
+const TQ_UINT8 PIXEL_ALPHA = 3;
class KRITATOOL_EXPORT KisRgbColorSpace : public KisU8BaseColorSpace {
public:
- KisRgbColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p);
+ KisRgbColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p);
virtual ~KisRgbColorSpace();
virtual bool willDegrade(ColorSpaceIndependence)
@@ -41,55 +41,55 @@ public:
public:
- void setPixel(Q_UINT8 *pixel, Q_UINT8 red, Q_UINT8 green, Q_UINT8 blue, Q_UINT8 alpha) const;
- void getPixel(const Q_UINT8 *pixel, Q_UINT8 *red, Q_UINT8 *green, Q_UINT8 *blue, Q_UINT8 *alpha) const;
+ void setPixel(TQ_UINT8 *pixel, TQ_UINT8 red, TQ_UINT8 green, TQ_UINT8 blue, TQ_UINT8 alpha) const;
+ void getPixel(const TQ_UINT8 *pixel, TQ_UINT8 *red, TQ_UINT8 *green, TQ_UINT8 *blue, TQ_UINT8 *alpha) const;
- virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
- virtual void convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const;
- virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels);
- virtual void darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const;
- virtual Q_UINT8 intensity8(const Q_UINT8 * src) const;
+ virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const;
+ virtual void convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const;
+ virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels);
+ virtual void darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const;
+ virtual TQ_UINT8 intensity8(const TQ_UINT8 * src) const;
- virtual QValueVector<KisChannelInfo *> channels() const;
- virtual Q_UINT32 nChannels() const;
- virtual Q_UINT32 nColorChannels() const;
- virtual Q_UINT32 pixelSize() const;
+ virtual TQValueVector<KisChannelInfo *> channels() const;
+ virtual TQ_UINT32 nChannels() const;
+ virtual TQ_UINT32 nColorChannels() const;
+ virtual TQ_UINT32 pixelSize() const;
- virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height,
+ virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height,
KisProfile * dstProfile = 0,
- Q_INT32 renderingIntent = INTENT_PERCEPTUAL,
+ TQ_INT32 renderingIntent = INTENT_PERCEPTUAL,
float exposure = 0.0f);
virtual KisCompositeOpList userVisiblecompositeOps() const;
protected:
- virtual void bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+ virtual void bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op);
- void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeAlphaDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeMultiply(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeDivide(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeScreen(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeOverlay(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeDodge(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeBurn(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeDarken(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeLighten(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeHue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeSaturation(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeValue(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeColor(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
+ void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeAlphaDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeHue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeSaturation(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeValue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeColor(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
};
class KisRgbColorSpaceFactory : public KisColorSpaceFactory
@@ -104,13 +104,13 @@ public:
/**
* lcms colorspace type definition.
*/
- virtual Q_UINT32 colorSpaceType() { return TYPE_BGRA_8; };
+ virtual TQ_UINT32 colorSpaceType() { return TYPE_BGRA_8; };
virtual icColorSpaceSignature colorSpaceSignature() { return icSigRgbData; };
- virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile * p) { return new KisRgbColorSpace(parent, p); };
+ virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile * p) { return new KisRgbColorSpace(tqparent, p); };
- virtual QString defaultProfile() { return "sRGB built-in - (lcms internal)"; };
+ virtual TQString defaultProfile() { return "sRGB built-in - (lcms internal)"; };
};
#endif // KIS_STRATEGY_COLORSPACE_RGB_H_
diff --git a/krita/colorspaces/rgb_u8/rgb_plugin.cc b/krita/colorspaces/rgb_u8/rgb_plugin.cc
index 018c1491..61384632 100644
--- a/krita/colorspaces/rgb_u8/rgb_plugin.cc
+++ b/krita/colorspaces/rgb_u8/rgb_plugin.cc
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <vector>
-#include <qpoint.h>
+#include <tqpoint.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -43,14 +43,14 @@ typedef KGenericFactory<RGBPlugin> RGBPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kritargbplugin, RGBPluginFactory( "krita" ) )
-RGBPlugin::RGBPlugin(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+RGBPlugin::RGBPlugin(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(RGBPluginFactory::instance());
- if ( parent->inherits("KisColorSpaceFactoryRegistry") )
+ if ( tqparent->inherits("KisColorSpaceFactoryRegistry") )
{
- KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>(parent);
+ KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>(tqparent);
KisProfile *defProfile = new KisProfile(cmsCreate_sRGBProfile());
f->addProfile(defProfile);
diff --git a/krita/colorspaces/rgb_u8/rgb_plugin.h b/krita/colorspaces/rgb_u8/rgb_plugin.h
index 262d0bb4..08ccd890 100644
--- a/krita/colorspaces/rgb_u8/rgb_plugin.h
+++ b/krita/colorspaces/rgb_u8/rgb_plugin.h
@@ -27,8 +27,9 @@
class RGBPlugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- RGBPlugin(QObject *parent, const char *name, const QStringList &);
+ RGBPlugin(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~RGBPlugin();
};
diff --git a/krita/colorspaces/rgb_u8/tests/kis_strategy_colorspace_rgb_tester.cpp b/krita/colorspaces/rgb_u8/tests/kis_strategy_colorspace_rgb_tester.cpp
index 7ad4cfae..1d3526f4 100644
--- a/krita/colorspaces/rgb_u8/tests/kis_strategy_colorspace_rgb_tester.cpp
+++ b/krita/colorspaces/rgb_u8/tests/kis_strategy_colorspace_rgb_tester.cpp
@@ -51,36 +51,36 @@ void KisRgbColorSpaceTester::testBasics()
KisProfile *defProfile = new KisProfile(cmsCreate_sRGBProfile());
KisRgbColorSpace *cs = new KisRgbColorSpace(defProfile);
- Q_UINT8 pixel[NUM_CHANNELS];
+ TQ_UINT8 pixel[NUM_CHANNELS];
pixel[PIXEL_RED] = 255;
pixel[PIXEL_GREEN] = 128;
pixel[PIXEL_BLUE] = 64;
pixel[PIXEL_ALPHA] = 0;
- QString valueText = cs->channelValueText(pixel, RED_CHANNEL);
- CHECK(valueText, QString("255"));
+ TQString valueText = cs->channelValueText(pixel, RED_CHANNEL);
+ CHECK(valueText, TQString("255"));
valueText = cs->channelValueText(pixel, GREEN_CHANNEL);
- CHECK(valueText, QString("128"));
+ CHECK(valueText, TQString("128"));
valueText = cs->channelValueText(pixel, BLUE_CHANNEL);
- CHECK(valueText, QString("64"));
+ CHECK(valueText, TQString("64"));
valueText = cs->channelValueText(pixel, ALPHA_CHANNEL);
- CHECK(valueText, QString("0"));
+ CHECK(valueText, TQString("0"));
valueText = cs->normalisedChannelValueText(pixel, RED_CHANNEL);
- CHECK(valueText, QString().setNum(1.0));
+ CHECK(valueText, TQString().setNum(1.0));
valueText = cs->normalisedChannelValueText(pixel, GREEN_CHANNEL);
- CHECK(valueText, QString().setNum(128.0 / 255.0));
+ CHECK(valueText, TQString().setNum(128.0 / 255.0));
valueText = cs->normalisedChannelValueText(pixel, BLUE_CHANNEL);
- CHECK(valueText, QString().setNum(64.0 / 255.0));
+ CHECK(valueText, TQString().setNum(64.0 / 255.0));
valueText = cs->normalisedChannelValueText(pixel, ALPHA_CHANNEL);
- CHECK(valueText, QString().setNum(0.0));
+ CHECK(valueText, TQString().setNum(0.0));
cs->setPixel(pixel, 128, 192, 64, 99);
CHECK((uint)pixel[PIXEL_RED], 128u);
@@ -88,10 +88,10 @@ void KisRgbColorSpaceTester::testBasics()
CHECK((uint)pixel[PIXEL_BLUE], 64u);
CHECK((uint)pixel[PIXEL_ALPHA], 99u);
- Q_UINT8 red;
- Q_UINT8 green;
- Q_UINT8 blue;
- Q_UINT8 alpha;
+ TQ_UINT8 red;
+ TQ_UINT8 green;
+ TQ_UINT8 blue;
+ TQ_UINT8 alpha;
cs->getPixel(pixel, &red, &green, &blue, &alpha);
CHECK((uint)red, 128u);
@@ -107,9 +107,9 @@ void KisRgbColorSpaceTester::testMixColors()
// Test mixColors.
- Q_UINT8 pixel1[4];
- Q_UINT8 pixel2[4];
- Q_UINT8 outputPixel[4];
+ TQ_UINT8 pixel1[4];
+ TQ_UINT8 pixel2[4];
+ TQ_UINT8 outputPixel[4];
pixel1[PIXEL_RED] = 255;
pixel1[PIXEL_GREEN] = 255;
@@ -121,8 +121,8 @@ void KisRgbColorSpaceTester::testMixColors()
pixel2[PIXEL_BLUE] = 0;
pixel2[PIXEL_ALPHA] = 0;
- const Q_UINT8 *pixelPtrs[2];
- Q_UINT8 weights[2];
+ const TQ_UINT8 *pixelPtrs[2];
+ TQ_UINT8 weights[2];
pixelPtrs[0] = pixel1;
pixelPtrs[1] = pixel2;
diff --git a/krita/colorspaces/wet/kis_texture_filter.cc b/krita/colorspaces/wet/kis_texture_filter.cc
index 1fc2e4d3..57ff1db0 100644
--- a/krita/colorspaces/wet/kis_texture_filter.cc
+++ b/krita/colorspaces/wet/kis_texture_filter.cc
@@ -25,7 +25,7 @@
#include "kis_texture_painter.h"
#include "kis_texture_filter.h"
-void WetPaintDevAction::act(KisPaintDeviceSP device, Q_INT32 w, Q_INT32 h) const {
+void WetPaintDevAction::act(KisPaintDeviceSP device, TQ_INT32 w, TQ_INT32 h) const {
KisColorSpace * cs = device->colorSpace();
if (cs->id() != KisID("WET","")) {
diff --git a/krita/colorspaces/wet/kis_texture_filter.h b/krita/colorspaces/wet/kis_texture_filter.h
index fb2ef021..b4b32825 100644
--- a/krita/colorspaces/wet/kis_texture_filter.h
+++ b/krita/colorspaces/wet/kis_texture_filter.h
@@ -21,7 +21,7 @@
#ifndef _TEXTURE_FILTER_H
#define _TEXTURE_FILTER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h>
#include <kis_paint_device_action.h>
@@ -30,9 +30,9 @@ class WetPaintDevAction : public KisPaintDeviceAction {
public:
virtual ~WetPaintDevAction() {}
- virtual void act(KisPaintDeviceSP device, Q_INT32 w = 0, Q_INT32 h = 0) const;
- virtual QString name() const { return i18n("Wet Texture"); }
- virtual QString description() const { return i18n("Add a texture to the wet canvas"); }
+ virtual void act(KisPaintDeviceSP device, TQ_INT32 w = 0, TQ_INT32 h = 0) const;
+ virtual TQString name() const { return i18n("Wet Texture"); }
+ virtual TQString description() const { return i18n("Add a texture to the wet canvas"); }
};
#endif // _TEXTURE_FILTER_H
diff --git a/krita/colorspaces/wet/kis_texture_painter.cc b/krita/colorspaces/wet/kis_texture_painter.cc
index a98038e6..4b11b989 100644
--- a/krita/colorspaces/wet/kis_texture_painter.cc
+++ b/krita/colorspaces/wet/kis_texture_painter.cc
@@ -44,7 +44,7 @@ KisTexturePainter::KisTexturePainter(KisPaintDeviceSP device) : super(device)
m_blurh = 0.7;
}
-void KisTexturePainter::createTexture( Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h)
+void KisTexturePainter::createTexture( TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h)
{
double hscale = 128 * m_height / RAND_MAX;
@@ -56,7 +56,7 @@ void KisTexturePainter::createTexture( Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT
while (!i.isDone()) {
WetPack* pack = reinterpret_cast<WetPack*>(i.rawData());
WetPix* w = &(pack->adsorb);
- w->h = ( Q_UINT16)floor(128 + hscale * rand());
+ w->h = ( TQ_UINT16)floor(128 + hscale * rand());
++i;
}
}
@@ -85,7 +85,7 @@ void KisTexturePainter::createTexture( Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT
}
}
- // Vertical blurring was commented out in wetdreams, the effect seems to be achievable
+ //Qt::Vertical blurring was commented out in wetdreams, the effect seems to be achievable
// without this.
// I think this is because with blur in one direction, you get more the effect of
// having 'fibers' in your paper
diff --git a/krita/colorspaces/wet/kis_texture_painter.h b/krita/colorspaces/wet/kis_texture_painter.h
index a3323492..00bcd135 100644
--- a/krita/colorspaces/wet/kis_texture_painter.h
+++ b/krita/colorspaces/wet/kis_texture_painter.h
@@ -31,7 +31,7 @@ public:
KisTexturePainter();
KisTexturePainter(KisPaintDeviceSP device);
- void createTexture( Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h);
+ void createTexture( TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h);
private:
double m_blurh, m_height;
diff --git a/krita/colorspaces/wet/kis_wet_colorspace.cc b/krita/colorspaces/wet/kis_wet_colorspace.cc
index 4ca96eb5..7d6f0d67 100644
--- a/krita/colorspaces/wet/kis_wet_colorspace.cc
+++ b/krita/colorspaces/wet/kis_wet_colorspace.cc
@@ -22,7 +22,7 @@
#include <config.h>
#include LCMS_HEADER
-#include <qimage.h>
+#include <tqimage.h>
#include <klocale.h>
#include <kdebug.h>
@@ -104,13 +104,13 @@ void wetPixFromDouble(WetPix * dst, WetPixDbl *src)
int getH(int r, int g, int b)
{
int h, s, v;
- QColor c(r,g, b);
+ TQColor c(r,g, b);
c.getHsv(&h, &s, &v);
return h;
}
-KisWetColorSpace::KisWetColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) :
- KisAbstractColorSpace(KisID("WET", i18n("Watercolors")), 0, icMaxEnumData, parent, p)
+KisWetColorSpace::KisWetColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) :
+ KisAbstractColorSpace(KisID("WET", i18n("Watercolors")), 0, icMaxEnumData, tqparent, p)
{
wet_init_render_tab();
@@ -148,7 +148,7 @@ KisWetColorSpace::KisWetColorSpace(KisColorSpaceFactoryRegistry * parent, KisPro
m_channels.push_back(new KisChannelInfo(i18n("Adsorbed Water Volume"), "W", 14, KisChannelInfo::SUBSTANCE, KisChannelInfo::UINT16));
m_channels.push_back(new KisChannelInfo(i18n("Adsorbed Paper Height"), "H", 15, KisChannelInfo::SUBSTANCE, KisChannelInfo::UINT16));
- // Store the hue; we'll pick the paintbox color that closest to the given QColor's hue.
+ // Store the hue; we'll pick the paintbox color that closest to the given TQColor's hue.
m_conversionMap[getH(240, 32, 160)] = m_paintbox[0]; // Quinacridone Rose
m_conversionMap[getH(159, 88, 43)] = m_paintbox[1]; // Indian Red
m_conversionMap[getH(254, 220, 64)] = m_paintbox[2]; // Cadmium Yellow
@@ -173,15 +173,15 @@ KisWetColorSpace::~KisWetColorSpace()
{
}
-void KisWetColorSpace::fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * /*profile*/)
+void KisWetColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * /*profile*/)
{
WetPack* p = reinterpret_cast<WetPack*>(dst);
int h = getH(c.red(), c.green(), c.blue());
int delta = 256;
int key = 0;
- QMap<int, WetPix>::Iterator it;
- QMap<int, WetPix>::Iterator end = m_conversionMap.end();
+ TQMap<int, WetPix>::Iterator it;
+ TQMap<int, WetPix>::Iterator end = m_conversionMap.end();
for (it = m_conversionMap.begin(); it != end; ++it) {
if (abs(it.key() - h) < delta) {
delta = abs(it.key() - h);
@@ -189,8 +189,8 @@ void KisWetColorSpace::fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * /*
}
}
- // Translate the special QCOlors from our paintbox to wetpaint paints.
- if (m_conversionMap.contains(key)) {
+ // Translate the special TQCOlors from our paintbox to wetpaint paints.
+ if (m_conversionMap.tqcontains(key)) {
(*p).paint = m_conversionMap[key];
(*p).adsorb = m_conversionMap[key]; // or maybe best add water here?
} else {
@@ -200,46 +200,46 @@ void KisWetColorSpace::fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * /*
}
}
-void KisWetColorSpace::fromQColor(const QColor& c, Q_UINT8 /*opacity*/, Q_UINT8 *dst, KisProfile * /*profile*/)
+void KisWetColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 /*opacity*/, TQ_UINT8 *dst, KisProfile * /*profile*/)
{
- fromQColor(c, dst);
+ fromTQColor(c, dst);
}
- Q_UINT8 KisWetColorSpace::getAlpha(const Q_UINT8 */*pixel*/) const
+ TQ_UINT8 KisWetColorSpace::getAlpha(const TQ_UINT8 */*pixel*/) const
{
return OPACITY_OPAQUE;
}
-void KisWetColorSpace::setAlpha( Q_UINT8 * /*pixels*/, Q_UINT8 /*alpha*/, Q_INT32 /*nPixels*/) const
+void KisWetColorSpace::setAlpha( TQ_UINT8 * /*pixels*/, TQ_UINT8 /*alpha*/, TQ_INT32 /*nPixels*/) const
{
}
-void KisWetColorSpace::multiplyAlpha( Q_UINT8 * /*pixels*/, Q_UINT8 /*alpha*/, Q_INT32 /*nPixels*/)
+void KisWetColorSpace::multiplyAlpha( TQ_UINT8 * /*pixels*/, TQ_UINT8 /*alpha*/, TQ_INT32 /*nPixels*/)
{
}
-void KisWetColorSpace::applyAlphaU8Mask( Q_UINT8 * /*pixels*/, Q_UINT8 * /*alpha*/, Q_INT32 /*nPixels*/)
+void KisWetColorSpace::applyAlphaU8Mask( TQ_UINT8 * /*pixels*/, TQ_UINT8 * /*alpha*/, TQ_INT32 /*nPixels*/)
{
}
-void KisWetColorSpace::applyInverseAlphaU8Mask( Q_UINT8 * /*pixels*/, Q_UINT8 * /*alpha*/, Q_INT32 /*nPixels*/)
+void KisWetColorSpace::applyInverseAlphaU8Mask( TQ_UINT8 * /*pixels*/, TQ_UINT8 * /*alpha*/, TQ_INT32 /*nPixels*/)
{
}
- Q_UINT8 KisWetColorSpace::scaleToU8(const Q_UINT8 * /*srcPixel*/, Q_INT32 /*channelPos*/)
+ TQ_UINT8 KisWetColorSpace::scaleToU8(const TQ_UINT8 * /*srcPixel*/, TQ_INT32 /*channelPos*/)
{
return 0;
}
-Q_UINT16 KisWetColorSpace::scaleToU16(const Q_UINT8 * /*srcPixel*/, Q_INT32 /*channelPos*/)
+TQ_UINT16 KisWetColorSpace::scaleToU16(const TQ_UINT8 * /*srcPixel*/, TQ_INT32 /*channelPos*/)
{
return 0;
}
-void KisWetColorSpace::toQColor(const Q_UINT8 *src, QColor *c, KisProfile * /*profile*/)
+void KisWetColorSpace::toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * /*profile*/)
{
- Q_UINT8 * rgb = new Q_UINT8[3];
+ TQ_UINT8 * rgb = new TQ_UINT8[3];
Q_CHECK_PTR(rgb);
memset(rgb, 255, 3);
@@ -259,37 +259,37 @@ void KisWetColorSpace::toQColor(const Q_UINT8 *src, QColor *c, KisProfile * /*pr
delete[]rgb;
}
-void KisWetColorSpace::toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 */*opacity*/, KisProfile * /*profile*/)
+void KisWetColorSpace::toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 */*opacity*/, KisProfile * /*profile*/)
{
- toQColor(src, c);
+ toTQColor(src, c);
}
-void KisWetColorSpace::mixColors(const Q_UINT8 **/*colors*/, const Q_UINT8 */*weights*/, Q_UINT32 /*nColors*/, Q_UINT8 */*dst*/) const
+void KisWetColorSpace::mixColors(const TQ_UINT8 **/*colors*/, const TQ_UINT8 */*weights*/, TQ_UINT32 /*nColors*/, TQ_UINT8 */*dst*/) const
{
}
-QValueVector<KisChannelInfo *> KisWetColorSpace::channels() const
+TQValueVector<KisChannelInfo *> KisWetColorSpace::channels() const
{
return m_channels;
}
- Q_UINT32 KisWetColorSpace::nChannels() const
+ TQ_UINT32 KisWetColorSpace::nChannels() const
{
return 16;
}
- Q_UINT32 KisWetColorSpace::nColorChannels() const
+ TQ_UINT32 KisWetColorSpace::nColorChannels() const
{
return 12;
}
- Q_UINT32 KisWetColorSpace::nSubstanceChannels() const
+ TQ_UINT32 KisWetColorSpace::nSubstanceChannels() const
{
return 4;
}
- Q_UINT32 KisWetColorSpace::pixelSize() const
+ TQ_UINT32 KisWetColorSpace::pixelSize() const
{
return 32; // This color strategy wants an unsigned short for each
// channel, and every pixel consists of two wetpix structs
@@ -300,14 +300,14 @@ QValueVector<KisChannelInfo *> KisWetColorSpace::channels() const
// XXX: use profiles to display correctly on calibrated displays.
-QImage KisWetColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height,
+TQImage KisWetColorSpace::convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height,
KisProfile * /*dstProfile*/,
- Q_INT32 /*renderingIntent*/, float /*exposure*/)
+ TQ_INT32 /*renderingIntent*/, float /*exposure*/)
{
- QImage img(width, height, 32);
+ TQImage img(width, height, 32);
- Q_UINT8 *rgb = (Q_UINT8*) img.bits();
+ TQ_UINT8 *rgb = (TQ_UINT8*) img.bits();
const WetPack* wetData = reinterpret_cast<const WetPack*>(data);
// Clear to white -- the following code actually composits the contents of the
@@ -316,7 +316,7 @@ QImage KisWetColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_I
memset(rgb, 255, width * height * 4);
// Composite the two layers in each pixelSize
- Q_INT32 i = 0;
+ TQ_INT32 i = 0;
while ( i < width * height) {
// First the adsorption layers
WetPack* wp = const_cast<WetPack*>(&wetData[i]); // XXX don't do these things!
@@ -338,31 +338,31 @@ QImage KisWetColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_I
}
i++;
- rgb += sizeof( Q_UINT32); // Because the QImage is 4 bytes deep.
+ rgb += sizeof( TQ_UINT32); // Because the TQImage is 4 bytes deep.
}
return img;
}
-void KisWetColorSpace::bitBlt( Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 */*srcAlphaMask*/,
- Q_INT32 /*maskRowStride*/,
- Q_UINT8 /*opacity*/,
- Q_INT32 rows,
- Q_INT32 cols,
+void KisWetColorSpace::bitBlt( TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 */*srcAlphaMask*/,
+ TQ_INT32 /*tqmaskRowStride*/,
+ TQ_UINT8 /*opacity*/,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op)
{
if (rows <= 0 || cols <= 0)
return;
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
- Q_INT32 linesize = pixelSize() * cols;
+ TQ_INT32 linesize = pixelSize() * cols;
d = dst;
s = src;
@@ -400,7 +400,7 @@ void KisWetColorSpace::wet_init_render_tab()
double d;
int a, b;
- wet_render_tab = new Q_UINT32[4096];
+ wet_render_tab = new TQ_UINT32[4096];
Q_CHECK_PTR(wet_render_tab);
for (i = 0; i < 4096; i++)
@@ -418,7 +418,7 @@ void KisWetColorSpace::wet_init_render_tab()
}
-void KisWetColorSpace::wet_composite(RGBMode m, Q_UINT8 *rgb, WetPix * wet)
+void KisWetColorSpace::wet_composite(RGBMode m, TQ_UINT8 *rgb, WetPix * wet)
{
int r, g, b;
int d, w;
@@ -467,7 +467,7 @@ void KisWetColorSpace::wet_composite(RGBMode m, Q_UINT8 *rgb, WetPix * wet)
rgb[0] = b;
}
-void KisWetColorSpace::wet_render_wetness( Q_UINT8 * rgb, WetPack * pack)
+void KisWetColorSpace::wet_render_wetness( TQ_UINT8 * rgb, WetPack * pack)
{
int highlight = 255 - (pack->paint.w >> 1);
@@ -487,27 +487,27 @@ KisCompositeOpList KisWetColorSpace::userVisiblecompositeOps() const
return list;
}
-QString KisWetColorSpace::channelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const
+TQString KisWetColorSpace::channelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const
{
Q_ASSERT(channelIndex < nChannels());
- const Q_UINT16 *pixel = reinterpret_cast<const Q_UINT16 *>(U8_pixel);
- Q_UINT32 channelPosition = m_channels[channelIndex]->pos();
+ const TQ_UINT16 *pixel = reinterpret_cast<const TQ_UINT16 *>(U8_pixel);
+ TQ_UINT32 channelPosition = m_channels[channelIndex]->pos();
- return QString().setNum(pixel[channelPosition]);
+ return TQString().setNum(pixel[channelPosition]);
}
-QString KisWetColorSpace::normalisedChannelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const
+TQString KisWetColorSpace::normalisedChannelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const
{
Q_ASSERT(channelIndex < nChannels());
- const Q_UINT16 *pixel = reinterpret_cast<const Q_UINT16 *>(U8_pixel);
- Q_UINT32 channelPosition = m_channels[channelIndex]->pos();
+ const TQ_UINT16 *pixel = reinterpret_cast<const TQ_UINT16 *>(U8_pixel);
+ TQ_UINT32 channelPosition = m_channels[channelIndex]->pos();
- return QString().setNum(static_cast<float>(pixel[channelPosition]) / UINT16_MAX);
+ return TQString().setNum(static_cast<float>(pixel[channelPosition]) / UINT16_MAX);
}
-QValueList<KisFilter *> KisWetColorSpace::createBackgroundFilters()
+TQValueList<KisFilter *> KisWetColorSpace::createBackgroundFilters()
{
- QValueList<KisFilter *> filterList;
+ TQValueList<KisFilter *> filterList;
KisFilter * f = new WetPhysicsFilter();
filterList << f;
return filterList;
diff --git a/krita/colorspaces/wet/kis_wet_colorspace.h b/krita/colorspaces/wet/kis_wet_colorspace.h
index 9c66c52e..3d6c6e57 100644
--- a/krita/colorspaces/wet/kis_wet_colorspace.h
+++ b/krita/colorspaces/wet/kis_wet_colorspace.h
@@ -18,10 +18,10 @@
#ifndef KIS_STRATEGY_COLORSPACE_WET_H_
#define KIS_STRATEGY_COLORSPACE_WET_H_
-#include <qcolor.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqcolor.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
#include "kis_global.h"
#include "kis_abstract_colorspace.h"
@@ -53,17 +53,17 @@ typedef struct _WetPack WetPack;
*/
struct _WetPix {
- Q_UINT16 rd; /* Total red channel concentration */
- Q_UINT16 rw; /* Myth-red concentration */
+ TQ_UINT16 rd; /* Total red channel concentration */
+ TQ_UINT16 rw; /* Myth-red concentration */
- Q_UINT16 gd; /* Total green channel concentration */
- Q_UINT16 gw; /* Myth-green concentration */
+ TQ_UINT16 gd; /* Total green channel concentration */
+ TQ_UINT16 gw; /* Myth-green concentration */
- Q_UINT16 bd; /* Total blue channel concentration */
- Q_UINT16 bw; /* Myth-blue concentration */
+ TQ_UINT16 bd; /* Total blue channel concentration */
+ TQ_UINT16 bw; /* Myth-blue concentration */
- Q_UINT16 w; /* Water volume */
- Q_UINT16 h; /* Height of paper surface XXX: This might just as well be a single
+ TQ_UINT16 w; /* Water volume */
+ TQ_UINT16 h; /* Height of paper surface XXX: This might just as well be a single
channel in our colour model that has two of
these wetpix structs for every paint device pixels*/
};
@@ -92,7 +92,7 @@ void wetPixFromDouble(WetPix * dst, WetPixDbl *src);
class KisWetColorSpace : public KisAbstractColorSpace {
public:
- KisWetColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p);
+ KisWetColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p);
virtual ~KisWetColorSpace();
@@ -111,40 +111,40 @@ public:
// Semi-clever: we have only fifteen wet paint colors that are mapped to the
// qcolors that are put in the painter by the special wet paint palette. Other
- // QColors are mapped to plain water...
- virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0);
- virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0);
+ // TQColors are mapped to plain water...
+ virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0);
+ virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0);
- virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0);
- virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0);
+ virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0);
+ virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0);
- virtual Q_UINT8 getAlpha(const Q_UINT8 * pixel) const;
- virtual void setAlpha( Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) const;
- virtual void multiplyAlpha( Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels);
+ virtual TQ_UINT8 getAlpha(const TQ_UINT8 * pixel) const;
+ virtual void setAlpha( TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const;
+ virtual void multiplyAlpha( TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels);
- virtual void applyAlphaU8Mask( Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels);
- virtual void applyInverseAlphaU8Mask( Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels);
+ virtual void applyAlphaU8Mask( TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels);
+ virtual void applyInverseAlphaU8Mask( TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels);
- virtual Q_UINT8 scaleToU8(const Q_UINT8 * srcPixel, Q_INT32 channelPos);
- virtual Q_UINT16 scaleToU16(const Q_UINT8 * srcPixel, Q_INT32 channelPos);
+ virtual TQ_UINT8 scaleToU8(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos);
+ virtual TQ_UINT16 scaleToU16(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos);
- virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
+ virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const;
- virtual QValueVector<KisChannelInfo *> channels() const;
- virtual Q_UINT32 nChannels() const;
- virtual Q_UINT32 nColorChannels() const;
- virtual Q_UINT32 nSubstanceChannels() const;
- virtual Q_UINT32 pixelSize() const;
+ virtual TQValueVector<KisChannelInfo *> channels() const;
+ virtual TQ_UINT32 nChannels() const;
+ virtual TQ_UINT32 nColorChannels() const;
+ virtual TQ_UINT32 nSubstanceChannels() const;
+ virtual TQ_UINT32 pixelSize() const;
- virtual QString channelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const;
- virtual QString normalisedChannelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const;
+ virtual TQString channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const;
+ virtual TQString normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const;
- virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height,
+ virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height,
KisProfile * dstProfile,
- Q_INT32 renderingIntent = INTENT_PERCEPTUAL,
+ TQ_INT32 renderingIntent = INTENT_PERCEPTUAL,
float exposure = 0.0f);
- virtual QValueList<KisFilter*> createBackgroundFilters();
+ virtual TQValueList<KisFilter*> createBackgroundFilters();
virtual KisCompositeOpList userVisiblecompositeOps() const;
@@ -162,15 +162,15 @@ public:
dst->w = src1->w + src2->w;
}
protected:
- virtual void bitBlt( Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+ virtual void bitBlt( TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op);
private:
@@ -180,15 +180,15 @@ private:
/// Convert a single pixel from its wet representation to rgb: internal rgb: rgb[0] = R, etc
typedef enum { RGB, BGR } RGBMode;
- void wet_composite(RGBMode m, Q_UINT8 *rgb, WetPix * wet);
+ void wet_composite(RGBMode m, TQ_UINT8 *rgb, WetPix * wet);
- void wet_render_wetness( Q_UINT8 * rgb, WetPack * pack);
+ void wet_render_wetness( TQ_UINT8 * rgb, WetPack * pack);
private:
- Q_UINT32 * wet_render_tab;
+ TQ_UINT32 * wet_render_tab;
- QStringList m_paintNames;
- QMap<int, WetPix> m_conversionMap;
+ TQStringList m_paintNames;
+ TQMap<int, WetPix> m_conversionMap;
bool m_paintwetness;
int phase, phasebig;
@@ -207,13 +207,13 @@ public:
/**
* lcms colorspace type definition.
*/
- virtual Q_UINT32 colorSpaceType() { return 0; };
+ virtual TQ_UINT32 colorSpaceType() { return 0; };
virtual icColorSpaceSignature colorSpaceSignature() { return icMaxEnumData; };
- virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisWetColorSpace(parent, p); };
+ virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisWetColorSpace(tqparent, p); };
- virtual QString defaultProfile() { return ""; };
+ virtual TQString defaultProfile() { return ""; };
};
#endif // KIS_STRATEGY_COLORSPACE_WET_H_
diff --git a/krita/colorspaces/wet/kis_wet_palette_widget.cc b/krita/colorspaces/wet/kis_wet_palette_widget.cc
index ae405f94..21876a39 100644
--- a/krita/colorspaces/wet/kis_wet_palette_widget.cc
+++ b/krita/colorspaces/wet/kis_wet_palette_widget.cc
@@ -19,18 +19,18 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qpushbutton.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qcolor.h>
-#include <qdrawutil.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qspinbox.h>
-#include <qstyle.h>
-#include <qtooltip.h>
+#include <tqpushbutton.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqcolor.h>
+#include <tqdrawutil.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqspinbox.h>
+#include <tqstyle.h>
+#include <tqtooltip.h>
#include <klocale.h>
#include <knuminput.h>
@@ -46,140 +46,140 @@
#include "kis_wet_colorspace.h"
#include "kis_wet_palette_widget.h"
-KisWetPaletteWidget::KisWetPaletteWidget(QWidget *parent, const char *name) : super(parent, name)
+KisWetPaletteWidget::KisWetPaletteWidget(TQWidget *tqparent, const char *name) : super(tqparent, name)
{
m_subject = 0;
- QVBoxLayout * vl = new QVBoxLayout(this, 0, -1, "main layout");
+ TQVBoxLayout * vl = new TQVBoxLayout(this, 0, -1, "main tqlayout");
- QGridLayout * l = new QGridLayout(vl, 2, 8, 2, "color wells grid");
+ TQGridLayout * l = new TQGridLayout(vl, 2, 8, 2, "color wells grid");
KisColorCup * b;
int WIDTH = 24;
int HEIGHT = 24;
b = new KisColorCup(this);
- b->setColor( QColor(240, 32, 160) );
+ b->setColor( TQColor(240, 32, 160) );
l->addWidget(b, 0, 0);
- QToolTip::add(b, i18n("Quinacridone Rose"));
+ TQToolTip::add(b, i18n("Quinacridone Rose"));
b->setFixedSize(WIDTH, HEIGHT);
- connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &)));
+ connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &)));
b = new KisColorCup(this);
- b->setColor(QColor(159, 88, 43));
+ b->setColor(TQColor(159, 88, 43));
l->addWidget(b, 0, 1);
- QToolTip::add(b,i18n("Indian Red"));
+ TQToolTip::add(b,i18n("Indian Red"));
b->setFixedSize(WIDTH, HEIGHT);
- connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &)));
+ connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &)));
b = new KisColorCup(this);
- b->setColor( QColor(254, 220, 64) );
+ b->setColor( TQColor(254, 220, 64) );
l->addWidget(b, 0, 2);
- QToolTip::add(b,i18n("Cadmium Yellow"));
+ TQToolTip::add(b,i18n("Cadmium Yellow"));
b->setFixedSize(WIDTH, HEIGHT);
- connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &)));
+ connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &)));
b = new KisColorCup(this);
- b->setColor(QColor(36, 180, 32));
+ b->setColor(TQColor(36, 180, 32));
l->addWidget(b, 0, 3);
- QToolTip::add(b,i18n("Hookers Green"));
+ TQToolTip::add(b,i18n("Hookers Green"));
b->setFixedSize(WIDTH, HEIGHT);
- connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &)));
+ connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &)));
b = new KisColorCup(this);
- b->setColor(QColor(16, 185, 215));
+ b->setColor(TQColor(16, 185, 215));
l->addWidget(b, 0, 4);
- QToolTip::add(b,i18n("Cerulean Blue"));
+ TQToolTip::add(b,i18n("Cerulean Blue"));
b->setFixedSize(WIDTH, HEIGHT);
- connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &)));
+ connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &)));
b = new KisColorCup(this);
- b->setColor(QColor(96, 32, 8));
+ b->setColor(TQColor(96, 32, 8));
l->addWidget(b, 0, 5);
- QToolTip::add(b,i18n("Burnt Umber"));
+ TQToolTip::add(b,i18n("Burnt Umber"));
b->setFixedSize(WIDTH, HEIGHT);
- connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &)));
+ connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &)));
b = new KisColorCup(this);
- b->setColor(QColor(254, 96, 8));
+ b->setColor(TQColor(254, 96, 8));
l->addWidget(b, 0, 6);
- QToolTip::add(b,i18n("Cadmium Red"));
+ TQToolTip::add(b,i18n("Cadmium Red"));
b->setFixedSize(WIDTH, HEIGHT);
- connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &)));
+ connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &)));
b = new KisColorCup(this);
- b->setColor(QColor(255, 136, 8));
+ b->setColor(TQColor(255, 136, 8));
l->addWidget(b, 0, 7);
- QToolTip::add(b,i18n("Brilliant Orange"));
+ TQToolTip::add(b,i18n("Brilliant Orange"));
b->setFixedSize(WIDTH, HEIGHT);
- connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &)));
+ connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &)));
b = new KisColorCup(this);
- b->setColor(QColor(240, 199, 8));
+ b->setColor(TQColor(240, 199, 8));
l->addWidget(b, 1, 0);
- QToolTip::add(b,i18n("Hansa Yellow"));
+ TQToolTip::add(b,i18n("Hansa Yellow"));
b->setFixedSize(WIDTH, HEIGHT);
- connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &)));
+ connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &)));
b = new KisColorCup(this);
- b->setColor(QColor(96, 170, 130));
+ b->setColor(TQColor(96, 170, 130));
l->addWidget(b, 1, 1);
- QToolTip::add(b,i18n("Phthalo Green"));
+ TQToolTip::add(b,i18n("Phthalo Green"));
b->setFixedSize(WIDTH, HEIGHT);
- connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &)));
+ connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &)));
b = new KisColorCup(this);
- b->setColor(QColor(48, 32, 170));
+ b->setColor(TQColor(48, 32, 170));
l->addWidget(b, 1, 2);
- QToolTip::add(b,i18n("French Ultramarine"));
+ TQToolTip::add(b,i18n("French Ultramarine"));
b->setFixedSize(WIDTH, HEIGHT);
- connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &)));
+ connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &)));
b = new KisColorCup(this);
- b->setColor(QColor(118, 16, 135));
+ b->setColor(TQColor(118, 16, 135));
l->addWidget(b, 1, 3);
- QToolTip::add(b,i18n("Interference Lilac"));
+ TQToolTip::add(b,i18n("Interference Lilac"));
b->setFixedSize(WIDTH, HEIGHT);
- connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &)));
+ connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &)));
b = new KisColorCup(this);
- b->setColor(QColor(254, 254, 254));
+ b->setColor(TQColor(254, 254, 254));
l->addWidget(b, 1, 4);
- QToolTip::add(b,i18n("Titanium White"));
+ TQToolTip::add(b,i18n("Titanium White"));
b->setFixedSize(WIDTH, HEIGHT);
- connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &)));
+ connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &)));
b = new KisColorCup(this);
- b->setColor(QColor(64, 64, 74));
+ b->setColor(TQColor(64, 64, 74));
l->addWidget(b, 1, 5);
- QToolTip::add(b,i18n("Ivory Black"));
+ TQToolTip::add(b,i18n("Ivory Black"));
b->setFixedSize(WIDTH, HEIGHT);
- connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &)));
+ connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &)));
b = new KisColorCup(this);
- b->setColor(QColor(255, 255, 255));
+ b->setColor(TQColor(255, 255, 255));
l->addWidget(b, 1, 6);
- QToolTip::add(b,i18n("Pure Water"));
+ TQToolTip::add(b,i18n("Pure Water"));
b->setFixedSize(WIDTH, HEIGHT);
- connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &)));
+ connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &)));
- QGridLayout * g2 = new QGridLayout(vl, 2, 2);
+ TQGridLayout * g2 = new TQGridLayout(vl, 2, 2);
- QLabel * label = new QLabel(i18n("Paint strength:"), this);
+ TQLabel * label = new TQLabel(i18n("Paint strength:"), this);
g2->addWidget(label, 0, 0);
m_strength = new KDoubleNumInput(0.0, 2.0, 1.0, 0.1, 1, this);
m_strength->setRange(0.0, 2.0, 0.1, true);
- connect(m_strength, SIGNAL(valueChanged(double)), this, SLOT(slotStrengthChanged(double)));
+ connect(m_strength, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotStrengthChanged(double)));
g2->addWidget(m_strength, 0, 1);
- label = new QLabel(i18n("Wetness:"), this);
+ label = new TQLabel(i18n("Wetness:"), this);
g2->addWidget(label, 1, 0);
m_wetness = new KIntNumInput(16, this);
- connect(m_wetness, SIGNAL(valueChanged(int)), this, SLOT(slotWetnessChanged(int)));
+ connect(m_wetness, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotWetnessChanged(int)));
m_wetness->setRange(0, 16, true);
g2->addWidget(m_wetness, 1, 1);
- g2->addItem(new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ g2->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
}
@@ -189,17 +189,17 @@ void KisWetPaletteWidget::update(KisCanvasSubject *subject)
}
-void KisWetPaletteWidget::slotFGColorSelected(const QColor& c)
+void KisWetPaletteWidget::slotFGColorSelected(const TQColor& c)
{
KisWetColorSpace* cs = dynamic_cast<KisWetColorSpace*>(KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("WET", ""), ""));
Q_ASSERT(cs);
WetPack pack;
- Q_UINT8* data = reinterpret_cast< Q_UINT8*>(&pack);
- cs->fromQColor(c, data);
+ TQ_UINT8* data = reinterpret_cast< TQ_UINT8*>(&pack);
+ cs->fromTQColor(c, data);
pack.paint.w = 15 * m_wetness->value();
// upscale from double to uint16:
- pack.paint.h = static_cast< Q_UINT16>(m_strength->value() * (double)(0xffff/2));
+ pack.paint.h = static_cast< TQ_UINT16>(m_strength->value() * (double)(0xffff/2));
KisColor color(data, cs);
if(m_subject)
@@ -219,7 +219,7 @@ void KisWetPaletteWidget::slotWetnessChanged(int n)
WetPack pack = *(reinterpret_cast<WetPack*>(color.data()));
pack.paint.w = 15 * n;
- color.setColor(reinterpret_cast< Q_UINT8*>(&pack), cs);
+ color.setColor(reinterpret_cast< TQ_UINT8*>(&pack), cs);
m_subject->setFGColor(color);
}
@@ -235,9 +235,9 @@ void KisWetPaletteWidget::slotStrengthChanged(double n)
KisColor color = m_subject->fgColor();
color.convertTo(cs);
WetPack pack = *(reinterpret_cast<WetPack*>(color.data()));
- pack.paint.h = static_cast< Q_UINT16>(n * (double)(0xffff/2)); // upscale from double to uint16
+ pack.paint.h = static_cast< TQ_UINT16>(n * (double)(0xffff/2)); // upscale from double to uint16
- color.setColor(reinterpret_cast< Q_UINT8*>(&pack), cs);
+ color.setColor(reinterpret_cast< TQ_UINT8*>(&pack), cs);
m_subject->setFGColor(color);
}
diff --git a/krita/colorspaces/wet/kis_wet_palette_widget.h b/krita/colorspaces/wet/kis_wet_palette_widget.h
index fb2800d3..10c177e6 100644
--- a/krita/colorspaces/wet/kis_wet_palette_widget.h
+++ b/krita/colorspaces/wet/kis_wet_palette_widget.h
@@ -19,8 +19,8 @@
#ifndef KIS_WET_PALETTE_WIDGET_H
#define KIS_WET_PALETTE_WIDGET_H
-#include "qwidget.h"
-#include "qpushbutton.h"
+#include "tqwidget.h"
+#include "tqpushbutton.h"
#include "kis_canvas_subject.h"
#include "kis_canvas_observer.h"
@@ -28,28 +28,29 @@
#include <koffice_export.h>
class KoFrameButton;
-class QGridLayout;
-class QColor;
-class QLabel;
-class QSpinBox;
-class QColor;
+class TQGridLayout;
+class TQColor;
+class TQLabel;
+class TQSpinBox;
+class TQColor;
class KIntNumInput;
class KDoubleNumInput;
class KRITAUI_EXPORT KisWetPaletteWidget
- : public QWidget,
+ : public TQWidget,
public KisCanvasObserver
{
Q_OBJECT
- typedef QWidget super;
+ TQ_OBJECT
+ typedef TQWidget super;
public:
- KisWetPaletteWidget(QWidget *parent = 0L, const char *name = 0);
+ KisWetPaletteWidget(TQWidget *tqparent = 0L, const char *name = 0);
virtual ~KisWetPaletteWidget() {}
protected slots:
- void slotFGColorSelected(const QColor& c);
+ void slotFGColorSelected(const TQColor& c);
void slotWetnessChanged(int);
void slotStrengthChanged(double);
diff --git a/krita/colorspaces/wet/kis_wetness_visualisation_filter.cc b/krita/colorspaces/wet/kis_wetness_visualisation_filter.cc
index 411a3495..53bff69e 100644
--- a/krita/colorspaces/wet/kis_wetness_visualisation_filter.cc
+++ b/krita/colorspaces/wet/kis_wetness_visualisation_filter.cc
@@ -32,7 +32,7 @@
WetnessVisualisationFilter::WetnessVisualisationFilter(KisView* view)
: m_view(view), m_action(0) {
- connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
+ connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()));
}
// XXX this needs to work on a per-layer basis!
diff --git a/krita/colorspaces/wet/kis_wetness_visualisation_filter.h b/krita/colorspaces/wet/kis_wetness_visualisation_filter.h
index ad5da5d3..55c1e817 100644
--- a/krita/colorspaces/wet/kis_wetness_visualisation_filter.h
+++ b/krita/colorspaces/wet/kis_wetness_visualisation_filter.h
@@ -21,15 +21,16 @@
#ifndef _WETNESS_VISUALISATION_FILTER_H
#define _WETNESS_VISUALISATION_FILTER_H
-#include <qobject.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqtimer.h>
#include <kactionclasses.h>
class KisView;
-class WetnessVisualisationFilter : public QObject
+class WetnessVisualisationFilter : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
WetnessVisualisationFilter(KisView* view);
virtual ~WetnessVisualisationFilter() {}
@@ -44,7 +45,7 @@ private slots:
private:
KisView * m_view;
KToggleAction * m_action;
- QTimer m_timer;
+ TQTimer m_timer;
};
#endif // _WETNESS_VISUALISATION_FILTER_H
diff --git a/krita/colorspaces/wet/kis_wetop.cc b/krita/colorspaces/wet/kis_wetop.cc
index cff3ac1e..70e07280 100644
--- a/krita/colorspaces/wet/kis_wetop.cc
+++ b/krita/colorspaces/wet/kis_wetop.cc
@@ -16,8 +16,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qrect.h>
-#include <qcheckbox.h>
+#include <tqrect.h>
+#include <tqcheckbox.h>
#include <kdebug.h>
@@ -36,10 +36,10 @@
#include "kis_wetop.h"
#include "kis_wet_colorspace.h"
-KisWetOpSettings::KisWetOpSettings(QWidget *parent)
- : super(parent)
+KisWetOpSettings::KisWetOpSettings(TQWidget *tqparent)
+ : super(tqparent)
{
- m_options = new WetPaintOptions(parent, "wet option widget");
+ m_options = new WetPaintOptions(tqparent, "wet option widget");
}
bool KisWetOpSettings::varySize() const
@@ -67,13 +67,13 @@ KisPaintOp * KisWetOpFactory::createOp(const KisPaintOpSettings *settings, KisPa
return op;
}
-KisPaintOpSettings* KisWetOpFactory::settings(QWidget * parent, const KisInputDevice& inputDevice)
+KisPaintOpSettings* KisWetOpFactory::settings(TQWidget * tqparent, const KisInputDevice& inputDevice)
{
if (inputDevice == KisInputDevice::mouse()) {
// No options for mouse, only tablet devices
return 0;
} else {
- return new KisWetOpSettings(parent);
+ return new KisWetOpSettings(tqparent);
}
}
@@ -120,8 +120,8 @@ void KisWetOp::paintAt(const KisPoint &pos, const KisPaintInformation& info)
dab = brush->image(KisMetaRegistry::instance()->csRegistry()->getAlpha8(), inf);
}
else {
- KisAlphaMaskSP mask = brush->mask(inf);
- dab = computeDab(mask, KisMetaRegistry::instance()->csRegistry()->getAlpha8());
+ KisAlphaMaskSP tqmask = brush->tqmask(inf);
+ dab = computeDab(tqmask, KisMetaRegistry::instance()->csRegistry()->getAlpha8());
}
KisColorSpace * cs = device->colorSpace();
@@ -143,7 +143,7 @@ void KisWetOp::paintAt(const KisPoint &pos, const KisPaintInformation& info)
// Get the paint info (we store the strength in the otherwise unused (?) height field of
// the paint
// double wetness = paint.w; // XXX: Was unused
- // strength is a double in the 0 - 2 range, but upscaled to Q_UINT16:
+ // strength is a double in the 0 - 2 range, but upscaled to TQ_UINT16:
//kdDebug() << "Original strength as in paint.h: " << paint.h << endl;
double strength = 2.0 * static_cast<double>(paint.h) / (double)(0xffff);
@@ -164,15 +164,15 @@ void KisWetOp::paintAt(const KisPoint &pos, const KisPaintInformation& info)
double eff_height;
double press, contact;
- int maskW = brush->maskWidth(inf);
- int maskH = brush->maskHeight(inf);
+ int tqmaskW = brush->tqmaskWidth(inf);
+ int tqmaskH = brush->tqmaskHeight(inf);
KoPoint dest = (pos - (brush->hotSpot(inf)));
int xStart = (int)dest.x();
int yStart = (int)dest.y();
- for (int y = 0; y < maskH; y++) {
- KisHLineIteratorPixel dabIt = dab->createHLineIterator(0, y, maskW, false);
- KisHLineIteratorPixel it = device->createHLineIterator(xStart, yStart+y, maskW, true);
+ for (int y = 0; y < tqmaskH; y++) {
+ KisHLineIteratorPixel dabIt = dab->createHLineIterator(0, y, tqmaskW, false);
+ KisHLineIteratorPixel it = device->createHLineIterator(xStart, yStart+y, tqmaskW, true);
while (!dabIt.isDone()) {
// This only does something with .paint, and not with adsorb.
@@ -226,5 +226,5 @@ void KisWetOp::paintAt(const KisPoint &pos, const KisPaintInformation& info)
}
}
- m_painter->addDirtyRect(QRect(xStart, yStart, maskW, maskH));
+ m_painter->addDirtyRect(TQRect(xStart, yStart, tqmaskW, tqmaskH));
}
diff --git a/krita/colorspaces/wet/kis_wetop.h b/krita/colorspaces/wet/kis_wetop.h
index cc488bf9..37cd594a 100644
--- a/krita/colorspaces/wet/kis_wetop.h
+++ b/krita/colorspaces/wet/kis_wetop.h
@@ -36,19 +36,19 @@ public:
virtual KisPaintOp * createOp(const KisPaintOpSettings *settings, KisPainter * painter);
virtual KisID id() { return KisID("wetbrush", i18n("Watercolor Brush")); }
virtual bool userVisible(KisColorSpace* cs) { return cs->id() == KisID("WET", ""); }
- virtual KisPaintOpSettings *settings(QWidget * parent, const KisInputDevice& inputDevice);
+ virtual KisPaintOpSettings *settings(TQWidget * tqparent, const KisInputDevice& inputDevice);
};
class KisWetOpSettings : public KisPaintOpSettings {
typedef KisPaintOpSettings super;
public:
- KisWetOpSettings(QWidget *parent);
+ KisWetOpSettings(TQWidget *tqparent);
bool varySize() const;
bool varyWetness() const;
bool varyStrength() const;
- virtual QWidget *widget() const { return m_options; }
+ virtual TQWidget *widget() const { return m_options; }
private:
WetPaintOptions *m_options;
diff --git a/krita/colorspaces/wet/wdgpressure.ui b/krita/colorspaces/wet/wdgpressure.ui
index 92161294..96727ff1 100644
--- a/krita/colorspaces/wet/wdgpressure.ui
+++ b/krita/colorspaces/wet/wdgpressure.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>WetPaintOptions</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>WetPaintOptions</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -27,7 +27,7 @@
<string>Pressure effects:</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkSize</cstring>
</property>
@@ -38,7 +38,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkWetness</cstring>
</property>
@@ -46,7 +46,7 @@
<string>Wetness</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkStrength</cstring>
</property>
@@ -56,5 +56,5 @@
</widget>
</hbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/krita/colorspaces/wet/wet_plugin.cc b/krita/colorspaces/wet/wet_plugin.cc
index cbb4787b..764d104e 100644
--- a/krita/colorspaces/wet/wet_plugin.cc
+++ b/krita/colorspaces/wet/wet_plugin.cc
@@ -20,13 +20,13 @@
#include <stdlib.h>
#include <vector>
-#include <qobject.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qdockwindow.h>
-#include <qpoint.h>
-#include <qlabel.h>
-#include <qwidget.h>
+#include <tqobject.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqdockwindow.h>
+#include <tqpoint.h>
+#include <tqlabel.h>
+#include <tqwidget.h>
#include <kactionclasses.h>
#include <klocale.h>
@@ -66,14 +66,14 @@ typedef KGenericFactory<WetPlugin> WetPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kritawetplugin, WetPluginFactory( "kritacore" ) )
-WetPlugin::WetPlugin(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+WetPlugin::WetPlugin(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(WetPluginFactory::instance());
// This is not a gui plugin; only load it when the doc is created.
- if ( parent->inherits("KisColorSpaceFactoryRegistry") ) {
- KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>(parent);
+ if ( tqparent->inherits("KisColorSpaceFactoryRegistry") ) {
+ KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>(tqparent);
KisColorSpace* colorSpaceWet = new KisWetColorSpace(f, 0);
@@ -97,16 +97,16 @@ WetPlugin::WetPlugin(QObject *parent, const char *name, const QStringList &)
// Texture Action:
f->addPaintDeviceAction(colorSpaceWet, new WetPaintDevAction);
}
- else if (parent->inherits("KisView"))
+ else if (tqparent->inherits("KisView"))
{
setInstance(WetPluginFactory::instance());
setXMLFile(locate("data","kritaplugins/wetplugin.rc"), true);
- m_view = dynamic_cast<KisView*>(parent);
+ m_view = dynamic_cast<KisView*>(tqparent);
// Wetness visualisation
WetnessVisualisationFilter * wf = new WetnessVisualisationFilter(m_view);
wf->setAction(new KToggleAction(i18n("Wetness Visualisation"), 0, 0, wf,
- SLOT(slotActivated()), actionCollection(), "wetnessvisualisation"));
+ TQT_SLOT(slotActivated()), actionCollection(), "wetnessvisualisation"));
// Create the wet palette
KisWetPaletteWidget * w = new KisWetPaletteWidget(m_view);
diff --git a/krita/colorspaces/wet/wet_plugin.h b/krita/colorspaces/wet/wet_plugin.h
index 117ee253..d2fdc083 100644
--- a/krita/colorspaces/wet/wet_plugin.h
+++ b/krita/colorspaces/wet/wet_plugin.h
@@ -32,8 +32,9 @@ class KisWetColorSpace;
class WetPlugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- WetPlugin(QObject *parent, const char *name, const QStringList &);
+ WetPlugin(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~WetPlugin();
private:
diff --git a/krita/colorspaces/wet/wetphysicsfilter.cc b/krita/colorspaces/wet/wetphysicsfilter.cc
index 195a17be..d63574fd 100644
--- a/krita/colorspaces/wet/wetphysicsfilter.cc
+++ b/krita/colorspaces/wet/wetphysicsfilter.cc
@@ -43,7 +43,7 @@
* [11:16] <CyrilleB> boud: which one then ?
* [11:16] <pippin> the error is distributed to the neighbour pixels (to the right, down and down to the left in pixels which have not yet been processed
* [11:16] <pippin> )
- * [11:16] <boud> CyrilleB: it's only apparent when you let something dry for some time, it looks like meandering snakes (like the old game "snake")
+ * [11:16] <boud> CyrilleB: it's only aptqparent when you let something dry for some time, it looks like meandering snakes (like the old game "snake")
* [11:16] <CyrilleB> pippin: somehow yes
* [11:16] <boud> pippin: that is possible
* [11:17] <pippin> boud: this leads to "bleeding" of data to the right and down,..
@@ -55,7 +55,7 @@
* [11:27] <boud> Well, I don't have time to investigate right now, but it sounds very plausible.
* [11:27] <CyrilleB> pippin: :)
* [11:28] <boud> of course, the code _is_ available :-)
- * [11:28] <pippin> if there is some form of diffusion matrix that is directional around the current pixel,. having that mask rotate depending on the modulus of the current iteration # should cancel such an effect out
+ * [11:28] <pippin> if there is some form of diffusion matrix that is directional around the current pixel,. having that tqmask rotate depending on the modulus of the current iteration # should cancel such an effect out
*/
WetPhysicsFilter::WetPhysicsFilter()
: KisFilter(id(), "artistic", i18n("Dry the Paint"))
@@ -63,7 +63,7 @@ WetPhysicsFilter::WetPhysicsFilter()
m_adsorbCount = 0;
}
-void WetPhysicsFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* /*config*/, const QRect& rect)
+void WetPhysicsFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* /*config*/, const TQRect& rect)
{
kdDebug() << "Physics processing " << src->name() << m_adsorbCount << endl;
// XXX: It would be nice be able to interleave this, instead of
@@ -79,7 +79,7 @@ void WetPhysicsFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFi
}
-void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, const QRect & r)
+void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, const TQRect & r)
{
/* XXX: Is this like a convolution operation? BSAR */
int width = r.width();
@@ -88,7 +88,7 @@ void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, cons
kdDebug() << "Flowing: " << r << endl;
/* width of a line in a layer in pixel units, not in bytes -- used to move to the next
- line in the fluid masks below */
+ line in the fluid tqmasks below */
int rs = width; // rowstride
double * flow_t = new double[width * height];
@@ -124,13 +124,13 @@ void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, cons
// We need three iterators, because we're working on a five-point convolution kernel (no corner pixels are being used)
// First iteration: compute fluid deposits around the paper.
- Q_INT32 dx, dy;
+ TQ_INT32 dx, dy;
dx = r.x();
dy = r.y();
int ix = width + 1; // keeps track where we are in the one-dimensional arrays
- for (Q_INT32 y2 = 1; y2 < height - 1; ++y2) {
+ for (TQ_INT32 y2 = 1; y2 < height - 1; ++y2) {
KisHLineIteratorPixel srcIt = src->createHLineIterator(dx, dy + y2, width, false);
KisHLineIteratorPixel upIt = src->createHLineIterator(dx + 1, dy + y2 - 1, width - 2, false);
KisHLineIteratorPixel downIt = src->createHLineIterator(dx + 1, dy + y2 + 1, width - 2, false);
@@ -181,7 +181,7 @@ void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, cons
// Second iteration: Reduce flow in dry areas
ix = width + 1;
- for (Q_INT32 y2 = 1; y2 < height - 1; ++y2) {
+ for (TQ_INT32 y2 = 1; y2 < height - 1; ++y2) {
KisHLineIteratorPixel srcIt = src->createHLineIterator(dx + 1, dy + y2, width - 2, false);
while (!srcIt.isDone()) {
if ((reinterpret_cast<WetPix*>(srcIt.rawData()))->w > 0) {
@@ -203,7 +203,7 @@ void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, cons
// Third iteration: Combine the paint from the flow areas.
ix = width + 1;
- for (Q_INT32 y2 = 1; y2 < height - 1; ++y2) {
+ for (TQ_INT32 y2 = 1; y2 < height - 1; ++y2) {
KisHLineIteratorPixel srcIt = src->createHLineIterator(dx, dy + y2, width, false);
KisHLineIteratorPixel upIt = src->createHLineIterator(dx + 1, dy + y2 - 1, width - 2, false);
KisHLineIteratorPixel downIt = src->createHLineIterator(dx + 1, dy + y2 + 1, width - 2, false);
@@ -255,14 +255,14 @@ void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, cons
delete[] outflow;
}
-void WetPhysicsFilter::dry(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect & r)
+void WetPhysicsFilter::dry(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect & r)
{
kdDebug () << "Drying " << r << endl;
- for (Q_INT32 y = 0; y < r.height(); y++) {
+ for (TQ_INT32 y = 0; y < r.height(); y++) {
KisHLineIteratorPixel srcIt = src->createHLineIterator(r.x(), r.y() + y, r.width(), false);
KisHLineIteratorPixel dstIt = dst->createHLineIterator(r.x(), r.y() + y, r.width(), true);
- Q_UINT16 w;
+ TQ_UINT16 w;
while (!srcIt.isDone()) {
// Two wet pixels in one KisWetColorSpace pixels.
@@ -284,10 +284,10 @@ void WetPhysicsFilter::dry(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRe
}
}
-void WetPhysicsFilter::adsorb(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, const QRect & r)
+void WetPhysicsFilter::adsorb(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, const TQRect & r)
{
kdDebug() << "Adsorbing " << r << endl;
- for (Q_INT32 y = 0; y < r.height(); y++) {
+ for (TQ_INT32 y = 0; y < r.height(); y++) {
KisHLineIteratorPixel srcIt = src->createHLineIterator(r.x(), r.y() + y, r.width(), true);
double ads;
@@ -296,7 +296,7 @@ void WetPhysicsFilter::adsorb(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, co
WetPixDbl wet_bot;
WetPack * pack;
- Q_UINT16 w;
+ TQ_UINT16 w;
while (!srcIt.isDone()) {
// Two wet pixels in one KisWetColorSpace pixels.
@@ -312,7 +312,7 @@ void WetPhysicsFilter::adsorb(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, co
}
else {
- ads = 0.5 / QMAX(w, 1);
+ ads = 0.5 / TQMAX(w, 1);
wetPixToDouble(&wet_top, paint);
wetPixToDouble(&wet_bot, adsorb);
@@ -320,12 +320,12 @@ void WetPhysicsFilter::adsorb(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, co
mergePixel(&wet_bot, &wet_top, ads, &wet_bot);
wetPixFromDouble(adsorb, &wet_bot);
- paint->rd = (Q_UINT16) (paint->rd*(1 - ads));
- paint->rw = (Q_UINT16) (paint->rw*(1 - ads));
- paint->gd = (Q_UINT16) (paint->gd*(1 - ads));
- paint->gw = (Q_UINT16) (paint->gw*(1 - ads));
- paint->bd = (Q_UINT16) (paint->bd*(1 - ads));
- paint->bw = (Q_UINT16) (paint->bw*(1 - ads));
+ paint->rd = (TQ_UINT16) (paint->rd*(1 - ads));
+ paint->rw = (TQ_UINT16) (paint->rw*(1 - ads));
+ paint->gd = (TQ_UINT16) (paint->gd*(1 - ads));
+ paint->gw = (TQ_UINT16) (paint->gw*(1 - ads));
+ paint->bd = (TQ_UINT16) (paint->bd*(1 - ads));
+ paint->bw = (TQ_UINT16) (paint->bw*(1 - ads));
++srcIt;
}
diff --git a/krita/colorspaces/wet/wetphysicsfilter.h b/krita/colorspaces/wet/wetphysicsfilter.h
index a02f8402..a461ab18 100644
--- a/krita/colorspaces/wet/wetphysicsfilter.h
+++ b/krita/colorspaces/wet/wetphysicsfilter.h
@@ -29,7 +29,7 @@
#include "kis_wet_colorspace.h"
class KisID;
-class QRect;
+class TQRect;
/**
@@ -46,7 +46,7 @@ class WetPhysicsFilter: public KisFilter
public:
WetPhysicsFilter();
public:
- virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect& r);
+ virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect& r);
static inline KisID id() { return KisID("wetphysics", i18n("Watercolor Physics Simulation Filter")); };
@@ -57,11 +57,11 @@ public:
private:
- void flow(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect & r);
- void dry(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect & r);
+ void flow(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect & r);
+ void dry(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect & r);
// Move stuff from the upperlayer to the lower layer. This is filter-level stuff.
- void adsorb(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect & r);
+ void adsorb(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect & r);
// NOTE: this does not set the height fields
void combinePixels (WetPixDbl *dst, WetPixDbl *src1, WetPixDbl *src2);
@@ -79,7 +79,7 @@ private:
private:
- Q_INT32 m_adsorbCount;
+ TQ_INT32 m_adsorbCount;
};
diff --git a/krita/colorspaces/wetsticky/brushop/kis_wsbrushop.cc b/krita/colorspaces/wetsticky/brushop/kis_wsbrushop.cc
index 50b8b4ca..8b182e08 100644
--- a/krita/colorspaces/wetsticky/brushop/kis_wsbrushop.cc
+++ b/krita/colorspaces/wetsticky/brushop/kis_wsbrushop.cc
@@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qrect.h>
+#include <tqrect.h>
#include <kdebug.h>
@@ -52,13 +52,13 @@ void KisWSBrushOp::paintAt(const KisPoint &pos,
{
// Painting should be implemented according to the following algorithm:
// retrieve brush
- // if brush == mask
- // retrieve mask
+ // if brush == tqmask
+ // retrieve tqmask
// else if brush == image
// retrieve image
- // subsample (mask | image) for position -- pos should be double!
- // apply filters to mask (colour | gradient | pattern | etc.
- // composite filtered mask into temporary layer
+ // subsample (tqmask | image) for position -- pos should be double!
+ // apply filters to tqmask (colour | gradient | pattern | etc.
+ // composite filtered tqmask into temporary layer
// composite temporary layer into target layer
// @see: doc/brush.txt
@@ -77,9 +77,9 @@ void KisWSBrushOp::paintAt(const KisPoint &pos,
// Split the coordinates into integer plus fractional parts. The integer
// is where the dab will be positioned and the fractional part determines
// the sub-pixel positioning.
- Q_INT32 x;
+ TQ_INT32 x;
double xFraction;
- Q_INT32 y;
+ TQ_INT32 y;
double yFraction;
splitCoordinate(pt.x(), &x, &xFraction);
@@ -91,13 +91,13 @@ void KisWSBrushOp::paintAt(const KisPoint &pos,
dab = brush -> image(device -> colorSpace(), pressure, xFraction, yFraction);
}
else {
- KisAlphaMaskSP mask = brush -> mask(pressure, xFraction, yFraction);
- dab = computeDab(mask);
+ KisAlphaMaskSP tqmask = brush -> tqmask(pressure, xFraction, yFraction);
+ dab = computeDab(tqmask);
}
m_painter -> setPressure(pressure);
- QRect dabRect = QRect(0, 0, brush -> maskWidth(pressure), brush -> maskHeight(pressure));
- QRect dstRect = QRect(x, y, dabRect.width(), dabRect.height());
+ TQRect dabRect = TQRect(0, 0, brush -> tqmaskWidth(pressure), brush -> tqmaskHeight(pressure));
+ TQRect dstRect = TQRect(x, y, dabRect.width(), dabRect.height());
KisImage * image = device -> image();
@@ -107,10 +107,10 @@ void KisWSBrushOp::paintAt(const KisPoint &pos,
if (dstRect.isNull() || dstRect.isEmpty() || !dstRect.isValid()) return;
- Q_INT32 sx = dstRect.x() - x;
- Q_INT32 sy = dstRect.y() - y;
- Q_INT32 sw = dstRect.width();
- Q_INT32 sh = dstRect.height();
+ TQ_INT32 sx = dstRect.x() - x;
+ TQ_INT32 sy = dstRect.y() - y;
+ TQ_INT32 sw = dstRect.width();
+ TQ_INT32 sh = dstRect.height();
m_painter -> bltSelection(dstRect.x(), dstRect.y(), m_painter -> compositeOp(), dab.data(), m_painter -> opacity(), sx, sy, sw, sh);
m_painter -> addDirtyRect(dstRect);
diff --git a/krita/colorspaces/wetsticky/brushop/kis_wsbrushop.h b/krita/colorspaces/wetsticky/brushop/kis_wsbrushop.h
index 34f50207..65f5fb6c 100644
--- a/krita/colorspaces/wetsticky/brushop/kis_wsbrushop.h
+++ b/krita/colorspaces/wetsticky/brushop/kis_wsbrushop.h
@@ -34,7 +34,7 @@ public:
virtual KisPaintOp * createOp(const KisPaintOpSettings *settings, KisPainter * painter);
virtual KisID id() { return KisID("wsbrush", i18n("Wet & Sticky Paintbrush")); }
- virtual QString pixmap() { return "wetpaintbrush.png"; }
+ virtual TQString pixmap() { return "wetpaintbrush.png"; }
};
class KisWSBrushOp : public KisPaintOp {
diff --git a/krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.cc b/krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.cc
index fe0e1eb4..83129296 100644
--- a/krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.cc
+++ b/krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.cc
@@ -36,13 +36,13 @@ typedef KGenericFactory<WSBrushPaintOpPlugin> WSBrushPaintOpPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kritawsbrushpaintop, WSBrushPaintOpPluginFactory( "kritacore" ) )
-WSBrushPaintOpPlugin::WSBrushPaintOpPlugin(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+WSBrushPaintOpPlugin::WSBrushPaintOpPlugin(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(WSBrushPaintOpPluginFactory::instance());
// This is not a gui plugin; only load it when the doc is created.
- if ( parent->inherits("KisFactory") )
+ if ( tqparent->inherits("KisFactory") )
{
KisPaintOpRegistry::instance() -> add ( new KisWSBrushOpFactory );
}
diff --git a/krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.h b/krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.h
index f668aabf..7e77afec 100644
--- a/krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.h
+++ b/krita/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.h
@@ -31,8 +31,9 @@ class KisView;
class WSBrushPaintOpPlugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- WSBrushPaintOpPlugin(QObject *parent, const char *name, const QStringList &);
+ WSBrushPaintOpPlugin(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~WSBrushPaintOpPlugin();
private:
diff --git a/krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.cc b/krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.cc
index c837a558..44426382 100644
--- a/krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.cc
+++ b/krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.cc
@@ -22,7 +22,7 @@
#include <config.h>
#include LCMS_HEADER
-#include <qimage.h>
+#include <tqimage.h>
#include <klocale.h>
#include <kdebug.h>
@@ -48,7 +48,7 @@ enum WetStickyChannelIndex {
HUE_CHANNEL_INDEX,
SATURATION_CHANNEL_INDEX,
LIGHTNESS_CHANNEL_INDEX,
- LIQUID_CONTENT_CHANNEL_INDEX,
+ LITQUID_CONTENT_CHANNEL_INDEX,
DRYING_RATE_CHANNEL_INDEX,
MISCIBILITY_CHANNEL_INDEX,
GRAVITATIONAL_DIRECTION_INDEX,
@@ -60,7 +60,7 @@ enum WetStickyChannelIndex {
KisWetStickyColorSpace::KisWetStickyColorSpace() :
KisAbstractColorSpace(KisID("W&S", i18n("Wet & Sticky")), 0, icMaxEnumData)
{
- Q_INT32 pos = 0;
+ TQ_INT32 pos = 0;
// Basic representational definition
m_channels.push_back(new KisChannelInfo(i18n("Blue"), "B", pos, COLOR, 1));
@@ -89,7 +89,7 @@ KisWetStickyColorSpace::KisWetStickyColorSpace() :
setDefaultProfile( 0 );
#ifdef WSDEBUG
- QValueVector<KisChannelInfo *>_it it;
+ TQValueVector<KisChannelInfo *>_it it;
int i = 0;
for (it = m_channels.begin(); it != m_channels.end(); ++it)
{
@@ -107,10 +107,10 @@ KisWetStickyColorSpace::~KisWetStickyColorSpace()
{
}
-void KisWetStickyColorSpace::fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile)
+void KisWetStickyColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile)
{
CELL_PTR p = (CELL_PTR) dst;
- Q_UINT8 r, g, b;
+ TQ_UINT8 r, g, b;
r = c.red();
g = c.green();
@@ -136,20 +136,20 @@ void KisWetStickyColorSpace::fromQColor(const QColor& c, Q_UINT8 *dst, KisProfil
#ifdef WSDEBUG
kdDebug(DBG_AREA_CMS) << "qcolor: "
<< " r: " << c.red() << " b: " << c.blue() << " g: " << c.red()
- << " native color: (" << QString().setNum(p->red) << ", "
- << QString().setNum(p->green) << ", "
- << QString().setNum(p->blue) << ", "
- << QString().setNum(p->alpha) << ") "
+ << " native color: (" << TQString().setNum(p->red) << ", "
+ << TQString().setNum(p->green) << ", "
+ << TQString().setNum(p->blue) << ", "
+ << TQString().setNum(p->alpha) << ") "
<< ", hls: (" << p->hue << ", "
<< p->lightness << ", "
<< p->saturation << ")\n";
#endif
}
-void KisWetStickyColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile)
+void KisWetStickyColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile)
{
CELL_PTR p = (CELL_PTR) dst;
- Q_UINT8 r, g, b;
+ TQ_UINT8 r, g, b;
r = c.red();
g = c.green();
@@ -174,17 +174,17 @@ void KisWetStickyColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT
#ifdef WSDEBUG
kdDebug(DBG_AREA_CMS) << "qcolor: "
<< " r: " << c.red() << " b: " << c.blue() << " g: " << c.red() << " opacity: " << opacity
- << " native color: (" << QString().setNum(p->red) << ", "
- << QString().setNum(p->green) << ", "
- << QString().setNum(p->blue) << ", "
- << QString().setNum(p->alpha) << ") "
+ << " native color: (" << TQString().setNum(p->red) << ", "
+ << TQString().setNum(p->green) << ", "
+ << TQString().setNum(p->blue) << ", "
+ << TQString().setNum(p->alpha) << ") "
<< ", hls: (" << p->hue << ", "
<< p->lightness << ", "
<< p->saturation << ")\n";
#endif
}
-void KisWetStickyColorSpace::toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile)
+void KisWetStickyColorSpace::toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile)
{
CELL_PTR p = (CELL_PTR) src;
@@ -196,7 +196,7 @@ void KisWetStickyColorSpace::toQColor(const Q_UINT8 *src, QColor *c, KisProfile
#endif
}
-void KisWetStickyColorSpace::toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile)
+void KisWetStickyColorSpace::toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile)
{
CELL_PTR p = (CELL_PTR) src;
@@ -213,26 +213,26 @@ void KisWetStickyColorSpace::toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *op
-KisPixelRO KisWetStickyColorSpace::toKisPixelRO(const Q_UINT8 *src, KisProfile * profile)
+KisPixelRO KisWetStickyColorSpace::toKisPixelRO(const TQ_UINT8 *src, KisProfile * profile)
{
return KisPixelRO (src, src, this, profile);
}
-KisPixel KisWetStickyColorSpace::toKisPixel(Q_UINT8 *src, KisProfile * profile)
+KisPixel KisWetStickyColorSpace::toKisPixel(TQ_UINT8 *src, KisProfile * profile)
{
return KisPixel (src, src, this, profile);
}
-void KisWetStickyColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const
+void KisWetStickyColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const
{
}
-Q_UINT8 KisWetStickyColorSpace::getAlpha(const Q_UINT8 *pixel) const
+TQ_UINT8 KisWetStickyColorSpace::getAlpha(const TQ_UINT8 *pixel) const
{
return ((CELL_PTR)pixel)->alpha;
}
-void KisWetStickyColorSpace::setAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) const
+void KisWetStickyColorSpace::setAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const
{
while (nPixels > 0) {
((CELL_PTR)pixels)->alpha = alpha;
@@ -241,26 +241,26 @@ void KisWetStickyColorSpace::setAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 n
}
}
-void KisWetStickyColorSpace::applyAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels)
+void KisWetStickyColorSpace::applyAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels)
{
}
-void KisWetStickyColorSpace::applyInverseAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels)
+void KisWetStickyColorSpace::applyInverseAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels)
{
}
-Q_UINT8 KisWetStickyColorSpace::scaleToU8(const Q_UINT8 * srcPixel, Q_INT32 channelPos)
+TQ_UINT8 KisWetStickyColorSpace::scaleToU8(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos)
{
return 0;
}
-Q_UINT16 KisWetStickyColorSpace::scaleToU16(const Q_UINT8 * srcPixel, Q_INT32 channelPos)
+TQ_UINT16 KisWetStickyColorSpace::scaleToU16(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos)
{
return 0;
}
-QValueVector<KisChannelInfo *> KisWetStickyColorSpace::channels() const
+TQValueVector<KisChannelInfo *> KisWetStickyColorSpace::channels() const
{
return m_channels;
}
@@ -270,46 +270,46 @@ bool KisWetStickyColorSpace::hasAlpha() const
return true;
}
-Q_INT32 KisWetStickyColorSpace::nChannels() const
+TQ_INT32 KisWetStickyColorSpace::nChannels() const
{
return 14;
}
-Q_INT32 KisWetStickyColorSpace::nColorChannels() const
+TQ_INT32 KisWetStickyColorSpace::nColorChannels() const
{
return 3;
}
-Q_INT32 KisWetStickyColorSpace::nSubstanceChannels() const
+TQ_INT32 KisWetStickyColorSpace::nSubstanceChannels() const
{
return 4;
}
-Q_INT32 KisWetStickyColorSpace::pixelSize() const
+TQ_INT32 KisWetStickyColorSpace::pixelSize() const
{
return sizeof(CELL);
}
-QImage KisWetStickyColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height,
+TQImage KisWetStickyColorSpace::convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height,
KisProfile * /*srcProfile*/, KisProfile * /*dstProfile*/,
- Q_INT32 /*renderingIntent*/, float /*exposure*/)
+ TQ_INT32 /*renderingIntent*/, float /*exposure*/)
{
- QImage img(width, height, 32, 0, QImage::LittleEndian);
+ TQImage img(width, height, 32, 0, TQImage::LittleEndian);
- Q_INT32 i = 0;
+ TQ_INT32 i = 0;
uchar *j = img.bits();
CELL_PTR p = (CELL_PTR) data;
while ( i < width * height) {
- const Q_UINT8 PIXEL_BLUE = 0;
- const Q_UINT8 PIXEL_GREEN = 1;
- const Q_UINT8 PIXEL_RED = 2;
- const Q_UINT8 PIXEL_ALPHA = 3;
+ const TQ_UINT8 PIXEL_BLUE = 0;
+ const TQ_UINT8 PIXEL_GREEN = 1;
+ const TQ_UINT8 PIXEL_RED = 2;
+ const TQ_UINT8 PIXEL_ALPHA = 3;
*( j + PIXEL_ALPHA ) = p -> alpha;
*( j + PIXEL_RED ) = p -> red;
@@ -323,17 +323,17 @@ QImage KisWetStickyColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 widt
return img;
}
-bool KisWetStickyColorSpace::convertPixelsTo(const Q_UINT8 * src, KisProfile * /*srcProfile*/,
- Q_UINT8 * dst, KisAbstractColorSpace * dstColorSpace, KisProfile * dstProfile,
- Q_UINT32 numPixels,
- Q_INT32 /*renderingIntent*/)
+bool KisWetStickyColorSpace::convertPixelsTo(const TQ_UINT8 * src, KisProfile * /*srcProfile*/,
+ TQ_UINT8 * dst, KisAbstractColorSpace * dstColorSpace, KisProfile * dstProfile,
+ TQ_UINT32 numPixels,
+ TQ_INT32 /*renderingIntent*/)
{
- Q_INT32 dSize = dstColorSpace -> pixelSize();
- Q_INT32 sSize = pixelSize();
+ TQ_INT32 dSize = dstColorSpace -> pixelSize();
+ TQ_INT32 sSize = pixelSize();
- Q_UINT32 j = 0;
- Q_UINT32 i = 0;
- QColor c;
+ TQ_UINT32 j = 0;
+ TQ_UINT32 i = 0;
+ TQColor c;
CELL_PTR cp;
while ( i < numPixels ) {
cp = (CELL_PTR) (src + i);
@@ -342,7 +342,7 @@ bool KisWetStickyColorSpace::convertPixelsTo(const Q_UINT8 * src, KisProfile *
cp -> green,
cp -> blue);
- dstColorSpace -> fromQColor(c, cp -> alpha, (dst + j), dstProfile);
+ dstColorSpace -> fromTQColor(c, cp -> alpha, (dst + j), dstProfile);
i += sSize;
j += dSize;
@@ -352,15 +352,15 @@ bool KisWetStickyColorSpace::convertPixelsTo(const Q_UINT8 * src, KisProfile *
}
-void KisWetStickyColorSpace::bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *mask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+void KisWetStickyColorSpace::bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *tqmask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op)
{
switch (op.op()) {
@@ -368,18 +368,18 @@ void KisWetStickyColorSpace::bitBlt(Q_UINT8 *dst,
// Undefined == no composition
break;
case COMPOSITE_OVER:
- compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COPY:
default:
- compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
+ compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity);
break;
}
}
-void KisWetStickyColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisWetStickyColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
// XXX: This is basically the same as with rgb and used to composite layers for Composition for
// painting works differently
@@ -387,11 +387,11 @@ void KisWetStickyColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- const Q_UINT8 *mask = maskRowStart;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
- Q_INT32 columns = numColumns;
+ TQ_INT32 columns = numColumns;
while (columns > 0) {
@@ -408,14 +408,14 @@ void KisWetStickyColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
#endif
- Q_UINT8 srcAlpha = srcCell->alpha;
+ TQ_UINT8 srcAlpha = srcCell->alpha;
- // apply the alphamask
- if(mask != 0)
+ // apply the alphatqmask
+ if(tqmask != 0)
{
- if(*mask != OPACITY_OPAQUE)
- srcAlpha = UINT8_MULT(srcAlpha, *mask);
- mask++;
+ if(*tqmask != OPACITY_OPAQUE)
+ srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
+ tqmask++;
}
if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -427,14 +427,14 @@ void KisWetStickyColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
if (srcAlpha == OPACITY_OPAQUE) {
memcpy(dst, src, 3); // XXX: First three bytes for rgb?
} else {
- Q_UINT8 dstAlpha = dstCell->alpha;
+ TQ_UINT8 dstAlpha = dstCell->alpha;
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha);
dstCell->alpha = newAlpha;
if (newAlpha != 0) {
@@ -461,17 +461,17 @@ void KisWetStickyColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowS
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart)
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart)
+ tqmaskRowStart += tqmaskRowStride;
}
}
-void KisWetStickyColorSpace::compositeCopy(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity)
+void KisWetStickyColorSpace::compositeCopy(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity)
{
- Q_INT32 linesize = sizeof(CELL) * columns;
- Q_UINT8 *d;
- const Q_UINT8 *s;
+ TQ_INT32 linesize = sizeof(CELL) * columns;
+ TQ_UINT8 *d;
+ const TQ_UINT8 *s;
d = dst;
s = src;
@@ -493,32 +493,32 @@ KisCompositeOpList KisWetStickyColorSpace::userVisiblecompositeOps() const
return list;
}
-QString KisWetStickyColorSpace::channelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const
+TQString KisWetStickyColorSpace::channelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const
{
Q_ASSERT(channelIndex < nChannels());
const CELL *pixel = reinterpret_cast<const CELL *>(U8_pixel);
switch (channelIndex) {
case BLUE_CHANNEL_INDEX:
- return QString().setNum(pixel -> blue);
+ return TQString().setNum(pixel -> blue);
case GREEN_CHANNEL_INDEX:
- return QString().setNum(pixel -> green);
+ return TQString().setNum(pixel -> green);
case RED_CHANNEL_INDEX:
- return QString().setNum(pixel -> red);
+ return TQString().setNum(pixel -> red);
case ALPHA_CHANNEL_INDEX:
- return QString().setNum(pixel -> alpha);
+ return TQString().setNum(pixel -> alpha);
case HUE_CHANNEL_INDEX:
- return QString().setNum(pixel -> hue);
+ return TQString().setNum(pixel -> hue);
case SATURATION_CHANNEL_INDEX:
- return QString().setNum(pixel -> saturation);
+ return TQString().setNum(pixel -> saturation);
case LIGHTNESS_CHANNEL_INDEX:
- return QString().setNum(pixel -> lightness);
- case LIQUID_CONTENT_CHANNEL_INDEX:
- return QString().setNum(pixel -> liquid_content);
+ return TQString().setNum(pixel -> lightness);
+ case LITQUID_CONTENT_CHANNEL_INDEX:
+ return TQString().setNum(pixel -> liquid_content);
case DRYING_RATE_CHANNEL_INDEX:
- return QString().setNum(pixel -> drying_rate);
+ return TQString().setNum(pixel -> drying_rate);
case MISCIBILITY_CHANNEL_INDEX:
- return QString().setNum(pixel -> miscibility);
+ return TQString().setNum(pixel -> miscibility);
case GRAVITATIONAL_DIRECTION_INDEX:
{
switch (pixel -> direction) {
@@ -532,22 +532,22 @@ QString KisWetStickyColorSpace::channelValueText(const Q_UINT8 *U8_pixel, Q_UINT
return i18n("Right");
default:
Q_ASSERT(false);
- return QString();
+ return TQString();
}
}
case GRAVITATIONAL_STRENGTH_CHANNEL_INDEX:
- return QString().setNum(pixel -> strength);
+ return TQString().setNum(pixel -> strength);
case ABSORBANCY_CHANNEL_INDEX:
- return QString().setNum(pixel -> absorbancy);
+ return TQString().setNum(pixel -> absorbancy);
case PAINT_VOLUME_CHANNEL_INDEX:
- return QString().setNum(pixel -> volume);
+ return TQString().setNum(pixel -> volume);
default:
Q_ASSERT(false);
- return QString();
+ return TQString();
}
}
-QString KisWetStickyColorSpace::normalisedChannelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const
+TQString KisWetStickyColorSpace::normalisedChannelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const
{
Q_ASSERT(channelIndex < nChannels());
const CELL *pixel = reinterpret_cast<const CELL *>(U8_pixel);
@@ -556,25 +556,25 @@ QString KisWetStickyColorSpace::normalisedChannelValueText(const Q_UINT8 *U8_pix
switch (channelIndex) {
case BLUE_CHANNEL_INDEX:
- return QString().setNum(static_cast<float>(pixel -> blue) / UINT8_MAX);
+ return TQString().setNum(static_cast<float>(pixel -> blue) / UINT8_MAX);
case GREEN_CHANNEL_INDEX:
- return QString().setNum(static_cast<float>(pixel -> green) / UINT8_MAX);
+ return TQString().setNum(static_cast<float>(pixel -> green) / UINT8_MAX);
case RED_CHANNEL_INDEX:
- return QString().setNum(static_cast<float>(pixel -> red) / UINT8_MAX);
+ return TQString().setNum(static_cast<float>(pixel -> red) / UINT8_MAX);
case ALPHA_CHANNEL_INDEX:
- return QString().setNum(static_cast<float>(pixel -> alpha) / UINT8_MAX);
+ return TQString().setNum(static_cast<float>(pixel -> alpha) / UINT8_MAX);
case HUE_CHANNEL_INDEX:
- return QString().setNum(pixel -> hue);
+ return TQString().setNum(pixel -> hue);
case SATURATION_CHANNEL_INDEX:
- return QString().setNum(pixel -> saturation);
+ return TQString().setNum(pixel -> saturation);
case LIGHTNESS_CHANNEL_INDEX:
- return QString().setNum(pixel -> lightness);
- case LIQUID_CONTENT_CHANNEL_INDEX:
- return QString().setNum(static_cast<float>(pixel -> liquid_content) / UINT8_MAX);
+ return TQString().setNum(pixel -> lightness);
+ case LITQUID_CONTENT_CHANNEL_INDEX:
+ return TQString().setNum(static_cast<float>(pixel -> liquid_content) / UINT8_MAX);
case DRYING_RATE_CHANNEL_INDEX:
- return QString().setNum(static_cast<float>(pixel -> drying_rate) / UINT8_MAX);
+ return TQString().setNum(static_cast<float>(pixel -> drying_rate) / UINT8_MAX);
case MISCIBILITY_CHANNEL_INDEX:
- return QString().setNum(static_cast<float>(pixel -> miscibility) / UINT8_MAX);
+ return TQString().setNum(static_cast<float>(pixel -> miscibility) / UINT8_MAX);
case GRAVITATIONAL_DIRECTION_INDEX:
{
switch (pixel -> direction) {
@@ -588,18 +588,18 @@ QString KisWetStickyColorSpace::normalisedChannelValueText(const Q_UINT8 *U8_pix
return i18n("Right");
default:
Q_ASSERT(false);
- return QString();
+ return TQString();
}
}
case GRAVITATIONAL_STRENGTH_CHANNEL_INDEX:
- return QString().setNum(static_cast<float>(pixel -> strength) / UINT8_MAX);
+ return TQString().setNum(static_cast<float>(pixel -> strength) / UINT8_MAX);
case ABSORBANCY_CHANNEL_INDEX:
- return QString().setNum(static_cast<float>(pixel -> absorbancy) / UINT8_MAX);
+ return TQString().setNum(static_cast<float>(pixel -> absorbancy) / UINT8_MAX);
case PAINT_VOLUME_CHANNEL_INDEX:
- return QString().setNum(static_cast<float>(pixel -> volume) / UINT8_MAX);
+ return TQString().setNum(static_cast<float>(pixel -> volume) / UINT8_MAX);
default:
Q_ASSERT(false);
- return QString();
+ return TQString();
}
}
diff --git a/krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.h b/krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.h
index 758cb57e..57f3ac70 100644
--- a/krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.h
+++ b/krita/colorspaces/wetsticky/kis_wet_sticky_colorspace.h
@@ -18,7 +18,7 @@
#ifndef KIS_COLORSPACE_WET_STICKY_H_
#define KIS_COLORSPACE_WET_STICKY_H_
-#include <qcolor.h>
+#include <tqcolor.h>
#include "kis_global.h"
#include "kis_abstract_colorspace.h"
@@ -44,24 +44,24 @@ namespace WetAndSticky {
* Defines the contents and attributes of a cell on the canvas.
*/
typedef struct cell {
- Q_UINT8 blue;
- Q_UINT8 green;
- Q_UINT8 red;
- Q_UINT8 alpha;
+ TQ_UINT8 blue;
+ TQ_UINT8 green;
+ TQ_UINT8 red;
+ TQ_UINT8 alpha;
float hue;
float saturation;
float lightness;
- Q_UINT8 liquid_content;
- Q_UINT8 drying_rate;
- Q_UINT8 miscibility;
+ TQ_UINT8 liquid_content;
+ TQ_UINT8 drying_rate;
+ TQ_UINT8 miscibility;
enumDirection direction;
- Q_UINT8 strength;
+ TQ_UINT8 strength;
- Q_UINT8 absorbancy; /* How much paint can this cell hold? */
- Q_UINT8 volume; /* The volume of paint. */
+ TQ_UINT8 absorbancy; /* How much paint can this cell hold? */
+ TQ_UINT8 volume; /* The volume of paint. */
} CELL, *CELL_PTR;
@@ -79,69 +79,69 @@ public:
- virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0);
- virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0);
+ virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0);
+ virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0);
- virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0);
- virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0);
+ virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0);
+ virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0);
- virtual Q_UINT8 getAlpha(const Q_UINT8 *pixel) const;
- virtual void setAlpha(Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) const;
+ virtual TQ_UINT8 getAlpha(const TQ_UINT8 *pixel) const;
+ virtual void setAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const;
- virtual void applyAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels);
- virtual void applyInverseAlphaU8Mask(Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels);
+ virtual void applyAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels);
+ virtual void applyInverseAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels);
- virtual Q_UINT8 scaleToU8(const Q_UINT8 * srcPixel, Q_INT32 channelPos);
- virtual Q_UINT16 scaleToU16(const Q_UINT8 * srcPixel, Q_INT32 channelPos);
+ virtual TQ_UINT8 scaleToU8(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos);
+ virtual TQ_UINT16 scaleToU16(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos);
- virtual QValueVector<KisChannelInfo *> channels() const;
+ virtual TQValueVector<KisChannelInfo *> channels() const;
virtual bool hasAlpha() const;
- virtual Q_INT32 nChannels() const;
- virtual Q_INT32 nColorChannels() const;
- virtual Q_INT32 nSubstanceChannels() const;
- virtual Q_INT32 pixelSize() const;
+ virtual TQ_INT32 nChannels() const;
+ virtual TQ_INT32 nColorChannels() const;
+ virtual TQ_INT32 nSubstanceChannels() const;
+ virtual TQ_INT32 pixelSize() const;
- virtual QString channelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const;
- virtual QString normalisedChannelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const;
+ virtual TQString channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const;
+ virtual TQString normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const;
- virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height,
+ virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height,
KisProfile * srcProfile, KisProfile * dstProfile,
- Q_INT32 renderingIntent = INTENT_PERCEPTUAL,
+ TQ_INT32 renderingIntent = INTENT_PERCEPTUAL,
float exposure = 0.0f);
- virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
- virtual void convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const;
- virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels);
- virtual void darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const;
+ virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const;
+ virtual void convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const;
+ virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels);
+ virtual void darken(const TQ_UINT8 * src, TQ_UINT8 * dst, TQ_INT32 shade, bool compensate, double compensation, TQ_INT32 nPixels) const;
virtual KisCompositeOpList userVisiblecompositeOps() const;
protected:
- virtual void bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowSize,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+ virtual void bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowSize,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op);
- virtual bool convertPixelsTo(const Q_UINT8 * src, KisProfile * srcProfile,
- Q_UINT8 * dst, KisAbstractColorSpace * dstColorSpace, KisProfile * dstProfile,
- Q_UINT32 numPixels,
- Q_INT32 renderingIntent = INTENT_PERCEPTUAL);
+ virtual bool convertPixelsTo(const TQ_UINT8 * src, KisProfile * srcProfile,
+ TQ_UINT8 * dst, KisAbstractColorSpace * dstColorSpace, KisProfile * dstProfile,
+ TQ_UINT32 numPixels,
+ TQ_INT32 renderingIntent = INTENT_PERCEPTUAL);
private:
- void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeClear(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeCopy(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
+ void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeClear(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeCopy(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
};
diff --git a/krita/colorspaces/wetsticky/kis_ws_engine_filter.cc b/krita/colorspaces/wetsticky/kis_ws_engine_filter.cc
index 365b5f2a..040d3002 100644
--- a/krita/colorspaces/wetsticky/kis_ws_engine_filter.cc
+++ b/krita/colorspaces/wetsticky/kis_ws_engine_filter.cc
@@ -19,10 +19,10 @@
#include <vector>
#include <math.h>
-#include <qpoint.h>
-#include <qspinbox.h>
-#include <qrect.h>
-#include <qcolor.h>
+#include <tqpoint.h>
+#include <tqspinbox.h>
+#include <tqrect.h>
+#include <tqcolor.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -66,37 +66,37 @@ KisWSEngineFilter::KisWSEngineFilter() : KisFilter(id(), "", i18n("&Wet & Sticky
* cell on the canvas to be visited. There is an even probability
* of each cell being visited.
*/
-QPoint next_cell(Q_UINT32 width, Q_UINT32 height)
+TQPoint next_cell(TQ_UINT32 width, TQ_UINT32 height)
{
- return QPoint(random() * width, random() * height);
+ return TQPoint(random() * width, random() * height);
}
-void single_step(KisColorSpace * cs, KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect & rect, bool native)
+void single_step(KisColorSpace * cs, KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect & rect, bool native)
{
using namespace WetAndSticky;
- QPoint p = next_cell( rect.width(), rect.height() );
+ TQPoint p = next_cell( rect.width(), rect.height() );
// XXX: We could optimize by randomly doing lines of 64 pixels
// -- maybe that would be enough to avoid the windscreen wiper
// effect.
KisHLineIterator iter = src -> createHLineIterator(p.x(), p.y(), 1, false);
- Q_UINT8 *orig = iter.rawData();
- Q_UINT8 *pix = orig;
+ TQ_UINT8 *orig = iter.rawData();
+ TQ_UINT8 *pix = orig;
if (!orig) return;
if (!native ) {
- QColor c;
- Q_UINT8 opacity;
+ TQColor c;
+ TQ_UINT8 opacity;
- src -> colorSpace() -> toQColor(pix, &c, &opacity);
- Q_UINT8 *pix = new Q_UINT8[sizeof( cell )];
+ src -> colorSpace() -> toTQColor(pix, &c, &opacity);
+ TQ_UINT8 *pix = new TQ_UINT8[sizeof( cell )];
Q_CHECK_PTR(pix);
- cs -> fromQColor(c, opacity, pix);
+ cs -> fromTQColor(c, opacity, pix);
}
// Process
@@ -110,7 +110,7 @@ void single_step(KisColorSpace * cs, KisPaintDeviceSP src, KisPaintDeviceSP dst
}
-void KisWSEngineFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const QRect& rect)
+void KisWSEngineFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const TQRect& rect)
{
m_src = src;
@@ -120,7 +120,7 @@ void KisWSEngineFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisF
kdDebug(DBG_AREA_FILTERS) << "WSEnginefilter called!\n";
- QTime t;
+ TQTime t;
t.restart();
// Two possibilities: we have our own, cool w&s pixel, and
@@ -134,7 +134,7 @@ void KisWSEngineFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisF
// XXX: We need a better way to ID color strategies
KisColorSpace * cs = KisColorSpaceRegistry::instance()->get("W&S");
- Q_UINT32 pixels = 400; //m_cfg -> pixels();
+ TQ_UINT32 pixels = 400; //m_cfg -> pixels();
kdDebug(DBG_AREA_FILTERS) << "Going to singlestep " << pixels << " pixels.\n";
@@ -145,7 +145,7 @@ void KisWSEngineFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisF
}
// Or not.
else {
- for ( Q_UINT32 i = 0; i < pixels; ++i ) {
+ for ( TQ_UINT32 i = 0; i < pixels; ++i ) {
single_step (cs, src, dst, rect, native);
}
}
@@ -153,15 +153,15 @@ void KisWSEngineFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisF
}
-KisFilterConfigWidget * KisWSEngineFilter::createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev)
+KisFilterConfigWidget * KisWSEngineFilter::createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev)
{
-// KisWSEngineFilterConfigurationWidget* kefcw = new KisWSEngineFilterConfigurationWidget(this,parent, "");
+// KisWSEngineFilterConfigurationWidget* kefcw = new KisWSEngineFilterConfigurationWidget(this,tqparent, "");
// kdDebug(DBG_AREA_FILTERS) << kefcw << endl;
// return kefcw ;
return 0;
}
-KisFilterConfiguration* KisWSEngineFilter::configuration(QWidget* nwidget, KisPaintDeviceSP dev)
+KisFilterConfiguration* KisWSEngineFilter::configuration(TQWidget* nwidget, KisPaintDeviceSP dev)
{
// KisWSEngineFilterConfigurationWidget* widget = (KisWSEngineFilterConfigurationWidget*) nwidget;
@@ -169,7 +169,7 @@ KisFilterConfiguration* KisWSEngineFilter::configuration(QWidget* nwidget, KisPa
// {
// return new KisWSEngineFilterConfiguration(30);
// } else {
-// Q_UINT32 depth = widget -> baseWidget() -> depthSpinBox -> value();
+// TQ_UINT32 depth = widget -> baseWidget() -> depthSpinBox -> value();
// return new KisWSEngineFilterConfiguration(depth);
// }
diff --git a/krita/colorspaces/wetsticky/kis_ws_engine_filter.h b/krita/colorspaces/wetsticky/kis_ws_engine_filter.h
index 5eb8ca81..d1c23810 100644
--- a/krita/colorspaces/wetsticky/kis_ws_engine_filter.h
+++ b/krita/colorspaces/wetsticky/kis_ws_engine_filter.h
@@ -31,13 +31,13 @@ public:
KisWSEngineFilterConfiguration() { m_pixels = 10000; }
- KisWSEngineFilterConfiguration(Q_UINT32 pixels = 0) { m_pixels = pixels; }
+ KisWSEngineFilterConfiguration(TQ_UINT32 pixels = 0) { m_pixels = pixels; }
- Q_UINT32 pixels() { return m_pixels; }
+ TQ_UINT32 pixels() { return m_pixels; }
private:
- Q_UINT32 m_pixels; // The number of pixels the filter should
+ TQ_UINT32 m_pixels; // The number of pixels the filter should
// move. 0 means keep running indefinitely
@@ -51,7 +51,7 @@ public:
KisWSEngineFilter();
- virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* cfg, const QRect& rc);
+ virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* cfg, const TQRect& rc);
static inline KisID id() { return KisID("Wet & Sticky Engine", i18n("Wet & Sticky")); };
virtual bool supportsPainting() { return false; }
@@ -59,8 +59,8 @@ public:
virtual bool supportsIncrementalPainting() { return false; }
public:
- virtual KisFilterConfigWidget * createConfigurationWidget(QWidget* parent, KisPaintDeviceSP dev);
- virtual KisFilterConfiguration* configuration(QWidget*, KisPaintDeviceSP dev);
+ virtual KisFilterConfigWidget * createConfigurationWidget(TQWidget* tqparent, KisPaintDeviceSP dev);
+ virtual KisFilterConfiguration* configuration(TQWidget*, KisPaintDeviceSP dev);
private:
@@ -70,7 +70,7 @@ private:
KisWSEngineFilterConfiguration * m_cfg;
KisPaintDeviceSP m_src;
KisPaintDeviceSP m_dst;
- QRect m_rect;
+ TQRect m_rect;
};
diff --git a/krita/colorspaces/wetsticky/wet_sticky_plugin.cc b/krita/colorspaces/wetsticky/wet_sticky_plugin.cc
index 858b4810..19752465 100644
--- a/krita/colorspaces/wetsticky/wet_sticky_plugin.cc
+++ b/krita/colorspaces/wetsticky/wet_sticky_plugin.cc
@@ -37,13 +37,13 @@ typedef KGenericFactory<WetStickyPlugin> WetStickyPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kritawsplugin, WetStickyPluginFactory( "kritacore" ) )
-WetStickyPlugin::WetStickyPlugin(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+WetStickyPlugin::WetStickyPlugin(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(WetStickyPluginFactory::instance());
// This is not a gui plugin; only load it when the doc is created.
- if ( parent->inherits("KisFactory") )
+ if ( tqparent->inherits("KisFactory") )
{
KisColorSpace * colorSpaceWS = new KisWetStickyColorSpace();
Q_CHECK_PTR(colorSpaceWS);
diff --git a/krita/colorspaces/wetsticky/wet_sticky_plugin.h b/krita/colorspaces/wetsticky/wet_sticky_plugin.h
index 35b8207c..fe981a59 100644
--- a/krita/colorspaces/wetsticky/wet_sticky_plugin.h
+++ b/krita/colorspaces/wetsticky/wet_sticky_plugin.h
@@ -32,8 +32,9 @@
class WetStickyPlugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- WetStickyPlugin(QObject *parent, const char *name, const QStringList &);
+ WetStickyPlugin(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~WetStickyPlugin();
};
diff --git a/krita/colorspaces/wetsticky/ws/GNU Public Licence.txt b/krita/colorspaces/wetsticky/ws/GNU Public Licence.txt
index a3f2100e..5e79907b 100644
--- a/krita/colorspaces/wetsticky/ws/GNU Public Licence.txt
+++ b/krita/colorspaces/wetsticky/ws/GNU Public Licence.txt
@@ -59,7 +59,7 @@ modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- 0. This License applies to any program or other work which contains
+ 0. This License applies to any program or other work which tqcontains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
@@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following:
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
+code means all the source code for all modules it tqcontains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
diff --git a/krita/colorspaces/wetsticky/ws/anim.c b/krita/colorspaces/wetsticky/ws/anim.c
index fed5379f..995a3dff 100644
--- a/krita/colorspaces/wetsticky/ws/anim.c
+++ b/krita/colorspaces/wetsticky/ws/anim.c
@@ -53,7 +53,7 @@ static Pixmap colour_pm[FRAME_LIMIT];
static GC gc;
static GC tmp_gc;
-static long mask;
+static long tqmask;
static XGCValues values;
Display *display;
@@ -117,14 +117,14 @@ char *argv[];
XSynchronize(display, True);
- mask = GCBackground| GCForeground| GCFunction;
+ tqmask = GCBackground| GCForeground| GCFunction;
values.function = GXcopy;
values.background = 0;
values.foreground = 1;
- gc = XtGetGC(colour_canvas, mask, &values);
+ gc = XtGetGC(colour_canvas, tqmask, &values);
diff --git a/krita/colorspaces/wetsticky/ws/canvas.c b/krita/colorspaces/wetsticky/ws/canvas.c
index d2e27cd1..77cfa17d 100644
--- a/krita/colorspaces/wetsticky/ws/canvas.c
+++ b/krita/colorspaces/wetsticky/ws/canvas.c
@@ -31,18 +31,18 @@ CELL canvas[CANVAS_WIDTH][CANVAS_HEIGHT];
/* This module maintains a list of the addresses of cells that have
been modified since the last redraw and therefore need updating.
- Points are added to this list by the need_to_repaint() routine
- and are removed by the next_cell_for_repaint() function. The
+ Points are added to this list by the need_to_tqrepaint() routine
+ and are removed by the next_cell_for_tqrepaint() function. The
pointer to the current tail of the list is updated by side-effect. */
-static POINT need_repainting[REDRAW_LIMIT];
+static POINT need_tqrepainting[REDRAW_LIMIT];
static int next_free = 0;
-static int next_to_repaint = 0;
+static int next_to_tqrepaint = 0;
/* *********************************************************************** */
-int number_of_repaints_needed()
-/* Returns the number of cells that need to be repainted. */
+int number_of_tqrepaints_needed()
+/* Returns the number of cells that need to be tqrepainted. */
{
return (next_free);
@@ -50,10 +50,10 @@ int number_of_repaints_needed()
/* *********************************************************************** */
-void need_to_repaint(point)
+void need_to_tqrepaint(point)
/* The cell at this location needs to be redrawn since it has
been altered. Scan the list to see if it is already
- scheduled for a repainting operation and only add it if
+ scheduled for a tqrepainting operation and only add it if
it is not there. */
POINT point;
@@ -62,7 +62,7 @@ POINT point;
int k;
- /* If the list is already full then simply ignore the repaint
+ /* If the list is already full then simply ignore the tqrepaint
request - it will get done eventually anyway. */
if (next_free == REDRAW_LIMIT) return;
@@ -70,43 +70,43 @@ POINT point;
/* Check whether this point is already on the list. */
for (k=0; k < next_free; k++) {
- if ((need_repainting[k].x == point.x) &&
- (need_repainting[k].y == point.y)) break;
+ if ((need_tqrepainting[k].x == point.x) &&
+ (need_tqrepainting[k].y == point.y)) break;
}
if (k < next_free) return; /* Already in the list. */
/* Add this new cell address to the end of the list. */
- need_repainting[next_free].x = point.x;
- need_repainting[next_free].y = point.y;
+ need_tqrepainting[next_free].x = point.x;
+ need_tqrepainting[next_free].y = point.y;
next_free++;
}
/* *********************************************************************** */
-void next_cell_for_repaint(cell, locus)
-/* This routine returns the next cell to be repainted, together with its
+void next_cell_for_tqrepaint(cell, locus)
+/* This routine returns the next cell to be tqrepainted, together with its
location on the canvas. This is determined by taking the next point
- from the need_repainting list and accessing its cell. If the list is
+ from the need_tqrepainting list and accessing its cell. If the list is
empty then return NIL.
- Note that the repainting operation will clear out the list before
+ Note that the tqrepainting operation will clear out the list before
any other new positions are added. */
CELL_PTR *cell;
POINT_PTR locus;
{
- if (next_to_repaint >= next_free) {
- next_to_repaint = next_free = 0;
+ if (next_to_tqrepaint >= next_free) {
+ next_to_tqrepaint = next_free = 0;
*(cell) = NIL;
return;
}
- *(cell) = get_cell(need_repainting[next_to_repaint]);
- locus->x = need_repainting[next_to_repaint].x;
- locus->y = need_repainting[next_to_repaint].y;
- next_to_repaint++;
+ *(cell) = get_cell(need_tqrepainting[next_to_tqrepaint]);
+ locus->x = need_tqrepainting[next_to_tqrepaint].x;
+ locus->y = need_tqrepainting[next_to_tqrepaint].y;
+ next_to_tqrepaint++;
}
/* *********************************************************************** */
diff --git a/krita/colorspaces/wetsticky/ws/canvas.h b/krita/colorspaces/wetsticky/ws/canvas.h
index 2df50140..c2f2bcbf 100644
--- a/krita/colorspaces/wetsticky/ws/canvas.h
+++ b/krita/colorspaces/wetsticky/ws/canvas.h
@@ -19,14 +19,14 @@ Wet and Sticky is free software; you can redistribute it and/or modify it under
*/
-extern int number_of_repaints_needed();
-/* Returns the number of cells needing to repainted. */
+extern int number_of_tqrepaints_needed();
+/* Returns the number of cells needing to tqrepainted. */
-extern void need_to_repaint (/* POINT */);
-/* Requests that the cell at the given point be repainted
+extern void need_to_tqrepaint (/* POINT */);
+/* Requests that the cell at the given point be tqrepainted
at the next update as it has been modified. */
-extern void next_cell_for_repaint (/* *CELL_PTR, POINT_PTR */);
+extern void next_cell_for_tqrepaint (/* *CELL_PTR, POINT_PTR */);
/* Returns a pointer to a cell that needs to be updated as well
as the location of that cell on the canvas. If there are
no more cells to be redrawn then the pointer will be NIL. */
diff --git a/krita/colorspaces/wetsticky/ws/cmap.c b/krita/colorspaces/wetsticky/ws/cmap.c
index 9e53b0ae..0f11eaf7 100644
--- a/krita/colorspaces/wetsticky/ws/cmap.c
+++ b/krita/colorspaces/wetsticky/ws/cmap.c
@@ -59,7 +59,7 @@ static Pixmap dryness_pm;
static GC gc;
static GC tmp_gc;
-static long mask;
+static long tqmask;
static XGCValues values;
static Colormap cmap;
@@ -216,7 +216,7 @@ Drawable win;
/* Fill a window with a solid, white rectangle */
{
XGCValues values;
-long mask;
+long tqmask;
values.background = colours[0].pixel;
values.foreground = colours[255].pixel;;
@@ -224,9 +224,9 @@ long mask;
values.function = GXclear;
- mask = GCBackground| GCForeground| GCFillStyle | GCFunction;
+ tqmask = GCBackground| GCForeground| GCFillStyle | GCFunction;
- tmp_gc = XtGetGC(top_level, mask, &values);
+ tmp_gc = XtGetGC(top_level, tqmask, &values);
XFillRectangle(XtDisplay(top_level), win, tmp_gc, 0, 0, 300, 300);
@@ -371,14 +371,14 @@ int height;
XInstallColormap(display, cmap);
- mask = GCBackground| GCForeground| GCFunction;
+ tqmask = GCBackground| GCForeground| GCFunction;
values.function = GXcopy;
values.background = colours[0].pixel;
values.foreground = colours[255].pixel;
- gc = XtGetGC(colour_canvas, mask, &values);
+ gc = XtGetGC(colour_canvas, tqmask, &values);
colour_pm = XCreatePixmap(XtDisplay(top_level),
XtWindow(colour_shell), width, height,
diff --git a/krita/colorspaces/wetsticky/ws/engine.c b/krita/colorspaces/wetsticky/ws/engine.c
index 19097d9f..2fb4917e 100644
--- a/krita/colorspaces/wetsticky/ws/engine.c
+++ b/krita/colorspaces/wetsticky/ws/engine.c
@@ -122,7 +122,7 @@ void donate_paint(source, srcLocus, amount, dest, destLocus)
to the destination cell. The destination cell must mix this
new paint with its existing paint to yield a new paint.
This routine is also responsible for recording which cells
- have been updated and so need repainting.
+ have been updated and so need tqrepainting.
A special case is recognised where the destination has not yet
had any paint applied. This causes the donated paint to become
@@ -192,7 +192,7 @@ int amount;
}
- need_to_repaint(destLocus);
+ need_to_tqrepaint(destLocus);
}
/* *********************************************************************** */
diff --git a/krita/colorspaces/wetsticky/ws/engine3.c b/krita/colorspaces/wetsticky/ws/engine3.c
index 03a7d4f3..9fd274cd 100644
--- a/krita/colorspaces/wetsticky/ws/engine3.c
+++ b/krita/colorspaces/wetsticky/ws/engine3.c
@@ -122,7 +122,7 @@ void donate_paint(source, srcLocus, amount, dest, destLocus)
to the destination cell. The destination cell must mix this
new paint with its existing paint to yield a new paint.
This routine is also responsible for recording which cells
- have been updated and so need repainting.
+ have been updated and so need tqrepainting.
A special case is recognised where the destination has not yet
had any paint applied. This causes the donated paint to become
@@ -191,7 +191,7 @@ int amount;
}
- need_to_repaint(destLocus);
+ need_to_tqrepaint(destLocus);
}
/* *********************************************************************** */
diff --git a/krita/colorspaces/wetsticky/ws/ogl_interface.c b/krita/colorspaces/wetsticky/ws/ogl_interface.c
index 76a552a9..953b10c8 100644
--- a/krita/colorspaces/wetsticky/ws/ogl_interface.c
+++ b/krita/colorspaces/wetsticky/ws/ogl_interface.c
@@ -255,7 +255,7 @@ void evolve_paint()
for (k=0; k < STEP_LIMIT; k++) single_step();
while (TRUE) {
- next_cell_for_repaint(&cell, &p);
+ next_cell_for_tqrepaint(&cell, &p);
if (cell == NIL) return;
paint_cell(cell, p.x, p.y);
glFlush();
diff --git a/krita/colorspaces/wetsticky/ws/x_interface.c b/krita/colorspaces/wetsticky/ws/x_interface.c
index f4cb4901..a8b54b3e 100644
--- a/krita/colorspaces/wetsticky/ws/x_interface.c
+++ b/krita/colorspaces/wetsticky/ws/x_interface.c
@@ -68,7 +68,7 @@ static Pixmap dryness_pm;
static GC gc;
static GC tmp_gc;
-static long mask;
+static long tqmask;
static XGCValues values;
static Colormap cmap;
@@ -272,7 +272,7 @@ Drawable win;
/* Fill a window with a solid, white rectangle */
{
XGCValues values;
-long mask;
+long tqmask;
values.background = colours[0].pixel;
values.foreground = colours[255].pixel;;
@@ -280,9 +280,9 @@ long mask;
values.function = GXclear;
- mask = GCBackground| GCForeground| GCFillStyle | GCFunction;
+ tqmask = GCBackground| GCForeground| GCFillStyle | GCFunction;
- tmp_gc = XtGetGC(top_level, mask, &values);
+ tmp_gc = XtGetGC(top_level, tqmask, &values);
XFillRectangle(XtDisplay(top_level), win, tmp_gc, 0, 0, 300, 300);
@@ -423,14 +423,14 @@ int height;
XInstallColormap(display, cmap);
- mask = GCBackground| GCForeground| GCFunction;
+ tqmask = GCBackground| GCForeground| GCFunction;
values.function = GXcopy;
values.background = colours[0].pixel;
values.foreground = colours[255].pixel;
- gc = XtGetGC(colour_canvas, mask, &values);
+ gc = XtGetGC(colour_canvas, tqmask, &values);
colour_pm = XCreatePixmap(XtDisplay(top_level),
XtWindow(colour_shell), width, height,
@@ -700,7 +700,7 @@ void evolve_paint()
for (k=0; k < STEP_LIMIT; k++) single_step();
while (TRUE) {
- next_cell_for_repaint(&cell, &p);
+ next_cell_for_tqrepaint(&cell, &p);
if (cell == NIL) return;
paint_cell(cell, p.x, p.y);
}
diff --git a/krita/colorspaces/wetsticky/wstool.ui b/krita/colorspaces/wetsticky/wstool.ui
index 4dab3233..2f95d18b 100644
--- a/krita/colorspaces/wetsticky/wstool.ui
+++ b/krita/colorspaces/wetsticky/wstool.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>WdgWSPaintOp</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>WdgWSPaintOp</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>grpGravity</cstring>
</property>
@@ -27,7 +27,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>chkGravity</cstring>
</property>
@@ -35,7 +35,7 @@
<string>Paint &amp;gravity</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>lblDirection</cstring>
</property>
@@ -46,7 +46,7 @@
<cstring>intDryingRate</cstring>
</property>
</widget>
- <widget class="QComboBox" row="1" column="1">
+ <widget class="TQComboBox" row="1" column="1">
<item>
<property name="text">
<string>Up</string>
@@ -71,7 +71,7 @@
<cstring>cmbGravitationalDirection</cstring>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>lblStrength</cstring>
</property>
@@ -92,7 +92,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQGroupBox" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>grpPaint</cstring>
</property>
@@ -103,7 +103,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>lblDryingRate</cstring>
</property>
@@ -114,7 +114,7 @@
<cstring>intDryingRate</cstring>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0" rowspan="2" colspan="4">
+ <widget class="TQCheckBox" row="1" column="0" rowspan="2" colspan="4">
<property name="name">
<cstring>chkLiquid</cstring>
</property>
@@ -152,7 +152,7 @@
<number>100</number>
</property>
</widget>
- <widget class="QLabel" row="3" column="0" rowspan="1" colspan="3">
+ <widget class="TQLabel" row="3" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>lblMiscibility</cstring>
</property>
@@ -165,7 +165,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="0" column="1">
+ <widget class="TQGroupBox" row="0" column="1">
<property name="name">
<cstring>grpSubstrate</cstring>
</property>
@@ -181,7 +181,7 @@
<cstring>intHeight</cstring>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>lblHeight</cstring>
</property>
@@ -203,7 +203,7 @@
<number>100</number>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>lblAbsorbency</cstring>
</property>
@@ -214,7 +214,7 @@
<cstring>intAbsorbency</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>lblColor</cstring>
</property>
@@ -225,7 +225,7 @@
<cstring>bnCanvasColor</cstring>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>chkCanvas</cstring>
</property>
@@ -250,7 +250,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
diff --git a/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.cc b/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.cc
index 3155457f..d8ea896b 100644
--- a/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.cc
+++ b/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.cc
@@ -19,22 +19,22 @@
#include "kis_ycbcr_u16_colorspace.h"
-#include <qimage.h>
+#include <tqimage.h>
#include <kis_integer_maths.h>
-const Q_INT32 MAX_CHANNEL_YCbCr = 3;
-const Q_INT32 MAX_CHANNEL_YCbCrA = 4;
+const TQ_INT32 MAX_CHANNEL_YCbCr = 3;
+const TQ_INT32 MAX_CHANNEL_YCbCrA = 4;
-KisYCbCrU16ColorSpace::KisYCbCrU16ColorSpace(KisColorSpaceFactoryRegistry* parent, KisProfile* /*p*/)
- : KisU16BaseColorSpace(KisID("YCbCrAU16", i18n("YCbCr (16-bit integer/channel)")), TYPE_YCbCr_16, icSigYCbCrData, parent, 0)
+KisYCbCrU16ColorSpace::KisYCbCrU16ColorSpace(KisColorSpaceFactoryRegistry* tqparent, KisProfile* /*p*/)
+ : KisU16BaseColorSpace(KisID("YCbCrAU16", i18n("YCbCr (16-bit integer/channel)")), TYPE_YCbCr_16, icSigYCbCrData, tqparent, 0)
{
- m_channels.push_back(new KisChannelInfo(i18n("Y"), "Y", PIXEL_Y * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16)));
- m_channels.push_back(new KisChannelInfo(i18n("Cb"), "Cb", PIXEL_Cb * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16)));
- m_channels.push_back(new KisChannelInfo(i18n("Cr"), "Cr", PIXEL_Cr * sizeof(Q_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(Q_UINT16)));
- m_channels.push_back(new KisChannelInfo(i18n("Alpha"), "A", PIXEL_ALPHA * sizeof(Q_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(Q_UINT16)));
+ m_channels.push_back(new KisChannelInfo(i18n("Y"), "Y", PIXEL_Y * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16)));
+ m_channels.push_back(new KisChannelInfo(i18n("Cb"), "Cb", PIXEL_Cb * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16)));
+ m_channels.push_back(new KisChannelInfo(i18n("Cr"), "Cr", PIXEL_Cr * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16)));
+ m_channels.push_back(new KisChannelInfo(i18n("Alpha"), "A", PIXEL_ALPHA * sizeof(TQ_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(TQ_UINT16)));
- m_alphaPos = PIXEL_ALPHA * sizeof(Q_UINT16);
+ m_alphaPos = PIXEL_ALPHA * sizeof(TQ_UINT16);
KisAbstractColorSpace::init();
}
@@ -43,7 +43,7 @@ KisYCbCrU16ColorSpace::~KisYCbCrU16ColorSpace()
{
}
-void KisYCbCrU16ColorSpace::setPixel(Q_UINT8 *dst, Q_UINT16 Y, Q_UINT16 Cb, Q_UINT16 Cr, Q_UINT16 alpha) const
+void KisYCbCrU16ColorSpace::setPixel(TQ_UINT8 *dst, TQ_UINT16 Y, TQ_UINT16 Cb, TQ_UINT16 Cr, TQ_UINT16 alpha) const
{
Pixel *dstPixel = reinterpret_cast<Pixel *>(dst);
@@ -53,7 +53,7 @@ void KisYCbCrU16ColorSpace::setPixel(Q_UINT8 *dst, Q_UINT16 Y, Q_UINT16 Cb, Q_UI
dstPixel->alpha = alpha;
}
-void KisYCbCrU16ColorSpace::getPixel(const Q_UINT8 *src, Q_UINT16 *Y, Q_UINT16 *Cb, Q_UINT16 *Cr, Q_UINT16 *alpha) const
+void KisYCbCrU16ColorSpace::getPixel(const TQ_UINT8 *src, TQ_UINT16 *Y, TQ_UINT16 *Cb, TQ_UINT16 *Cr, TQ_UINT16 *alpha) const
{
const Pixel *srcPixel = reinterpret_cast<const Pixel *>(src);
@@ -64,11 +64,11 @@ void KisYCbCrU16ColorSpace::getPixel(const Q_UINT8 *src, Q_UINT16 *Y, Q_UINT16 *
}
-void KisYCbCrU16ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfile * profile )
+void KisYCbCrU16ColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 *dstU8, KisProfile * profile )
{
if(getProfile())
{
- KisU16BaseColorSpace::fromQColor(c, dstU8, profile);
+ KisU16BaseColorSpace::fromTQColor(c, dstU8, profile);
} else {
Pixel *dst = reinterpret_cast<Pixel *>(dstU8);
dst->Y = computeY( c.red(), c.green(), c.blue());
@@ -77,11 +77,11 @@ void KisYCbCrU16ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfi
}
}
-void KisYCbCrU16ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dstU8, KisProfile * profile )
+void KisYCbCrU16ColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dstU8, KisProfile * profile )
{
if(getProfile())
{
- KisU16BaseColorSpace::fromQColor(c, opacity, dstU8, profile);
+ KisU16BaseColorSpace::fromTQColor(c, opacity, dstU8, profile);
} else {
Pixel *dst = reinterpret_cast<Pixel *>(dstU8);
dst->Y = computeY( c.red(), c.green(), c.blue());
@@ -91,11 +91,11 @@ void KisYCbCrU16ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8
}
}
-void KisYCbCrU16ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, KisProfile * profile)
+void KisYCbCrU16ColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, KisProfile * profile)
{
if(getProfile())
{
- KisU16BaseColorSpace::toQColor(srcU8, c, profile);
+ KisU16BaseColorSpace::toTQColor(srcU8, c, profile);
} else {
const Pixel *src = reinterpret_cast<const Pixel *>(srcU8);
@@ -103,11 +103,11 @@ void KisYCbCrU16ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, KisProfile
}
}
-void KisYCbCrU16ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opacity, KisProfile * profile)
+void KisYCbCrU16ColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile)
{
if(getProfile())
{
- KisU16BaseColorSpace::toQColor(srcU8, c, opacity, profile);
+ KisU16BaseColorSpace::toTQColor(srcU8, c, opacity, profile);
} else {
const Pixel *src = reinterpret_cast<const Pixel *>(srcU8);
c->setRgb(computeRed(src->Y,src->Cb,src->Cr) >> 8, computeGreen(src->Y,src->Cb,src->Cr) >> 8, computeBlue(src->Y,src->Cb,src->Cr) >> 8);
@@ -115,32 +115,32 @@ void KisYCbCrU16ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *o
}
}
-Q_UINT8 KisYCbCrU16ColorSpace::difference(const Q_UINT8 *src1U8, const Q_UINT8 *src2U8)
+TQ_UINT8 KisYCbCrU16ColorSpace::difference(const TQ_UINT8 *src1U8, const TQ_UINT8 *src2U8)
{
if(getProfile())
return KisU16BaseColorSpace::difference(src1U8, src2U8);
const Pixel *src1 = reinterpret_cast<const Pixel *>(src1U8);
const Pixel *src2 = reinterpret_cast<const Pixel *>(src2U8);
- return QMAX(QABS(src2->Y - src1->Y), QMAX(QABS(src2->Cb - src1->Cb), QABS(src2->Cr - src1->Cr))) >> 8;
+ return TQMAX(TQABS(src2->Y - src1->Y), TQMAX(TQABS(src2->Cb - src1->Cb), TQABS(src2->Cr - src1->Cr))) >> 8;
}
-void KisYCbCrU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const
+void KisYCbCrU16ColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const
{
- Q_UINT16 totalY = 0, totalCb = 0, totalCr = 0, newAlpha = 0;
+ TQ_UINT16 totalY = 0, totalCb = 0, totalCr = 0, newAlpha = 0;
while (nColors--)
{
const Pixel *pixel = reinterpret_cast<const Pixel *>(*colors);
- Q_UINT16 alpha = pixel->alpha;
+ TQ_UINT16 alpha = pixel->alpha;
float alphaTimesWeight = alpha * *weights;
- totalY += (Q_UINT16)(pixel->Y * alphaTimesWeight);
- totalCb += (Q_UINT16)(pixel->Cb * alphaTimesWeight);
- totalCr += (Q_UINT16)(pixel->Cr * alphaTimesWeight);
- newAlpha += (Q_UINT16)(alphaTimesWeight);
+ totalY += (TQ_UINT16)(pixel->Y * alphaTimesWeight);
+ totalCb += (TQ_UINT16)(pixel->Cb * alphaTimesWeight);
+ totalCr += (TQ_UINT16)(pixel->Cr * alphaTimesWeight);
+ newAlpha += (TQ_UINT16)(alphaTimesWeight);
weights++;
colors++;
@@ -161,38 +161,38 @@ void KisYCbCrU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *wei
dstPixel->Cr = totalCr;
}
-QValueVector<KisChannelInfo *> KisYCbCrU16ColorSpace::channels() const {
+TQValueVector<KisChannelInfo *> KisYCbCrU16ColorSpace::channels() const {
return m_channels;
}
-Q_UINT32 KisYCbCrU16ColorSpace::nChannels() const {
+TQ_UINT32 KisYCbCrU16ColorSpace::nChannels() const {
return MAX_CHANNEL_YCbCrA;
}
-Q_UINT32 KisYCbCrU16ColorSpace::nColorChannels() const {
+TQ_UINT32 KisYCbCrU16ColorSpace::nColorChannels() const {
return MAX_CHANNEL_YCbCr;
}
-Q_UINT32 KisYCbCrU16ColorSpace::pixelSize() const {
- return MAX_CHANNEL_YCbCrA * sizeof(Q_UINT16);
+TQ_UINT32 KisYCbCrU16ColorSpace::pixelSize() const {
+ return MAX_CHANNEL_YCbCrA * sizeof(TQ_UINT16);
}
-QImage KisYCbCrU16ColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, KisProfile * dstProfile, Q_INT32 renderingIntent, float exposure )
+TQImage KisYCbCrU16ColorSpace::convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * dstProfile, TQ_INT32 renderingIntent, float exposure )
{
if(getProfile())
- return KisU16BaseColorSpace::convertToQImage( data, width, height, dstProfile, renderingIntent, exposure);
+ return KisU16BaseColorSpace::convertToTQImage( data, width, height, dstProfile, renderingIntent, exposure);
- QImage img = QImage(width, height, 32, 0, QImage::LittleEndian);
+ TQImage img = TQImage(width, height, 32, 0, TQImage::LittleEndian);
img.setAlphaBuffer(true);
- Q_INT32 i = 0;
+ TQ_INT32 i = 0;
uchar *j = img.bits();
while ( i < width * height * MAX_CHANNEL_YCbCrA) {
- Q_UINT16 Y = *( data + i + PIXEL_Y );
- Q_UINT16 Cb = *( data + i + PIXEL_Cb );
- Q_UINT16 Cr = *( data + i + PIXEL_Cr );
+ TQ_UINT16 Y = *( data + i + PIXEL_Y );
+ TQ_UINT16 Cb = *( data + i + PIXEL_Cb );
+ TQ_UINT16 Cr = *( data + i + PIXEL_Cr );
*( j + 3) = *( data + i + PIXEL_ALPHA ) >> 8;
*( j + 2 ) = computeRed(Y,Cb,Cr) >> 8;
*( j + 1 ) = computeGreen(Y,Cb,Cr) >> 8;
@@ -204,47 +204,47 @@ QImage KisYCbCrU16ColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width
}
-void KisYCbCrU16ColorSpace::bitBlt(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *srcAlphaMask, Q_INT32 maskRowStride, Q_UINT8 opacity, Q_INT32 rows, Q_INT32 cols, const KisCompositeOp& op)
+void KisYCbCrU16ColorSpace::bitBlt(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *srcAlphaMask, TQ_INT32 tqmaskRowStride, TQ_UINT8 opacity, TQ_INT32 rows, TQ_INT32 cols, const KisCompositeOp& op)
{
switch (op.op()) {
case COMPOSITE_UNDEF:
// Undefined == no composition
break;
case COMPOSITE_OVER:
- compositeOver(dst, dstRowStride, src, srcRowStride, srcAlphaMask, maskRowStride, rows, cols, opacity);
+ compositeOver(dst, dstRowStride, src, srcRowStride, srcAlphaMask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COPY:
- compositeCopy(dst, dstRowStride, src, srcRowStride, srcAlphaMask, maskRowStride, rows, cols, opacity);
+ compositeCopy(dst, dstRowStride, src, srcRowStride, srcAlphaMask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
- compositeErase(dst, dstRowStride, src, srcRowStride, srcAlphaMask, maskRowStride, rows, cols, opacity);
+ compositeErase(dst, dstRowStride, src, srcRowStride, srcAlphaMask, tqmaskRowStride, rows, cols, opacity);
break;
default:
break;
}
}
-void KisYCbCrU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisYCbCrU16ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT16 *src = reinterpret_cast<const Q_UINT16 *>(srcRowStart);
- Q_UINT16 *dst = reinterpret_cast<Q_UINT16 *>(dstRowStart);
- const Q_UINT8 *mask = maskRowStart;
- Q_INT32 columns = numColumns;
+ const TQ_UINT16 *src = reinterpret_cast<const TQ_UINT16 *>(srcRowStart);
+ TQ_UINT16 *dst = reinterpret_cast<TQ_UINT16 *>(dstRowStart);
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
+ TQ_INT32 columns = numColumns;
while (columns > 0) {
- Q_UINT16 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT16 srcAlpha = src[PIXEL_ALPHA];
- // apply the alphamask
- if (mask != 0) {
- Q_UINT8 U8_mask = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ TQ_UINT8 U8_tqmask = *tqmask;
- if (U8_mask != OPACITY_OPAQUE) {
- srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask));
+ if (U8_tqmask != OPACITY_OPAQUE) {
+ srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask));
}
- mask++;
+ tqmask++;
}
if (srcAlpha != U16_OPACITY_TRANSPARENT) {
@@ -254,16 +254,16 @@ void KisYCbCrU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
}
if (srcAlpha == U16_OPACITY_OPAQUE) {
- memcpy(dst, src, MAX_CHANNEL_YCbCrA * sizeof(Q_UINT16));
+ memcpy(dst, src, MAX_CHANNEL_YCbCrA * sizeof(TQ_UINT16));
} else {
- Q_UINT16 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT16 dstAlpha = dst[PIXEL_ALPHA];
- Q_UINT16 srcBlend;
+ TQ_UINT16 srcBlend;
if (dstAlpha == U16_OPACITY_OPAQUE) {
srcBlend = srcAlpha;
} else {
- Q_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha);
+ TQ_UINT16 newAlpha = dstAlpha + UINT16_MULT(U16_OPACITY_OPAQUE - dstAlpha, srcAlpha);
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha != 0) {
@@ -274,7 +274,7 @@ void KisYCbCrU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
}
if (srcBlend == U16_OPACITY_OPAQUE) {
- memcpy(dst, src, MAX_CHANNEL_YCbCr * sizeof(Q_UINT16));
+ memcpy(dst, src, MAX_CHANNEL_YCbCr * sizeof(TQ_UINT16));
} else {
dst[PIXEL_Y] = UINT16_BLEND(src[PIXEL_Y], dst[PIXEL_Y], srcBlend);
dst[PIXEL_Cb] = UINT16_BLEND(src[PIXEL_Cb], dst[PIXEL_Cb], srcBlend);
@@ -291,32 +291,32 @@ void KisYCbCrU16ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowSt
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart) {
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart) {
+ tqmaskRowStart += tqmaskRowStride;
}
}
}
-void KisYCbCrU16ColorSpace::compositeErase(Q_UINT8 *dst, Q_INT32 dstRowSize, const Q_UINT8 *src, Q_INT32 srcRowSize, const Q_UINT8 *srcAlphaMask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 cols, Q_UINT8 /*opacity*/)
+void KisYCbCrU16ColorSpace::compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowSize, const TQ_UINT8 *src, TQ_INT32 srcRowSize, const TQ_UINT8 *srcAlphaMask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 cols, TQ_UINT8 /*opacity*/)
{
while (rows-- > 0)
{
const Pixel *s = reinterpret_cast<const Pixel *>(src);
Pixel *d = reinterpret_cast<Pixel *>(dst);
- const Q_UINT8 *mask = srcAlphaMask;
+ const TQ_UINT8 *tqmask = srcAlphaMask;
- for (Q_INT32 i = cols; i > 0; i--, s++, d++)
+ for (TQ_INT32 i = cols; i > 0; i--, s++, d++)
{
- Q_UINT16 srcAlpha = s->alpha;
+ TQ_UINT16 srcAlpha = s->alpha;
- // apply the alphamask
- if (mask != 0) {
- Q_UINT8 U8_mask = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ TQ_UINT8 U8_tqmask = *tqmask;
- if (U8_mask != OPACITY_OPAQUE) {
- srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_mask));
+ if (U8_tqmask != OPACITY_OPAQUE) {
+ srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_tqmask));
}
- mask++;
+ tqmask++;
}
d->alpha = UINT16_MULT(srcAlpha, d->alpha);
}
@@ -324,7 +324,7 @@ void KisYCbCrU16ColorSpace::compositeErase(Q_UINT8 *dst, Q_INT32 dstRowSize, con
dst += dstRowSize;
src += srcRowSize;
if(srcAlphaMask) {
- srcAlphaMask += maskRowStride;
+ srcAlphaMask += tqmaskRowStride;
}
}
}
diff --git a/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.h b/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.h
index b2dcd341..9ee173de 100644
--- a/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.h
+++ b/krita/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.h
@@ -31,91 +31,91 @@
class KisYCbCrU16ColorSpace : public KisU16BaseColorSpace
{
public:
- KisYCbCrU16ColorSpace(KisColorSpaceFactoryRegistry* parent, KisProfile* p);
+ KisYCbCrU16ColorSpace(KisColorSpaceFactoryRegistry* tqparent, KisProfile* p);
~KisYCbCrU16ColorSpace();
virtual bool willDegrade(ColorSpaceIndependence )
{
return false;
};
public:
- void setPixel(Q_UINT8 *pixel, Q_UINT16 Y, Q_UINT16 Cb, Q_UINT16 Cr, Q_UINT16 alpha) const;
- void getPixel(const Q_UINT8 *pixel, Q_UINT16 *Y, Q_UINT16 *Cb, Q_UINT16 *Cr, Q_UINT16 *alpha) const;
+ void setPixel(TQ_UINT8 *pixel, TQ_UINT16 Y, TQ_UINT16 Cb, TQ_UINT16 Cr, TQ_UINT16 alpha) const;
+ void getPixel(const TQ_UINT8 *pixel, TQ_UINT16 *Y, TQ_UINT16 *Cb, TQ_UINT16 *Cr, TQ_UINT16 *alpha) const;
- virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0);
- virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0);
+ virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0);
+ virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0);
- virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0);
- virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0);
+ virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0);
+ virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0);
- virtual Q_UINT8 difference(const Q_UINT8 *src1, const Q_UINT8 *src2);
- virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
+ virtual TQ_UINT8 difference(const TQ_UINT8 *src1, const TQ_UINT8 *src2);
+ virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const;
- virtual QValueVector<KisChannelInfo *> channels() const;
- virtual Q_UINT32 nChannels() const;
- virtual Q_UINT32 nColorChannels() const;
- virtual Q_UINT32 pixelSize() const;
+ virtual TQValueVector<KisChannelInfo *> channels() const;
+ virtual TQ_UINT32 nChannels() const;
+ virtual TQ_UINT32 nColorChannels() const;
+ virtual TQ_UINT32 pixelSize() const;
- virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height,
+ virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height,
KisProfile * dstProfile,
- Q_INT32 renderingIntent,
+ TQ_INT32 renderingIntent,
float exposure = 0.0f);
virtual KisCompositeOpList userVisiblecompositeOps() const;
protected:
- virtual void bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+ virtual void bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op);
- void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
+ void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
private:
-#define CLAMP_TO_16BITCHANNEL(a) CLAMP(a, 0, Q_UINT16_MAX)
- inline Q_UINT16 computeRed(Q_UINT16 Y, Q_UINT16 /*Cb*/, Q_UINT16 Cr)
+#define CLAMP_TO_16BITCHANNEL(a) CLAMP(a, 0, TQ_UINT16_MAX)
+ inline TQ_UINT16 computeRed(TQ_UINT16 Y, TQ_UINT16 /*Cb*/, TQ_UINT16 Cr)
{
- return (Q_UINT16)( CLAMP_TO_16BITCHANNEL( (Cr - 32768)* (2-2*LUMA_RED) + Y ) );
+ return (TQ_UINT16)( CLAMP_TO_16BITCHANNEL( (Cr - 32768)* (2-2*LUMA_RED) + Y ) );
}
- inline Q_UINT16 computeGreen(Q_UINT16 Y, Q_UINT16 Cb, Q_UINT16 Cr)
+ inline TQ_UINT16 computeGreen(TQ_UINT16 Y, TQ_UINT16 Cb, TQ_UINT16 Cr)
{
- return (Q_UINT16)( CLAMP_TO_16BITCHANNEL( (Y - LUMA_BLUE * computeBlue(Y,Cb,Cr) - LUMA_RED * computeRed(Y,Cb,Cr) ) / LUMA_GREEN ) );
+ return (TQ_UINT16)( CLAMP_TO_16BITCHANNEL( (Y - LUMA_BLUE * computeBlue(Y,Cb,Cr) - LUMA_RED * computeRed(Y,Cb,Cr) ) / LUMA_GREEN ) );
}
- inline Q_UINT16 computeBlue(Q_UINT16 Y, Q_UINT16 Cb, Q_UINT16 /*Cr*/)
+ inline TQ_UINT16 computeBlue(TQ_UINT16 Y, TQ_UINT16 Cb, TQ_UINT16 /*Cr*/)
{
- return (Q_UINT16)( CLAMP_TO_16BITCHANNEL( (Cb - 32768)*(2 - 2 * LUMA_BLUE) + Y) );
+ return (TQ_UINT16)( CLAMP_TO_16BITCHANNEL( (Cb - 32768)*(2 - 2 * LUMA_BLUE) + Y) );
}
- inline Q_UINT16 computeY( Q_UINT16 r, Q_UINT16 b, Q_UINT16 g)
+ inline TQ_UINT16 computeY( TQ_UINT16 r, TQ_UINT16 b, TQ_UINT16 g)
{
- return (Q_UINT16)( CLAMP_TO_16BITCHANNEL( LUMA_RED*r + LUMA_GREEN*g + LUMA_BLUE*b ) );
+ return (TQ_UINT16)( CLAMP_TO_16BITCHANNEL( LUMA_RED*r + LUMA_GREEN*g + LUMA_BLUE*b ) );
}
- inline Q_UINT16 computeCb( Q_UINT16 r, Q_UINT16 b, Q_UINT16 g)
+ inline TQ_UINT16 computeCb( TQ_UINT16 r, TQ_UINT16 b, TQ_UINT16 g)
{
- return (Q_UINT16)( CLAMP_TO_16BITCHANNEL( (b - computeY(r,g,b))/(2-2*LUMA_BLUE) + 32768) );
+ return (TQ_UINT16)( CLAMP_TO_16BITCHANNEL( (b - computeY(r,g,b))/(2-2*LUMA_BLUE) + 32768) );
}
- inline Q_UINT16 computeCr( Q_UINT16 r, Q_UINT16 b, Q_UINT16 g)
+ inline TQ_UINT16 computeCr( TQ_UINT16 r, TQ_UINT16 b, TQ_UINT16 g)
{
- return (Q_UINT8)( CLAMP_TO_16BITCHANNEL( (r - computeY(r,g,b))/(2-2*LUMA_RED) + 32768) );
+ return (TQ_UINT8)( CLAMP_TO_16BITCHANNEL( (r - computeY(r,g,b))/(2-2*LUMA_RED) + 32768) );
}
#undef CLAMP_TO_16BITCHANNEL
- static const Q_UINT8 PIXEL_Y = 0;
- static const Q_UINT8 PIXEL_Cb = 1;
- static const Q_UINT8 PIXEL_Cr = 2;
- static const Q_UINT8 PIXEL_ALPHA = 3;
+ static const TQ_UINT8 PIXEL_Y = 0;
+ static const TQ_UINT8 PIXEL_Cb = 1;
+ static const TQ_UINT8 PIXEL_Cr = 2;
+ static const TQ_UINT8 PIXEL_ALPHA = 3;
struct Pixel {
- Q_UINT16 Y;
- Q_UINT16 Cb;
- Q_UINT16 Cr;
- Q_UINT16 alpha;
+ TQ_UINT16 Y;
+ TQ_UINT16 Cb;
+ TQ_UINT16 Cr;
+ TQ_UINT16 alpha;
};
};
@@ -131,13 +131,13 @@ class KisYCbCrU16ColorSpaceFactory : public KisColorSpaceFactory
/**
* lcms colorspace type definition.
*/
- virtual Q_UINT32 colorSpaceType() { return TYPE_YCbCr_16; };
+ virtual TQ_UINT32 colorSpaceType() { return TYPE_YCbCr_16; };
virtual icColorSpaceSignature colorSpaceSignature() { return icSigYCbCrData; };
- virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisYCbCrU16ColorSpace(parent, p); };
+ virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisYCbCrU16ColorSpace(tqparent, p); };
- virtual QString defaultProfile() { return ""; };
+ virtual TQString defaultProfile() { return ""; };
};
diff --git a/krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.cc b/krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.cc
index 0ab9ed4b..f29f5603 100644
--- a/krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.cc
+++ b/krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.cc
@@ -33,14 +33,14 @@ typedef KGenericFactory<YCbCrU16Plugin> YCbCrU16PluginFactory;
K_EXPORT_COMPONENT_FACTORY( krita_ycbcr_u16_plugin, YCbCrU16PluginFactory( "krita" ) )
-YCbCrU16Plugin::YCbCrU16Plugin(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+YCbCrU16Plugin::YCbCrU16Plugin(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(YCbCrU16PluginFactory::instance());
- if ( parent->inherits("KisColorSpaceFactoryRegistry") )
+ if ( tqparent->inherits("KisColorSpaceFactoryRegistry") )
{
- KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );
+ KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( tqparent );
KisColorSpace * colorSpaceYCbCrU16 = new KisYCbCrU16ColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisYCbCrU16ColorSpaceFactory();
diff --git a/krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.h b/krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.h
index 3b079ee7..ceb8ec6f 100644
--- a/krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.h
+++ b/krita/colorspaces/ycbcr_u16/ycbcr_u16_plugin.h
@@ -27,8 +27,9 @@
class YCbCrU16Plugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- YCbCrU16Plugin(QObject *parent, const char *name, const QStringList &);
+ YCbCrU16Plugin(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~YCbCrU16Plugin();
};
diff --git a/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.cc b/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.cc
index 7c6707c5..9c7548bf 100644
--- a/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.cc
+++ b/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.cc
@@ -19,22 +19,22 @@
#include "kis_ycbcr_u8_colorspace.h"
-#include <qimage.h>
+#include <tqimage.h>
#include <kis_integer_maths.h>
-const Q_INT32 MAX_CHANNEL_YCbCr = 3;
-const Q_INT32 MAX_CHANNEL_YCbCrA = 4;
+const TQ_INT32 MAX_CHANNEL_YCbCr = 3;
+const TQ_INT32 MAX_CHANNEL_YCbCrA = 4;
-KisYCbCrU8ColorSpace::KisYCbCrU8ColorSpace(KisColorSpaceFactoryRegistry* parent, KisProfile* /*p*/)
- : KisU8BaseColorSpace(KisID("YCbCrAU8", i18n("YCbCr (8-bit integer/channel)")), TYPE_YCbCr_8, icSigYCbCrData, parent, 0)
+KisYCbCrU8ColorSpace::KisYCbCrU8ColorSpace(KisColorSpaceFactoryRegistry* tqparent, KisProfile* /*p*/)
+ : KisU8BaseColorSpace(KisID("YCbCrAU8", i18n("YCbCr (8-bit integer/channel)")), TYPE_YCbCr_8, icSigYCbCrData, tqparent, 0)
{
- m_channels.push_back(new KisChannelInfo(i18n("Y"), "Y", PIXEL_Y * sizeof(Q_UINT8), KisChannelInfo::COLOR, KisChannelInfo::UINT8, sizeof(Q_UINT8)));
- m_channels.push_back(new KisChannelInfo(i18n("Cb"), "Cb", PIXEL_Cb * sizeof(Q_UINT8), KisChannelInfo::COLOR, KisChannelInfo::UINT8, sizeof(Q_UINT8)));
- m_channels.push_back(new KisChannelInfo(i18n("Cr"), "Cr", PIXEL_Cr * sizeof(Q_UINT8), KisChannelInfo::COLOR, KisChannelInfo::UINT8, sizeof(Q_UINT8)));
- m_channels.push_back(new KisChannelInfo(i18n("Alpha"), "A", PIXEL_ALPHA * sizeof(Q_UINT8), KisChannelInfo::ALPHA, KisChannelInfo::UINT8, sizeof(Q_UINT8)));
+ m_channels.push_back(new KisChannelInfo(i18n("Y"), "Y", PIXEL_Y * sizeof(TQ_UINT8), KisChannelInfo::COLOR, KisChannelInfo::UINT8, sizeof(TQ_UINT8)));
+ m_channels.push_back(new KisChannelInfo(i18n("Cb"), "Cb", PIXEL_Cb * sizeof(TQ_UINT8), KisChannelInfo::COLOR, KisChannelInfo::UINT8, sizeof(TQ_UINT8)));
+ m_channels.push_back(new KisChannelInfo(i18n("Cr"), "Cr", PIXEL_Cr * sizeof(TQ_UINT8), KisChannelInfo::COLOR, KisChannelInfo::UINT8, sizeof(TQ_UINT8)));
+ m_channels.push_back(new KisChannelInfo(i18n("Alpha"), "A", PIXEL_ALPHA * sizeof(TQ_UINT8), KisChannelInfo::ALPHA, KisChannelInfo::UINT8, sizeof(TQ_UINT8)));
- m_alphaPos = PIXEL_ALPHA * sizeof(Q_UINT8);
+ m_alphaPos = PIXEL_ALPHA * sizeof(TQ_UINT8);
KisAbstractColorSpace::init();
}
@@ -43,7 +43,7 @@ KisYCbCrU8ColorSpace::~KisYCbCrU8ColorSpace()
{
}
-void KisYCbCrU8ColorSpace::setPixel(Q_UINT8 *dst, Q_UINT8 Y, Q_UINT8 Cb, Q_UINT8 Cr, Q_UINT8 alpha) const
+void KisYCbCrU8ColorSpace::setPixel(TQ_UINT8 *dst, TQ_UINT8 Y, TQ_UINT8 Cb, TQ_UINT8 Cr, TQ_UINT8 alpha) const
{
Pixel *dstPixel = reinterpret_cast<Pixel *>(dst);
@@ -53,7 +53,7 @@ void KisYCbCrU8ColorSpace::setPixel(Q_UINT8 *dst, Q_UINT8 Y, Q_UINT8 Cb, Q_UINT8
dstPixel->alpha = alpha;
}
-void KisYCbCrU8ColorSpace::getPixel(const Q_UINT8 *src, Q_UINT8 *Y, Q_UINT8 *Cb, Q_UINT8 *Cr, Q_UINT8 *alpha) const
+void KisYCbCrU8ColorSpace::getPixel(const TQ_UINT8 *src, TQ_UINT8 *Y, TQ_UINT8 *Cb, TQ_UINT8 *Cr, TQ_UINT8 *alpha) const
{
const Pixel *srcPixel = reinterpret_cast<const Pixel *>(src);
@@ -64,11 +64,11 @@ void KisYCbCrU8ColorSpace::getPixel(const Q_UINT8 *src, Q_UINT8 *Y, Q_UINT8 *Cb,
}
-void KisYCbCrU8ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfile * profile )
+void KisYCbCrU8ColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 *dstU8, KisProfile * profile )
{
if(getProfile())
{
- KisU8BaseColorSpace::fromQColor(c, dstU8, profile);
+ KisU8BaseColorSpace::fromTQColor(c, dstU8, profile);
} else {
Pixel *dst = reinterpret_cast<Pixel *>(dstU8);
dst->Y = computeY( c.red(), c.green(), c.blue());
@@ -77,11 +77,11 @@ void KisYCbCrU8ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfil
}
}
-void KisYCbCrU8ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dstU8, KisProfile * profile )
+void KisYCbCrU8ColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dstU8, KisProfile * profile )
{
if(getProfile())
{
- KisU8BaseColorSpace::fromQColor(c, opacity, dstU8, profile);
+ KisU8BaseColorSpace::fromTQColor(c, opacity, dstU8, profile);
} else {
Pixel *dst = reinterpret_cast<Pixel *>(dstU8);
dst->Y = computeY( c.red(), c.green(), c.blue());
@@ -91,11 +91,11 @@ void KisYCbCrU8ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8
}
}
-void KisYCbCrU8ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, KisProfile * profile)
+void KisYCbCrU8ColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, KisProfile * profile)
{
if(getProfile())
{
- KisU8BaseColorSpace::toQColor(srcU8, c, profile);
+ KisU8BaseColorSpace::toTQColor(srcU8, c, profile);
} else {
const Pixel *src = reinterpret_cast<const Pixel *>(srcU8);
@@ -103,11 +103,11 @@ void KisYCbCrU8ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, KisProfile
}
}
-void KisYCbCrU8ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opacity, KisProfile * profile)
+void KisYCbCrU8ColorSpace::toTQColor(const TQ_UINT8 *srcU8, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile)
{
if(getProfile())
{
- KisU8BaseColorSpace::toQColor(srcU8, c, opacity, profile);
+ KisU8BaseColorSpace::toTQColor(srcU8, c, opacity, profile);
} else {
const Pixel *src = reinterpret_cast<const Pixel *>(srcU8);
c->setRgb(computeRed(src->Y,src->Cb,src->Cr), computeGreen(src->Y,src->Cb,src->Cr), computeBlue(src->Y,src->Cb,src->Cr));
@@ -115,32 +115,32 @@ void KisYCbCrU8ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *op
}
}
-Q_UINT8 KisYCbCrU8ColorSpace::difference(const Q_UINT8 *src1U8, const Q_UINT8 *src2U8)
+TQ_UINT8 KisYCbCrU8ColorSpace::difference(const TQ_UINT8 *src1U8, const TQ_UINT8 *src2U8)
{
if(getProfile())
return KisU8BaseColorSpace::difference(src1U8, src2U8);
const Pixel *src1 = reinterpret_cast<const Pixel *>(src1U8);
const Pixel *src2 = reinterpret_cast<const Pixel *>(src2U8);
- return QMAX(QABS(src2->Y - src1->Y), QMAX(QABS(src2->Cb - src1->Cb), QABS(src2->Cr - src1->Cr)));
+ return TQMAX(TQABS(src2->Y - src1->Y), TQMAX(TQABS(src2->Cb - src1->Cb), TQABS(src2->Cr - src1->Cr)));
}
-void KisYCbCrU8ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const
+void KisYCbCrU8ColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const
{
- Q_UINT8 totalY = 0, totalCb = 0, totalCr = 0, newAlpha = 0;
+ TQ_UINT8 totalY = 0, totalCb = 0, totalCr = 0, newAlpha = 0;
while (nColors--)
{
const Pixel *pixel = reinterpret_cast<const Pixel *>(*colors);
- Q_UINT8 alpha = pixel->alpha;
+ TQ_UINT8 alpha = pixel->alpha;
float alphaTimesWeight = alpha * *weights;
- totalY += (Q_UINT8)(pixel->Y * alphaTimesWeight);
- totalCb += (Q_UINT8)(pixel->Cb * alphaTimesWeight);
- totalCr += (Q_UINT8)(pixel->Cr * alphaTimesWeight);
- newAlpha += (Q_UINT8)(alphaTimesWeight);
+ totalY += (TQ_UINT8)(pixel->Y * alphaTimesWeight);
+ totalCb += (TQ_UINT8)(pixel->Cb * alphaTimesWeight);
+ totalCr += (TQ_UINT8)(pixel->Cr * alphaTimesWeight);
+ newAlpha += (TQ_UINT8)(alphaTimesWeight);
weights++;
colors++;
@@ -161,38 +161,38 @@ void KisYCbCrU8ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weig
dstPixel->Cr = totalCr;
}
-QValueVector<KisChannelInfo *> KisYCbCrU8ColorSpace::channels() const {
+TQValueVector<KisChannelInfo *> KisYCbCrU8ColorSpace::channels() const {
return m_channels;
}
-Q_UINT32 KisYCbCrU8ColorSpace::nChannels() const {
+TQ_UINT32 KisYCbCrU8ColorSpace::nChannels() const {
return MAX_CHANNEL_YCbCrA;
}
-Q_UINT32 KisYCbCrU8ColorSpace::nColorChannels() const {
+TQ_UINT32 KisYCbCrU8ColorSpace::nColorChannels() const {
return MAX_CHANNEL_YCbCr;
}
-Q_UINT32 KisYCbCrU8ColorSpace::pixelSize() const {
- return MAX_CHANNEL_YCbCrA*sizeof(Q_UINT8);
+TQ_UINT32 KisYCbCrU8ColorSpace::pixelSize() const {
+ return MAX_CHANNEL_YCbCrA*sizeof(TQ_UINT8);
}
-QImage KisYCbCrU8ColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, KisProfile * dstProfile, Q_INT32 renderingIntent, float exposure )
+TQImage KisYCbCrU8ColorSpace::convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * dstProfile, TQ_INT32 renderingIntent, float exposure )
{
if(getProfile())
- return KisU8BaseColorSpace::convertToQImage( data, width, height, dstProfile, renderingIntent, exposure);
+ return KisU8BaseColorSpace::convertToTQImage( data, width, height, dstProfile, renderingIntent, exposure);
- QImage img = QImage(width, height, 32, 0, QImage::LittleEndian);
+ TQImage img = TQImage(width, height, 32, 0, TQImage::LittleEndian);
img.setAlphaBuffer(true);
- Q_INT32 i = 0;
+ TQ_INT32 i = 0;
uchar *j = img.bits();
while ( i < width * height * MAX_CHANNEL_YCbCrA) {
- Q_UINT8 Y = *( data + i + PIXEL_Y );
- Q_UINT8 Cb = *( data + i + PIXEL_Cb );
- Q_UINT8 Cr = *( data + i + PIXEL_Cr );
+ TQ_UINT8 Y = *( data + i + PIXEL_Y );
+ TQ_UINT8 Cb = *( data + i + PIXEL_Cb );
+ TQ_UINT8 Cr = *( data + i + PIXEL_Cr );
*( j + 3) = *( data + i + PIXEL_ALPHA );
*( j + 2 ) = computeRed(Y,Cb,Cr);
*( j + 1 ) = computeGreen(Y,Cb,Cr);
@@ -204,45 +204,45 @@ QImage KisYCbCrU8ColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width,
}
-void KisYCbCrU8ColorSpace::bitBlt(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *srcAlphaMask, Q_INT32 maskRowStride, Q_UINT8 opacity, Q_INT32 rows, Q_INT32 cols, const KisCompositeOp& op)
+void KisYCbCrU8ColorSpace::bitBlt(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *srcAlphaMask, TQ_INT32 tqmaskRowStride, TQ_UINT8 opacity, TQ_INT32 rows, TQ_INT32 cols, const KisCompositeOp& op)
{
switch (op.op()) {
case COMPOSITE_UNDEF:
// Undefined == no composition
break;
case COMPOSITE_OVER:
- compositeOver(dst, dstRowStride, src, srcRowStride, srcAlphaMask, maskRowStride, rows, cols, opacity);
+ compositeOver(dst, dstRowStride, src, srcRowStride, srcAlphaMask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COPY:
- compositeCopy(dst, dstRowStride, src, srcRowStride, srcAlphaMask, maskRowStride, rows, cols, opacity);
+ compositeCopy(dst, dstRowStride, src, srcRowStride, srcAlphaMask, tqmaskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
- compositeErase(dst, dstRowStride, src, srcRowStride, srcAlphaMask, maskRowStride, rows, cols, opacity);
+ compositeErase(dst, dstRowStride, src, srcRowStride, srcAlphaMask, tqmaskRowStride, rows, cols, opacity);
break;
default:
break;
}
}
-void KisYCbCrU8ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 *maskRowStart, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 opacity)
+void KisYCbCrU8ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity)
{
while (rows > 0) {
- const Q_UINT8 *src = srcRowStart;
- Q_UINT8 *dst = dstRowStart;
- const Q_UINT8 *mask = maskRowStart;
- Q_INT32 columns = numColumns;
+ const TQ_UINT8 *src = srcRowStart;
+ TQ_UINT8 *dst = dstRowStart;
+ const TQ_UINT8 *tqmask = tqmaskRowStart;
+ TQ_INT32 columns = numColumns;
while (columns > 0) {
- Q_UINT8 srcAlpha = src[PIXEL_ALPHA];
+ TQ_UINT8 srcAlpha = src[PIXEL_ALPHA];
- // apply the alphamask
- if (mask != 0) {
- if (*mask != OPACITY_OPAQUE) {
- srcAlpha *= *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ if (*tqmask != OPACITY_OPAQUE) {
+ srcAlpha *= *tqmask;
}
- mask++;
+ tqmask++;
}
if (srcAlpha > OPACITY_TRANSPARENT) {
@@ -252,16 +252,16 @@ void KisYCbCrU8ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
}
if (srcAlpha == OPACITY_OPAQUE) {
- memcpy(dst, src, MAX_CHANNEL_YCbCrA * sizeof(Q_UINT8));
+ memcpy(dst, src, MAX_CHANNEL_YCbCrA * sizeof(TQ_UINT8));
} else {
- Q_UINT8 dstAlpha = dst[PIXEL_ALPHA];
+ TQ_UINT8 dstAlpha = dst[PIXEL_ALPHA];
- Q_UINT8 srcBlend;
+ TQ_UINT8 srcBlend;
if (dstAlpha == OPACITY_OPAQUE ) {
srcBlend = srcAlpha;
} else {
- Q_UINT8 newAlpha = dstAlpha + (OPACITY_OPAQUE - dstAlpha) * srcAlpha;
+ TQ_UINT8 newAlpha = dstAlpha + (OPACITY_OPAQUE - dstAlpha) * srcAlpha;
dst[PIXEL_ALPHA] = newAlpha;
if (newAlpha > 0) {
@@ -272,7 +272,7 @@ void KisYCbCrU8ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
}
if (srcBlend == OPACITY_OPAQUE) {
- memcpy(dst, src, MAX_CHANNEL_YCbCr * sizeof(Q_UINT8));
+ memcpy(dst, src, MAX_CHANNEL_YCbCr * sizeof(TQ_UINT8));
} else {
dst[PIXEL_Y] = UINT8_BLEND(src[PIXEL_Y], dst[PIXEL_Y], srcBlend);
dst[PIXEL_Cb] = UINT8_BLEND(src[PIXEL_Cb], dst[PIXEL_Cb], srcBlend);
@@ -289,30 +289,30 @@ void KisYCbCrU8ColorSpace::compositeOver(Q_UINT8 *dstRowStart, Q_INT32 dstRowStr
rows--;
srcRowStart += srcRowStride;
dstRowStart += dstRowStride;
- if(maskRowStart) {
- maskRowStart += maskRowStride;
+ if(tqmaskRowStart) {
+ tqmaskRowStart += tqmaskRowStride;
}
}
}
-void KisYCbCrU8ColorSpace::compositeErase(Q_UINT8 *dst, Q_INT32 dstRowSize, const Q_UINT8 *src, Q_INT32 srcRowSize, const Q_UINT8 *srcAlphaMask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 cols, Q_UINT8 /*opacity*/)
+void KisYCbCrU8ColorSpace::compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowSize, const TQ_UINT8 *src, TQ_INT32 srcRowSize, const TQ_UINT8 *srcAlphaMask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 cols, TQ_UINT8 /*opacity*/)
{
while (rows-- > 0)
{
const Pixel *s = reinterpret_cast<const Pixel *>(src);
Pixel *d = reinterpret_cast<Pixel *>(dst);
- const Q_UINT8 *mask = srcAlphaMask;
+ const TQ_UINT8 *tqmask = srcAlphaMask;
- for (Q_INT32 i = cols; i > 0; i--, s++, d++)
+ for (TQ_INT32 i = cols; i > 0; i--, s++, d++)
{
- Q_UINT8 srcAlpha = s -> alpha;
+ TQ_UINT8 srcAlpha = s -> alpha;
- // apply the alphamask
- if (mask != 0) {
- if (*mask != OPACITY_OPAQUE) {
- srcAlpha = *mask;
+ // apply the alphatqmask
+ if (tqmask != 0) {
+ if (*tqmask != OPACITY_OPAQUE) {
+ srcAlpha = *tqmask;
}
- mask++;
+ tqmask++;
}
d -> alpha = srcAlpha * d -> alpha;
}
@@ -320,12 +320,12 @@ void KisYCbCrU8ColorSpace::compositeErase(Q_UINT8 *dst, Q_INT32 dstRowSize, cons
dst += dstRowSize;
src += srcRowSize;
if(srcAlphaMask) {
- srcAlphaMask += maskRowStride;
+ srcAlphaMask += tqmaskRowStride;
}
}
}
-void KisYCbCrU8ColorSpace::compositeCopy(Q_UINT8 *dstRowStart, Q_INT32 dstRowStride, const Q_UINT8 *srcRowStart, Q_INT32 srcRowStride, const Q_UINT8 */*mask*/, Q_INT32 /*maskRowStride*/, Q_INT32 rows, Q_INT32 numColumns, Q_UINT8 /*opacity*/)
+void KisYCbCrU8ColorSpace::compositeCopy(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 */*tqmask*/, TQ_INT32 /*tqmaskRowStride*/, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 /*opacity*/)
{
while (rows > 0) {
memcpy(dstRowStart, srcRowStart, numColumns * sizeof(Pixel));
diff --git a/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.h b/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.h
index bc4d8329..479a7179 100644
--- a/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.h
+++ b/krita/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.h
@@ -31,92 +31,92 @@
class KisYCbCrU8ColorSpace : public KisU8BaseColorSpace
{
public:
- KisYCbCrU8ColorSpace(KisColorSpaceFactoryRegistry* parent, KisProfile* p);
+ KisYCbCrU8ColorSpace(KisColorSpaceFactoryRegistry* tqparent, KisProfile* p);
~KisYCbCrU8ColorSpace();
virtual bool willDegrade(ColorSpaceIndependence )
{
return false;
};
public:
- void setPixel(Q_UINT8 *pixel, Q_UINT8 Y, Q_UINT8 Cb, Q_UINT8 Cr, Q_UINT8 alpha) const;
- void getPixel(const Q_UINT8 *pixel, Q_UINT8 *Y, Q_UINT8 *Cb, Q_UINT8 *Cr, Q_UINT8 *alpha) const;
+ void setPixel(TQ_UINT8 *pixel, TQ_UINT8 Y, TQ_UINT8 Cb, TQ_UINT8 Cr, TQ_UINT8 alpha) const;
+ void getPixel(const TQ_UINT8 *pixel, TQ_UINT8 *Y, TQ_UINT8 *Cb, TQ_UINT8 *Cr, TQ_UINT8 *alpha) const;
- virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0);
- virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0);
+ virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0);
+ virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0);
- virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0);
- virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0);
+ virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0);
+ virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0);
- virtual Q_UINT8 difference(const Q_UINT8 *src1, const Q_UINT8 *src2);
- virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
+ virtual TQ_UINT8 difference(const TQ_UINT8 *src1, const TQ_UINT8 *src2);
+ virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const;
- virtual QValueVector<KisChannelInfo *> channels() const;
- virtual Q_UINT32 nChannels() const;
- virtual Q_UINT32 nColorChannels() const;
- virtual Q_UINT32 pixelSize() const;
+ virtual TQValueVector<KisChannelInfo *> channels() const;
+ virtual TQ_UINT32 nChannels() const;
+ virtual TQ_UINT32 nColorChannels() const;
+ virtual TQ_UINT32 pixelSize() const;
- virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height,
+ virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height,
KisProfile * dstProfile,
- Q_INT32 renderingIntent,
+ TQ_INT32 renderingIntent,
float exposure = 0.0f);
virtual KisCompositeOpList userVisiblecompositeOps() const;
protected:
- virtual void bitBlt(Q_UINT8 *dst,
- Q_INT32 dstRowStride,
- const Q_UINT8 *src,
- Q_INT32 srcRowStride,
- const Q_UINT8 *srcAlphaMask,
- Q_INT32 maskRowStride,
- Q_UINT8 opacity,
- Q_INT32 rows,
- Q_INT32 cols,
+ virtual void bitBlt(TQ_UINT8 *dst,
+ TQ_INT32 dstRowStride,
+ const TQ_UINT8 *src,
+ TQ_INT32 srcRowStride,
+ const TQ_UINT8 *srcAlphaMask,
+ TQ_INT32 tqmaskRowStride,
+ TQ_UINT8 opacity,
+ TQ_INT32 rows,
+ TQ_INT32 cols,
const KisCompositeOp& op);
- void compositeOver(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeErase(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
- void compositeCopy(Q_UINT8 *dst, Q_INT32 dstRowStride, const Q_UINT8 *src, Q_INT32 srcRowStride, const Q_UINT8 *mask, Q_INT32 maskRowStride, Q_INT32 rows, Q_INT32 columns, Q_UINT8 opacity);
+ void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
+ void compositeCopy(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
private:
-#define CLAMP_TO_8BITCHANNEL(a) CLAMP(a, 0, Q_UINT8_MAX)
- inline Q_UINT8 computeRed(Q_UINT8 Y, Q_UINT8 /*Cb*/, Q_UINT8 Cr)
+#define CLAMP_TO_8BITCHANNEL(a) CLAMP(a, 0, TQ_UINT8_MAX)
+ inline TQ_UINT8 computeRed(TQ_UINT8 Y, TQ_UINT8 /*Cb*/, TQ_UINT8 Cr)
{
- return (Q_UINT8)( CLAMP_TO_8BITCHANNEL( (Cr - 128)* (2-2*LUMA_RED) + Y ) );
+ return (TQ_UINT8)( CLAMP_TO_8BITCHANNEL( (Cr - 128)* (2-2*LUMA_RED) + Y ) );
}
- inline Q_UINT8 computeGreen(Q_UINT8 Y, Q_UINT8 Cb, Q_UINT8 Cr)
+ inline TQ_UINT8 computeGreen(TQ_UINT8 Y, TQ_UINT8 Cb, TQ_UINT8 Cr)
{
- return (Q_UINT8)( CLAMP_TO_8BITCHANNEL( (Y - LUMA_BLUE * computeBlue(Y,Cb,Cr) - LUMA_RED * computeRed(Y,Cb,Cr) ) / LUMA_GREEN ) );
+ return (TQ_UINT8)( CLAMP_TO_8BITCHANNEL( (Y - LUMA_BLUE * computeBlue(Y,Cb,Cr) - LUMA_RED * computeRed(Y,Cb,Cr) ) / LUMA_GREEN ) );
}
- inline Q_UINT8 computeBlue(Q_UINT8 Y, Q_UINT8 Cb, Q_UINT8 /*Cr*/)
+ inline TQ_UINT8 computeBlue(TQ_UINT8 Y, TQ_UINT8 Cb, TQ_UINT8 /*Cr*/)
{
- return (Q_UINT8)( CLAMP_TO_8BITCHANNEL( (Cb - 128)*(2 - 2 * LUMA_BLUE) + Y) );
+ return (TQ_UINT8)( CLAMP_TO_8BITCHANNEL( (Cb - 128)*(2 - 2 * LUMA_BLUE) + Y) );
}
- inline Q_UINT8 computeY( Q_UINT8 r, Q_UINT8 b, Q_UINT8 g)
+ inline TQ_UINT8 computeY( TQ_UINT8 r, TQ_UINT8 b, TQ_UINT8 g)
{
- return (Q_UINT8)( CLAMP_TO_8BITCHANNEL( LUMA_RED*r + LUMA_GREEN*g + LUMA_BLUE*b ) );
+ return (TQ_UINT8)( CLAMP_TO_8BITCHANNEL( LUMA_RED*r + LUMA_GREEN*g + LUMA_BLUE*b ) );
}
- inline Q_UINT8 computeCb( Q_UINT8 r, Q_UINT8 b, Q_UINT8 g)
+ inline TQ_UINT8 computeCb( TQ_UINT8 r, TQ_UINT8 b, TQ_UINT8 g)
{
- return (Q_UINT8)( CLAMP_TO_8BITCHANNEL( (b - computeY(r,g,b))/(2-2*LUMA_BLUE) + 128) );
+ return (TQ_UINT8)( CLAMP_TO_8BITCHANNEL( (b - computeY(r,g,b))/(2-2*LUMA_BLUE) + 128) );
}
- inline Q_UINT8 computeCr( Q_UINT8 r, Q_UINT8 b, Q_UINT8 g)
+ inline TQ_UINT8 computeCr( TQ_UINT8 r, TQ_UINT8 b, TQ_UINT8 g)
{
- return (Q_UINT8)( CLAMP_TO_8BITCHANNEL( (r - computeY(r,g,b))/(2-2*LUMA_RED) + 128) );
+ return (TQ_UINT8)( CLAMP_TO_8BITCHANNEL( (r - computeY(r,g,b))/(2-2*LUMA_RED) + 128) );
}
#undef CLAMP_TO_8BITCHANNEL
- static const Q_UINT8 PIXEL_Y = 0;
- static const Q_UINT8 PIXEL_Cb = 1;
- static const Q_UINT8 PIXEL_Cr = 2;
- static const Q_UINT8 PIXEL_ALPHA = 3;
+ static const TQ_UINT8 PIXEL_Y = 0;
+ static const TQ_UINT8 PIXEL_Cb = 1;
+ static const TQ_UINT8 PIXEL_Cr = 2;
+ static const TQ_UINT8 PIXEL_ALPHA = 3;
struct Pixel {
- Q_UINT8 Y;
- Q_UINT8 Cb;
- Q_UINT8 Cr;
- Q_UINT8 alpha;
+ TQ_UINT8 Y;
+ TQ_UINT8 Cb;
+ TQ_UINT8 Cr;
+ TQ_UINT8 alpha;
};
};
@@ -132,13 +132,13 @@ class KisYCbCrU8ColorSpaceFactory : public KisColorSpaceFactory
/**
* lcms colorspace type definition.
*/
- virtual Q_UINT32 colorSpaceType() { return TYPE_YCbCr_8; };
+ virtual TQ_UINT32 colorSpaceType() { return TYPE_YCbCr_8; };
virtual icColorSpaceSignature colorSpaceSignature() { return icSigYCbCrData; };
- virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisYCbCrU8ColorSpace(parent, p); };
+ virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisYCbCrU8ColorSpace(tqparent, p); };
- virtual QString defaultProfile() { return ""; };
+ virtual TQString defaultProfile() { return ""; };
};
#endif
diff --git a/krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.cc b/krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.cc
index 751e3f31..471b203e 100644
--- a/krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.cc
+++ b/krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.cc
@@ -35,14 +35,14 @@ typedef KGenericFactory<YCbCrU8Plugin> YCbCrU8PluginFactory;
K_EXPORT_COMPONENT_FACTORY( krita_ycbcr_u8_plugin, YCbCrU8PluginFactory( "krita" ) )
-YCbCrU8Plugin::YCbCrU8Plugin(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+YCbCrU8Plugin::YCbCrU8Plugin(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(YCbCrU8PluginFactory::instance());
- if ( parent->inherits("KisColorSpaceFactoryRegistry") )
+ if ( tqparent->inherits("KisColorSpaceFactoryRegistry") )
{
- KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );
+ KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( tqparent );
KisColorSpace * colorSpaceYCbCrU8 = new KisYCbCrU8ColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisYCbCrU8ColorSpaceFactory();
diff --git a/krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.h b/krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.h
index ef418784..98274614 100644
--- a/krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.h
+++ b/krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.h
@@ -27,8 +27,9 @@
class YCbCrU8Plugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- YCbCrU8Plugin(QObject *parent, const char *name, const QStringList &);
+ YCbCrU8Plugin(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~YCbCrU8Plugin();
};