summaryrefslogtreecommitdiffstats
path: root/krita/core/kis_merge_visitor.h
diff options
context:
space:
mode:
Diffstat (limited to 'krita/core/kis_merge_visitor.h')
-rw-r--r--krita/core/kis_merge_visitor.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/krita/core/kis_merge_visitor.h b/krita/core/kis_merge_visitor.h
index 73331591..68053384 100644
--- a/krita/core/kis_merge_visitor.h
+++ b/krita/core/kis_merge_visitor.h
@@ -20,7 +20,7 @@
#ifndef KIS_MERGE_H_
#define KIS_MERGE_H_
-#include <qrect.h>
+#include <tqrect.h>
#include "kis_types.h"
#include "kis_paint_device.h"
@@ -45,7 +45,7 @@ public:
* Don't even _think_ of creating a merge visitor without a projection; without a projection,
* the adjustmentlayers won't work.
*/
- KisMergeVisitor(KisPaintDeviceSP projection, const QRect& rc) :
+ KisMergeVisitor(KisPaintDeviceSP projection, const TQRect& rc) :
KisLayerVisitor()
{
Q_ASSERT(projection);
@@ -60,8 +60,8 @@ private:
KSharedPtr<Target> paintIndirect(KisPaintDeviceSP source,
KSharedPtr<Target> target,
KisLayerSupportsIndirectPainting* layer,
- Q_INT32 sx, Q_INT32 sy, Q_INT32 dx, Q_INT32 dy,
- Q_INT32 w, Q_INT32 h) {
+ TQ_INT32 sx, TQ_INT32 sy, TQ_INT32 dx, TQ_INT32 dy,
+ TQ_INT32 w, TQ_INT32 h) {
KisPainter gc2(target.data());
gc2.bitBlt(dx, dy, COMPOSITE_COPY, source,
OPACITY_OPAQUE, sx, sy, w, h);
@@ -85,9 +85,9 @@ public:
if (!layer->visible())
return true;
- Q_INT32 sx, sy, dx, dy, w, h;
+ TQ_INT32 sx, sy, dx, dy, w, h;
- QRect rc = layer->paintDevice()->extent() & m_rc;
+ TQRect rc = layer->paintDevice()->extent() & m_rc;
// Indirect painting?
KisPaintDeviceSP tempTarget = layer->temporaryTarget();
@@ -114,11 +114,11 @@ public:
gc.bitBlt(dx, dy, layer->compositeOp(), source, layer->opacity(), sx, sy, w, h);
} else {
if (layer->renderMask()) {
- // To display the mask, we don't do things with composite op and opacity
+ // To display the tqmask, we don't do things with composite op and opacity
// This is like the gimp does it, I guess that's ok?
// Note that here we'll use m_rc, because even if the extent of the device is
- // empty, we want a full mask to be drawn! (we don't change rc, since
+ // empty, we want a full tqmask to be drawn! (we don't change rc, since
// it'd mess with setClean). This is because KisPainter::bitBlt &'s with
// the source device's extent. This is ok in normal circumstances, but
// we changed the default tile. Fixing this properly would mean fixing it there.
@@ -129,36 +129,36 @@ public:
dx = sx;
dy = sy;
- // The problem is that the extent of the layer mask might not be extended
+ // The problem is that the extent of the layer tqmask might not be extended
// enough. Check if that is the case
- KisPaintDeviceSP mask = layer->getMask();
- QRect mextent = mask->extent();
+ KisPaintDeviceSP tqmask = layer->getMask();
+ TQRect mextent = tqmask->extent();
if ((mextent & m_rc) != m_rc) {
// Iterate over all pixels in the m_rc area. With just accessing the
// tiles in read-write mode, we ensure that the tiles get created if they
// do not exist. If they do, they'll remain untouched since we don't
// actually write data to it.
// XXX Admission: this is actually kind of a hack :-(
- KisRectIteratorPixel it = mask->createRectIterator(sx, sy, w, h, true);
+ KisRectIteratorPixel it = tqmask->createRectIterator(sx, sy, w, h, true);
while (!it.isDone())
++it;
}
if (tempTarget) {
KisPaintDeviceSP temp = new KisPaintDevice(source->colorSpace());
- mask = paintIndirect(mask, temp, layer, sx, sy, dx, dy, w, h);
+ tqmask = paintIndirect(tqmask, temp, layer, sx, sy, dx, dy, w, h);
}
- gc.bitBlt(dx, dy, COMPOSITE_OVER, mask, OPACITY_OPAQUE, sx, sy, w, h);
+ gc.bitBlt(dx, dy, COMPOSITE_OVER, tqmask, OPACITY_OPAQUE, sx, sy, w, h);
} else {
- KisSelectionSP mask = layer->getMaskAsSelection();
- // The indirect painting happens on the mask
+ KisSelectionSP tqmask = layer->getMaskAsSelection();
+ // The indirect painting happens on the tqmask
if (tempTarget && layer->editMask()) {
- KisPaintDeviceSP maskSrc = layer->getMask();
- KisPaintDeviceSP temp = new KisPaintDevice(maskSrc->colorSpace());
- temp = paintIndirect(maskSrc, temp, layer, sx, sy, dx, dy, w, h);
+ KisPaintDeviceSP tqmaskSrc = layer->getMask();
+ KisPaintDeviceSP temp = new KisPaintDevice(tqmaskSrc->colorSpace());
+ temp = paintIndirect(tqmaskSrc, temp, layer, sx, sy, dx, dy, w, h);
// Blegh
KisRectIteratorPixel srcIt = temp->createRectIterator(sx, sy, w, h, false);
- KisRectIteratorPixel dstIt = mask->createRectIterator(sx, sy, w, h, true);
+ KisRectIteratorPixel dstIt = tqmask->createRectIterator(sx, sy, w, h, true);
while(!dstIt.isDone()) {
// Same as in convertMaskToSelection
@@ -167,7 +167,7 @@ public:
++dstIt;
}
} else if (tempTarget) {
- // We have a mask, and paint indirect, but not on the mask
+ // We have a tqmask, and paint indirect, but not on the tqmask
KisPaintDeviceSP temp = new KisPaintDevice(source->colorSpace());
source = paintIndirect(source, temp, layer, sx, sy, dx, dy, w, h);
}
@@ -175,7 +175,7 @@ public:
gc.bltSelection(dx, dy,
layer->compositeOp(),
source,
- mask,
+ tqmask,
layer->opacity(), sx, sy, w, h);
}
}
@@ -197,11 +197,11 @@ public:
if (!layer->visible())
return true;
- Q_INT32 sx, sy, dx, dy, w, h;
+ TQ_INT32 sx, sy, dx, dy, w, h;
// This automatically makes sure the projection is up-to-date for the specified rect.
KisPaintDeviceSP dev = layer->projection(m_rc);
- QRect rc = dev->extent() & m_rc;
+ TQRect rc = dev->extent() & m_rc;
sx = rc.left();
sy = rc.top();
@@ -232,9 +232,9 @@ public:
if (!dev)
return true;
- Q_INT32 sx, sy, dx, dy, w, h;
+ TQ_INT32 sx, sy, dx, dy, w, h;
- QRect rc = dev->extent() & m_rc;
+ TQRect rc = dev->extent() & m_rc;
sx= rc.left();
sy = rc.top();
@@ -290,7 +290,7 @@ public:
tmp = new KisPaintDevice(m_projection->colorSpace());
KisPainter gc(tmp);
- QRect selectedRect = selection->selectedRect();
+ TQRect selectedRect = selection->selectedRect();
selectedRect &= m_rc;
if (selectedRect.width() == 0 || selectedRect.height() == 0) // Don't even try
@@ -351,7 +351,7 @@ public:
private:
KisPaintDeviceSP m_projection;
- QRect m_rc;
+ TQRect m_rc;
};
#endif // KIS_MERGE_H_