summaryrefslogtreecommitdiffstats
path: root/krita/colorspaces/rgb_u16
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /krita/colorspaces/rgb_u16
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krita/colorspaces/rgb_u16')
-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
6 files changed, 319 insertions, 318 deletions
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();
};