summaryrefslogtreecommitdiffstats
path: root/krita/colorspaces/cmyk_u16
diff options
context:
space:
mode:
Diffstat (limited to 'krita/colorspaces/cmyk_u16')
-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
4 files changed, 210 insertions, 209 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_