summaryrefslogtreecommitdiffstats
path: root/tdefx/kimageeffect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdefx/kimageeffect.cpp')
-rw-r--r--tdefx/kimageeffect.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/tdefx/kimageeffect.cpp b/tdefx/kimageeffect.cpp
index 41bfd6d7e..277e1cc7f 100644
--- a/tdefx/kimageeffect.cpp
+++ b/tdefx/kimageeffect.cpp
@@ -136,7 +136,7 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca,
return image;
}
- register int x, y;
+ int x, y;
rDiff = (rcb = cb.red()) - (rca = ca.red());
gDiff = (gcb = cb.green()) - (gca = ca.green());
@@ -147,9 +147,9 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca,
uint *p;
uint rgb;
- register int rl = rca << 16;
- register int gl = gca << 16;
- register int bl = bca << 16;
+ int rl = rca << 16;
+ int gl = gca << 16;
+ int bl = bca << 16;
if( eff == VerticalGradient ) {
@@ -424,7 +424,7 @@ TQImage KImageEffect::unbalancedGradient(const TQSize &size, const TQColor &ca,
return image;
}
- register int x, y;
+ int x, y;
unsigned int *scanline;
rDiff = (rcb = cb.red()) - (rca = ca.red());
@@ -949,7 +949,7 @@ TQImage& KImageEffect::modulate(TQImage &image, TQImage &modImage, bool reverse,
TQColor clr;
int mod=0;
unsigned int x1, x2, y1, y2;
- register int x, y;
+ int x, y;
// for image, we handle only depth 32
if (image.depth()<32) image = image.convertDepth(32);
@@ -1280,12 +1280,12 @@ TQImage& KImageEffect::blend(const TQColor& clr, TQImage& dst, float opacity)
clr.rgb(&rcol, &gcol, &bcol);
#ifdef WORDS_BIGENDIAN // ARGB (skip alpha)
- register unsigned char *data = (unsigned char *)dst.bits() + 1;
+ unsigned char *data = (unsigned char *)dst.bits() + 1;
#else // BGRA
- register unsigned char *data = (unsigned char *)dst.bits();
+ unsigned char *data = (unsigned char *)dst.bits();
#endif
- for (register int i=0; i<pixels; i++)
+ for (int i=0; i<pixels; i++)
{
#ifdef WORDS_BIGENDIAN
*data += (unsigned char)((rcol - *data) * opacity);
@@ -1513,14 +1513,14 @@ TQImage& KImageEffect::blend(TQImage& src, TQImage& dst, float opacity)
{
#ifdef WORDS_BIGENDIAN // ARGB (skip alpha)
- register unsigned char *data1 = (unsigned char *)dst.bits() + 1;
- register unsigned char *data2 = (unsigned char *)src.bits() + 1;
+ unsigned char *data1 = (unsigned char *)dst.bits() + 1;
+ unsigned char *data2 = (unsigned char *)src.bits() + 1;
#else // BGRA
- register unsigned char *data1 = (unsigned char *)dst.bits();
- register unsigned char *data2 = (unsigned char *)src.bits();
+ unsigned char *data1 = (unsigned char *)dst.bits();
+ unsigned char *data2 = (unsigned char *)src.bits();
#endif
- for (register int i=0; i<pixels; i++)
+ for (int i=0; i<pixels; i++)
{
#ifdef WORDS_BIGENDIAN
*data1 += (unsigned char)((*(data2++) - *data1) * opacity);
@@ -1582,7 +1582,7 @@ TQImage& KImageEffect::blend(TQImage &image, float initial_intensity,
var = -var;
}
- register int x, y;
+ int x, y;
unsigned int *data = (unsigned int *)image.bits();
@@ -1790,7 +1790,7 @@ TQImage& KImageEffect::blend(TQImage &image1, TQImage &image2,
unsigned int x1, x2, x3, y1, y2, y3;
unsigned int a;
- register int x, y;
+ int x, y;
// for image1 and image2, we only handle depth 32
if (image1.depth()<32) image1 = image1.convertDepth(32);
@@ -1884,7 +1884,7 @@ TQImage& KImageEffect::hash(TQImage &image, Lighting lite, unsigned int spacing)
return image;
}
- register int x, y;
+ int x, y;
unsigned int *data = (unsigned int *)image.bits();
unsigned int ind;
@@ -2142,9 +2142,9 @@ TQImage& KImageEffect::toGray(TQImage &img, bool fast)
if(fast){
if (img.depth() == 32) {
- register uchar * r(img.bits());
- register uchar * g(img.bits() + 1);
- register uchar * b(img.bits() + 2);
+ uchar * r(img.bits());
+ uchar * g(img.bits() + 1);
+ uchar * b(img.bits() + 2);
uchar * end(img.bits() + img.numBytes());
@@ -2161,11 +2161,11 @@ TQImage& KImageEffect::toGray(TQImage &img, bool fast)
{
for (int i = 0; i < img.numColors(); i++)
{
- register uint r = tqRed(img.color(i));
- register uint g = tqGreen(img.color(i));
- register uint b = tqBlue(img.color(i));
+ uint r = tqRed(img.color(i));
+ uint g = tqGreen(img.color(i));
+ uint b = tqBlue(img.color(i));
- register uint gray = (((r + g) >> 1) + b) >> 1;
+ uint gray = (((r + g) >> 1) + b) >> 1;
img.setColor(i, tqRgba(gray, gray, gray, tqAlpha(img.color(i))));
}
}
@@ -2408,10 +2408,10 @@ bool KImageEffect::blend(
output = lower.copy();
- register uchar *i, *o;
- register int a;
- register int col;
- register int w = upper.width();
+ uchar *i, *o;
+ int a;
+ int col;
+ int w = upper.width();
int row(upper.height() - 1);
do {
@@ -2490,10 +2490,10 @@ bool KImageEffect::blend(
// output.setAlphaBuffer(true); // I should do some benchmarks to see if
// this is worth the effort
- register TQRgb *i, *o, *b;
+ TQRgb *i, *o, *b;
- register int a;
- register int j,k;
+ int a;
+ int j,k;
for (j=0; j<ch; j++)
{
b=reinterpret_cast<TQRgb *>(&const_cast<TQImage&>(lower).scanLine(y+j) [ (x+cw) << 2 ]);
@@ -2549,9 +2549,9 @@ bool KImageEffect::blendOnLower(
if ( cw <= 0 || ch <= 0 ) return true;
}
- register uchar *i, *b;
- register int a;
- register int k;
+ uchar *i, *b;
+ int a;
+ int k;
for (int j=0; j<ch; j++)
{
@@ -3102,7 +3102,7 @@ unsigned int KImageEffect::generateNoise(unsigned int pixel,
}
case PoissonNoise:
{
- register int
+ int
i;
for (i=0; alpha > exp(-SigmaPoisson*pixel); i++)
@@ -3709,7 +3709,7 @@ void KImageEffect::normalize(TQImage &image)
TQ_INT64 number_pixels;
int x, y;
unsigned int *p, *q;
- register long i;
+ long i;
unsigned long threshold_intensity;
unsigned char r, g, b, a;
@@ -4016,7 +4016,7 @@ TQImage KImageEffect::edge(TQImage &image, double radius)
{
double *kernel;
int width;
- register long i;
+ long i;
TQImage dest;
if(radius == 50.0){
@@ -4054,7 +4054,7 @@ TQImage KImageEffect::emboss(TQImage &image, double radius, double sigma)
{
double alpha, *kernel;
int j, width;
- register long i, u, v;
+ long i, u, v;
TQImage dest;
if(sigma == 0.0){
@@ -4099,10 +4099,10 @@ void KImageEffect::blurScanLine(double *kernel, int width,
unsigned int *src, unsigned int *dest,
int columns)
{
- register double *p;
+ double *p;
unsigned int *q;
- register int x;
- register long i;
+ int x;
+ long i;
double red, green, blue, alpha;
double scale = 0.0;
@@ -4239,7 +4239,7 @@ int KImageEffect::getBlurKernel(int width, double sigma, double **kernel)
{
#define KernelRank 3
double alpha, normalize;
- register long i;
+ long i;
int bias;
assert(sigma != 0.0);
@@ -4352,8 +4352,8 @@ bool KImageEffect::convolveImage(TQImage *image, TQImage *dest,
long width;
double red, green, blue, alpha;
double normalize, *normal_kernel;
- register const double *k;
- register unsigned int *q;
+ const double *k;
+ unsigned int *q;
int x, y, mx, my, sx, sy;
long i;
int mcx, mcy;
@@ -4425,7 +4425,7 @@ int KImageEffect::getOptimalKernelWidth(double radius, double sigma)
{
double normalize, value;
long width;
- register long u;
+ long u;
assert(sigma != 0.0);
if(radius > 0.0)
@@ -4453,7 +4453,7 @@ TQImage KImageEffect::sharpen(TQImage &image, double radius, double sigma)
{
double alpha, normalize, *kernel;
int width;
- register long i, u, v;
+ long i, u, v;
TQImage dest;
if(sigma == 0.0){
@@ -4957,12 +4957,12 @@ TQImage KImageEffect::convertToPremultipliedAlpha(TQImage input) {
int w = alphaImage.width();
int h = alphaImage.height();
- register int r;
- register int g;
- register int b;
- register int a;
- register float alpha_adjust;
- register TQRgb l;
+ int r;
+ int g;
+ int b;
+ int a;
+ float alpha_adjust;
+ TQRgb l;
TQRgb *ls;
for (int y = 0; y < h; ++y) {
ls = (TQRgb *)alphaImage.scanLine( y );