summaryrefslogtreecommitdiffstats
path: root/tqtinterface/qt4/src/kernel/tqimage.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-08-10 12:13:27 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-08-10 12:13:27 -0500
commitd296f1d337dabfeae5191955fdadb874965dbbe9 (patch)
tree1a4b3b4cca01f2ea77eee2497297219d60e9bbd4 /tqtinterface/qt4/src/kernel/tqimage.cpp
parenteaa7ee2e0bbca40ba3173c4304f81957e8964291 (diff)
downloadexperimental-d296f1d337dabfeae5191955fdadb874965dbbe9.tar.gz
experimental-d296f1d337dabfeae5191955fdadb874965dbbe9.zip
rename the following methods:
tqparent parent tqmask mask
Diffstat (limited to 'tqtinterface/qt4/src/kernel/tqimage.cpp')
-rw-r--r--tqtinterface/qt4/src/kernel/tqimage.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/tqtinterface/qt4/src/kernel/tqimage.cpp b/tqtinterface/qt4/src/kernel/tqimage.cpp
index 2a99fc9..3483e2a 100644
--- a/tqtinterface/qt4/src/kernel/tqimage.cpp
+++ b/tqtinterface/qt4/src/kernel/tqimage.cpp
@@ -1606,12 +1606,12 @@ TQDataStream &operator<<( TQDataStream &s, const BMP_INFOHDR &bi )
}
static
-int calc_shift(int tqmask)
+int calc_shift(int mask)
{
int result = 0;
- while (!(tqmask & 1)) {
+ while (!(mask & 1)) {
result++;
- tqmask >>= 1;
+ mask >>= 1;
}
return result;
}
@@ -4224,10 +4224,10 @@ void TQImage::setNumColors( int numColors )
contain the alpha component.
The alpha component specifies the transparency of a pixel. 0 means
- completely transtqparent and 255 means opaque. The alpha component
+ completely transparent and 255 means opaque. The alpha component
is ignored if you do not enable alpha buffer mode.
- The alpha buffer is used to set a tqmask when a TQImage is translated
+ The alpha buffer is used to set a mask when a TQImage is translated
to a TQPixmap.
\sa hasAlphaBuffer() createAlphaMask()
@@ -4430,7 +4430,7 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
const int tablesize = 997; // prime
TQRgbMap table[tablesize];
int pix=0;
- TQRgb atqmask = src->hasAlphaBuffer() ? 0xffffffff : 0x00ffffff;
+ TQRgb amask = src->hasAlphaBuffer() ? 0xffffffff : 0x00ffffff;
if ( src->hasAlphaBuffer() )
dst->setAlphaBuffer(TRUE);
@@ -4441,10 +4441,10 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
// Almost same code as pixel insertion below
while ( palette_count-- > 0 ) {
// Find in table...
- int hash = (*p & atqmask) % tablesize;
+ int hash = (*p & amask) % tablesize;
for (;;) {
if ( table[hash].used() ) {
- if ( table[hash].rgb == (*p & atqmask) ) {
+ if ( table[hash].rgb == (*p & amask) ) {
// Found previous insertion - use it
break;
} else {
@@ -4455,9 +4455,9 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
// Cannot be in table
TQ_ASSERT ( pix != 256 ); // too many colors
// Insert into table at this unused position
- dst->setColor( pix, (*p & atqmask) );
+ dst->setColor( pix, (*p & amask) );
table[hash].pix = pix++;
- table[hash].rgb = *p & atqmask;
+ table[hash].rgb = *p & amask;
break;
}
}
@@ -4474,10 +4474,10 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
x = src->width();
while ( x-- ) {
// Find in table...
- int hash = (*p & atqmask) % tablesize;
+ int hash = (*p & amask) % tablesize;
for (;;) {
if ( table[hash].used() ) {
- if ( table[hash].rgb == (*p & atqmask) ) {
+ if ( table[hash].rgb == (*p & amask) ) {
// Found previous insertion - use it
break;
} else {
@@ -4493,9 +4493,9 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
y = src->height();
} else {
// Insert into table at this unused position
- dst->setColor( pix, (*p & atqmask) );
+ dst->setColor( pix, (*p & amask) );
table[hash].pix = pix++;
- table[hash].rgb = (*p & atqmask);
+ table[hash].rgb = (*p & amask);
}
break;
}
@@ -4548,7 +4548,7 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
for ( gc=0; gc<=MAX_G; gc++ )
for ( bc=0; bc<=MAX_B; bc++ ) {
dst->setColor( INDEXOF(rc,gc,bc),
- (atqmask&0xff000000)
+ (amask&0xff000000)
| tqRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) );
}
@@ -4679,12 +4679,12 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
#ifndef TQT_NO_IMAGE_DITHER_TO_1
if ( src->hasAlphaBuffer() ) {
const int trans = 216;
- dst->setColor(trans, 0x00000000); // transtqparent
- TQImage tqmask = src->createAlphaMask(conversion_flags);
+ dst->setColor(trans, 0x00000000); // transparent
+ TQImage mask = src->createAlphaMask(conversion_flags);
uchar* m;
for ( y=0; y < src->height(); y++ ) {
uchar bit = 0x80;
- m = tqmask.scanLine(y);
+ m = mask.scanLine(y);
b = dst->scanLine(y);
int w = src->width();
for ( x = 0; x<w; x++ ) {
@@ -5045,7 +5045,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst,
if ( fromalpha ) {
while ( p < end ) {
if ( (*p++ >> 24) >= 128 )
- *m |= 1 << bit; // Set tqmask "on"
+ *m |= 1 << bit; // Set mask "on"
if ( bit == 0 ) {
m++;
bit = 7;
@@ -5077,7 +5077,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst,
int bit = 7;
while ( p < end ) {
if ( gray[*p++] < 128 )
- *m |= 1 << bit; // Set tqmask "on"/ pixel "black"
+ *m |= 1 << bit; // Set mask "on"/ pixel "black"
if ( bit == 0 ) {
m++;
bit = 7;
@@ -6040,7 +6040,7 @@ TQImage TQImage::xForm( const TQWMatrix &matrix ) const
break;
case 8:
if ( dImage.data->ncols < 256 ) {
- // colors are left in the color table, so pick that one as transtqparent
+ // colors are left in the color table, so pick that one as transparent
dImage.setNumColors( dImage.data->ncols+1 );
dImage.setColor( dImage.data->ncols-1, 0x00 );
memset( dImage.bits(), dImage.data->ncols-1, dImage.numBytes() );
@@ -6069,7 +6069,7 @@ TQImage TQImage::xForm( const TQWMatrix &matrix ) const
#endif
/*!
- Builds and returns a 1-bpp tqmask from the alpha buffer in this
+ Builds and returns a 1-bpp mask from the alpha buffer in this
image. Returns a \link isNull() null\endlink image if \link
setAlphaBuffer() alpha buffer mode\endlink is disabled.
@@ -6099,15 +6099,15 @@ TQImage TQImage::createAlphaMask( int conversion_flags ) const
.createAlphaMask( conversion_flags );
}
- TQImage tqmask1;
- dither_to_1( this, &tqmask1, conversion_flags, TRUE );
- return tqmask1;
+ TQImage mask1;
+ dither_to_1( this, &mask1, conversion_flags, TRUE );
+ return mask1;
}
#endif
#ifndef TQT_NO_IMAGE_HEURISTIC_MASK
/*!
- Creates and returns a 1-bpp heuristic tqmask for this image. It
+ Creates and returns a 1-bpp heuristic mask for this image. It
works by selecting a color from one of the corners, then chipping
away pixels of that color starting at all the edges.
@@ -6118,8 +6118,8 @@ TQImage TQImage::createAlphaMask( int conversion_flags ) const
The returned image has little-endian bit order, which you can
convert to big-endianness using convertBitOrder().
- If \a clipTight is TRUE the tqmask is just large enough to cover the
- pixels; otherwise, the tqmask is larger than the data pixels.
+ If \a clipTight is TRUE the mask is just large enough to cover the
+ pixels; otherwise, the mask is larger than the data pixels.
This function disregards the \link hasAlphaBuffer() alpha buffer
\endlink.
@@ -7644,12 +7644,12 @@ TQDataStream &operator<<( TQDataStream &s, const BMP_INFOHDR &bi )
}
static
-int calc_shift(int tqmask)
+int calc_shift(int mask)
{
int result = 0;
- while (!(tqmask & 1)) {
+ while (!(mask & 1)) {
result++;
- tqmask >>= 1;
+ mask >>= 1;
}
return result;
}