summaryrefslogtreecommitdiffstats
path: root/krita/core/kis_alpha_mask.h
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/core/kis_alpha_mask.h
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/core/kis_alpha_mask.h')
-rw-r--r--krita/core/kis_alpha_mask.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/krita/core/kis_alpha_mask.h b/krita/core/kis_alpha_mask.h
index 1da3384d..4665857e 100644
--- a/krita/core/kis_alpha_mask.h
+++ b/krita/core/kis_alpha_mask.h
@@ -18,8 +18,8 @@
#ifndef KIS_ALPHA_MASK_
#define KIS_ALPHA_MASK_
-#include <qimage.h>
-#include <qvaluevector.h>
+#include <tqimage.h>
+#include <tqvaluevector.h>
#include <ksharedptr.h>
@@ -27,57 +27,57 @@
#include "kis_types.h"
/**
- * KisAlphaMask is intended to create alpha values from a QImage for use
- * in brush creation. It is not a generic alpha mask that can be used with
+ * KisAlphaMask is intended to create alpha values from a TQImage for use
+ * in brush creation. It is not a generic alpha tqmask that can be used with
* KisPaintDevices: use a KisSelection for that.
*/
class KisAlphaMask : public KShared {
public:
/**
- Create an alpha mask based on the specified QImage. If the image is
- not a grayscale, the mask value is calculated from the effective grey
+ Create an alpha tqmask based on the specified TQImage. If the image is
+ not a grayscale, the tqmask value is calculated from the effective grey
level and alpha value.
*/
- KisAlphaMask(const QImage& img);
+ KisAlphaMask(const TQImage& img);
/**
As above except quicker as the image does not need to be scanned
to see if it has any colour pixels.
*/
- KisAlphaMask(const QImage& img, bool hasColor);
+ KisAlphaMask(const TQImage& img, bool hasColor);
/**
- Create a transparent mask.
+ Create a transparent tqmask.
*/
- KisAlphaMask(Q_INT32 width, Q_INT32 height);
+ KisAlphaMask(TQ_INT32 width, TQ_INT32 height);
virtual ~KisAlphaMask();
/**
@return the number of alpha values in a scanline.
*/
- Q_INT32 height() const;
+ TQ_INT32 height() const;
/**
- @return the number of lines in the mask.
+ @return the number of lines in the tqmask.
*/
- Q_INT32 width() const;
+ TQ_INT32 width() const;
/**
@return the alpha value at the specified position.
- Returns Q_UINT8 OPACITY_TRANSPARENT if the value is
- outside the bounds of the mask.
+ Returns TQ_UINT8 OPACITY_TRANSPARENT if the value is
+ outside the bounds of the tqmask.
- XXX: this is, of course, not the best way of masking.
+ XXX: this is, of course, not the best way of tqmasking.
Better would be to let KisAlphaMask fill a chunk of memory
with the alpha values at the right position, something like
- void applyMask(Q_UINT8 *pixeldata, Q_INT32 pixelWidth,
- Q_INT32 alphaPos). That would be fastest, or we could
- provide an iterator over the mask, that would be nice, too.
+ void applyMask(TQ_UINT8 *pixeldata, TQ_INT32 pixelWidth,
+ TQ_INT32 alphaPos). That would be fastest, or we could
+ provide an iterator over the tqmask, that would be nice, too.
*/
- inline Q_UINT8 alphaAt(Q_INT32 x, Q_INT32 y) const
+ inline TQ_UINT8 alphaAt(TQ_INT32 x, TQ_INT32 y) const
{
if (y >= 0 && y < m_height && x >= 0 && x < m_width) {
return m_data[(y * m_width) + x];
@@ -87,19 +87,19 @@ class KisAlphaMask : public KShared {
}
}
- void setAlphaAt(Q_INT32 x, Q_INT32 y, Q_UINT8 alpha);
+ void setAlphaAt(TQ_INT32 x, TQ_INT32 y, TQ_UINT8 alpha);
- // Create a new mask by interpolating between mask1 and mask2 as t
+ // Create a new tqmask by interpolating between tqmask1 and tqmask2 as t
// goes from 0 to 1.
- static KisAlphaMaskSP interpolate(KisAlphaMaskSP mask1, KisAlphaMaskSP mask2, double t);
+ static KisAlphaMaskSP interpolate(KisAlphaMaskSP tqmask1, KisAlphaMaskSP tqmask2, double t);
private:
- void computeAlpha(const QImage& img);
- void copyAlpha(const QImage& img);
+ void computeAlpha(const TQImage& img);
+ void copyAlpha(const TQImage& img);
- QValueVector<Q_UINT8> m_data;
- Q_INT32 m_width;
- Q_INT32 m_height;
+ TQValueVector<TQ_UINT8> m_data;
+ TQ_INT32 m_width;
+ TQ_INT32 m_height;
};
#endif // KIS_ALPHA_MASK_