summaryrefslogtreecommitdiffstats
path: root/krita/plugins/paintops/defaultpaintops/kis_duplicateop.cc
diff options
context:
space:
mode:
Diffstat (limited to 'krita/plugins/paintops/defaultpaintops/kis_duplicateop.cc')
-rw-r--r--krita/plugins/paintops/defaultpaintops/kis_duplicateop.cc50
1 files changed, 25 insertions, 25 deletions
diff --git a/krita/plugins/paintops/defaultpaintops/kis_duplicateop.cc b/krita/plugins/paintops/defaultpaintops/kis_duplicateop.cc
index 79d00b96..139ed51d 100644
--- a/krita/plugins/paintops/defaultpaintops/kis_duplicateop.cc
+++ b/krita/plugins/paintops/defaultpaintops/kis_duplicateop.cc
@@ -22,7 +22,7 @@
#include "kis_duplicateop.h"
-#include <qrect.h>
+#include <tqrect.h>
#include <kdebug.h>
@@ -108,9 +108,9 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf
// Split the coordinates into integer plus fractional parts. The integer
// is where the dab will be positioned and the fractional part determines
// the sub-pixel positioning.
- Q_INT32 x;
+ TQ_INT32 x;
double xFraction;
- Q_INT32 y;
+ TQ_INT32 y;
double yFraction;
splitCoordinate(pt.x(), &x, &xFraction);
@@ -125,19 +125,19 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf
dab->convertTo(KisMetaRegistry::instance()->csRegistry()->getAlpha8());
}
else {
- KisAlphaMaskSP mask = brush->mask(info, xFraction, yFraction);
- dab = computeDab(mask, KisMetaRegistry::instance()->csRegistry()->getAlpha8());
+ KisAlphaMaskSP tqmask = brush->tqmask(info, xFraction, yFraction);
+ dab = computeDab(tqmask, KisMetaRegistry::instance()->csRegistry()->getAlpha8());
}
m_painter->setPressure(info.pressure);
KisPoint srcPointF = pt - m_painter->duplicateOffset();
- QPoint srcPoint = QPoint(x - static_cast<Q_INT32>(m_painter->duplicateOffset().x()),
- y - static_cast<Q_INT32>(m_painter->duplicateOffset().y()));
+ TQPoint srcPoint = TQPoint(x - static_cast<TQ_INT32>(m_painter->duplicateOffset().x()),
+ y - static_cast<TQ_INT32>(m_painter->duplicateOffset().y()));
- Q_INT32 sw = dab->extent().width();
- Q_INT32 sh = dab->extent().height();
+ TQ_INT32 sw = dab->extent().width();
+ TQ_INT32 sh = dab->extent().height();
if (srcPoint.x() < 0 )
srcPoint.setX(0);
@@ -169,7 +169,7 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf
}
// First look for the grid corresponding to the start point
KisSubPerspectiveGrid* subGridStart = *device->image()->perspectiveGrid()->begin();//device->image()->perspectiveGrid()->gridAt(KisPoint(srcPoint.x() +hotSpot.x(),srcPoint.y() +hotSpot.y()));
- QRect r = QRect(0,0, device->image()->width(), device->image()->height());
+ TQRect r = TQRect(0,0, device->image()->width(), device->image()->height());
#if 1
if(subGridStart)
@@ -236,9 +236,9 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf
if(heal)
{
- Q_UINT16 dataDevice[4];
- Q_UINT16 dataSrcDev[4];
- QMemArray<double> matrix ( 3 * sw * sh );
+ TQ_UINT16 dataDevice[4];
+ TQ_UINT16 dataSrcDev[4];
+ TQMemArray<double> matrix ( 3 * sw * sh );
// First divide
KisColorSpace* deviceCs = device->colorSpace();
KisHLineIteratorPixel deviceIt = device->createHLineIterator(x, y, sw, false );
@@ -248,12 +248,12 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf
{
for(int i= 0; !srcDevIt.isDone(); i++)
{
- deviceCs->toLabA16(deviceIt.rawData(), (Q_UINT8*)dataDevice, 1);
- deviceCs->toLabA16(srcDevIt.rawData(), (Q_UINT8*)dataSrcDev, 1);
+ deviceCs->toLabA16(deviceIt.rawData(), (TQ_UINT8*)dataDevice, 1);
+ deviceCs->toLabA16(srcDevIt.rawData(), (TQ_UINT8*)dataSrcDev, 1);
// Division
for( int k = 0; k < 3; k++)
{
- matrixIt[k] = dataDevice[k] / (double)QMAX(dataSrcDev [k], 1);
+ matrixIt[k] = dataDevice[k] / (double)TQMAX(dataSrcDev [k], 1);
}
++deviceIt;
++srcDevIt;
@@ -266,7 +266,7 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf
{
int iter = 0;
double err;
- QMemArray<double> solution ( 3 * sw * sh );
+ TQMemArray<double> solution ( 3 * sw * sh );
do {
err = minimizeEnergy(&matrix[0], &solution[0],sw,sh);
memcpy (&matrix[0], &solution[0], sw * sh * 3 * sizeof(double));
@@ -282,14 +282,14 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf
{
for(int i= 0; !srcDevIt.isDone(); i++)
{
- deviceCs->toLabA16(deviceIt.rawData(), (Q_UINT8*)dataDevice, 1);
- deviceCs->toLabA16(srcDevIt.rawData(), (Q_UINT8*)dataSrcDev, 1);
+ deviceCs->toLabA16(deviceIt.rawData(), (TQ_UINT8*)dataDevice, 1);
+ deviceCs->toLabA16(srcDevIt.rawData(), (TQ_UINT8*)dataSrcDev, 1);
// Multiplication
for( int k = 0; k < 3; k++)
{
- dataSrcDev[k] = (int)CLAMP( matrixIt[k] * QMAX( dataSrcDev[k], 1), 0, 65535 );
+ dataSrcDev[k] = (int)CLAMP( matrixIt[k] * TQMAX( dataSrcDev[k], 1), 0, 65535 );
}
- deviceCs->fromLabA16((Q_UINT8*)dataSrcDev, srcDevIt.rawData(), 1);
+ deviceCs->fromLabA16((TQ_UINT8*)dataSrcDev, srcDevIt.rawData(), 1);
++deviceIt;
++srcDevIt;
matrixIt +=3;
@@ -312,8 +312,8 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf
OPACITY_OPAQUE, 0, 0, sw, sh);
copyPainter.end();
- QRect dabRect = QRect(0, 0, brush->maskWidth(info), brush->maskHeight(info));
- QRect dstRect = QRect(x, y, dabRect.width(), dabRect.height());
+ TQRect dabRect = TQRect(0, 0, brush->tqmaskWidth(info), brush->tqmaskHeight(info));
+ TQRect dstRect = TQRect(x, y, dabRect.width(), dabRect.height());
KisImage * image = device->image();
@@ -323,8 +323,8 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf
if (dstRect.isNull() || dstRect.isEmpty() || !dstRect.isValid()) return;
- Q_INT32 sx = dstRect.x() - x;
- Q_INT32 sy = dstRect.y() - y;
+ TQ_INT32 sx = dstRect.x() - x;
+ TQ_INT32 sy = dstRect.y() - y;
sw = dstRect.width();
sh = dstRect.height();