summaryrefslogtreecommitdiffstats
path: root/tqtinterface/qt4/src/kernel/tqpixmap_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tqtinterface/qt4/src/kernel/tqpixmap_x11.cpp')
-rw-r--r--tqtinterface/qt4/src/kernel/tqpixmap_x11.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/tqtinterface/qt4/src/kernel/tqpixmap_x11.cpp b/tqtinterface/qt4/src/kernel/tqpixmap_x11.cpp
index 37bb0ee..1caf3a3 100644
--- a/tqtinterface/qt4/src/kernel/tqpixmap_x11.cpp
+++ b/tqtinterface/qt4/src/kernel/tqpixmap_x11.cpp
@@ -482,7 +482,7 @@ void TQPixmap::init( int w, int h, int d, bool bitmap, Optimization optim )
void TQPixmap::deref()
{
if ( data && data->deref() ) { // last reference lost
- delete data->tqmask;
+ delete data->mask;
delete data->alphapm;
if ( data->ximage )
qSafeXDestroyImage( (XImage*)data->ximage );
@@ -617,8 +617,8 @@ int TQPixmap::defaultDepth()
Sets pixmap drawing optimization for this pixmap.
The \a optimization setting affects pixmap operations, in
- particular drawing of transtqparent pixmaps (bitBlt() a pixmap with
- a tqmask set) and pixmap transformations (the xForm() function).
+ particular drawing of transparent pixmaps (bitBlt() a pixmap with
+ a mask set) and pixmap transformations (the xForm() function).
Pixmap optimization involves keeping intermediate results in a
cache buffer and using the cache to speed up bitBlt() and xForm().
@@ -781,7 +781,7 @@ TQImage TQPixmap::convertToImage() const
return image;
}
- const TQPixmap* msk = tqmask();
+ const TQPixmap* msk = mask();
const TQPixmap *alf = data->alphapm;
TQImage alpha;
@@ -1032,7 +1032,7 @@ TQImage TQPixmap::convertToImage() const
image.setColor( trans, 0x00000000 );
} else {
image.setNumColors( ncols ); // create color table
- // oh dear... no spare "transtqparent" pixel.
+ // oh dear... no spare "transparent" pixel.
// use first pixel in image (as good as any).
trans = image.scanLine( i )[0];
}
@@ -1128,9 +1128,9 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
if ( w >= 32768 || h >= 32768 )
return FALSE;
- // get rid of the tqmask
- delete data->tqmask;
- data->tqmask = 0;
+ // get rid of the mask
+ delete data->mask;
+ data->mask = 0;
// get rid of alpha pixmap
delete data->alphapm;
@@ -1404,18 +1404,18 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
? g << green_shift : g >> -green_shift; \
b = blue_shift > 0 \
? b << blue_shift : b >> -blue_shift; \
- pixel = (r & red_tqmask)|(g & green_tqmask) | (b & blue_tqmask) \
+ pixel = (r & red_mask)|(g & green_mask) | (b & blue_mask) \
| ~(blue_mask | green_mask | red_mask); \
}
-// optimized case - no d8 case, shift only once instead of twice, tqmask only once instead of twice,
+// optimized case - no d8 case, shift only once instead of twice, mask only once instead of twice,
// use direct values instead of variables, and use only one statement
// (*p >> 16), (*p >> 8 ) and (*p) are tqRed(),tqGreen() and tqBlue() without masking
// shifts have to be passed including the shift operator (e.g. '>>3'), because of the direction
-#define GET_PIXEL_OPT(red_shift,green_shift,blue_shift,red_tqmask,green_tqmask,blue_tqmask) \
- int pixel = ((( *p >> 16 ) red_shift ) & red_tqmask ) \
- | ((( *p >> 8 ) green_shift ) & green_tqmask ) \
- | ((( *p ) blue_shift ) & blue_tqmask ); \
+#define GET_PIXEL_OPT(red_shift,green_shift,blue_shift,red_mask,green_mask,blue_mask) \
+ int pixel = ((( *p >> 16 ) red_shift ) & red_mask ) \
+ | ((( *p >> 8 ) green_shift ) & green_mask ) \
+ | ((( *p ) blue_shift ) & blue_mask ); \
++p;
@@ -1443,7 +1443,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
// again, optimized case
// can't be optimized that much :(
-#define GET_PIXEL_DITHER_TC_OPT(red_shift,green_shift,blue_shift,red_tqmask,green_tqmask,blue_tqmask, \
+#define GET_PIXEL_DITHER_TC_OPT(red_shift,green_shift,blue_shift,red_mask,green_mask,blue_mask, \
rbits,gbits,bbits) \
const int thres = D[x%16][y%16]; \
int r = tqRed ( *p ); \
@@ -1458,9 +1458,9 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
if ( b <= (255-(1<<(8-bbits))) && ((b<<bbits) & 255) \
> thres) \
b += (1<<(8-bbits)); \
- int pixel = (( r red_shift ) & red_tqmask ) \
- | (( g green_shift ) & green_tqmask ) \
- | (( b blue_shift ) & blue_tqmask );
+ int pixel = (( r red_shift ) & red_mask ) \
+ | (( g green_shift ) & green_mask ) \
+ | (( b blue_shift ) & blue_mask );
#define CYCLE(body) \
for ( uint y=0; y<h; y++ ) { \
@@ -1841,7 +1841,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
setMask( m );
#ifndef TQT_NO_XFTFREETYPE
- // does this image have an alphamap (and not just a 1bpp tqmask)?
+ // does this image have an alphamap (and not just a 1bpp mask)?
bool alphamap = image.depth() == 32;
if (image.depth() == 8) {
const TQRgb * const rgb = image.colorTable();
@@ -2221,11 +2221,11 @@ TQPixmap TQPixmap::xForm( const TQWMatrix &matrix ) const
TQPixmap pm( w, h, dptr, TQImage::systemBitOrder() != TQImage::BigEndian );
pm.data->bitmap = data->bitmap;
free( dptr );
- if ( data->tqmask ) {
- if ( data->selfmask ) // pixmap == tqmask
+ if ( data->mask ) {
+ if ( data->selfmask ) // pixmap == mask
pm.setMask( *((TQBitmap*)(&pm)) );
else
- pm.setMask( data->tqmask->xForm(matrix) );
+ pm.setMask( data->mask->xForm(matrix) );
}
return pm;
} else { // color pixmap
@@ -2246,8 +2246,8 @@ TQPixmap TQPixmap::xForm( const TQWMatrix &matrix ) const
}
#endif
- if ( data->tqmask ) // xform tqmask, too
- pm.setMask( data->tqmask->xForm(matrix) );
+ if ( data->mask ) // xform mask, too
+ pm.setMask( data->mask->xForm(matrix) );
#ifndef TQT_NO_XFTFREETYPE
if ( qt_use_xrender && qt_has_xft && data->alphapm ) { // xform the alpha channel
@@ -2359,23 +2359,23 @@ void TQPixmap::x11SetScreen( int screen )
}
/*!
- Returns TRUE this pixmap has an alpha channel or a tqmask.
+ Returns TRUE this pixmap has an alpha channel or a mask.
- \sa hasAlphaChannel() tqmask()
+ \sa hasAlphaChannel() mask()
*/
bool TQPixmap::hasAlpha() const
{
- return data->alphapm || data->tqmask;
+ return data->alphapm || data->mask;
}
/*!
Returns TRUE if the pixmap has an alpha channel; otherwise it
returns FALSE.
- NOTE: If the pixmap has a tqmask but not alpha channel, this
+ NOTE: If the pixmap has a mask but not alpha channel, this
function returns FALSE.
- \sa hasAlpha() tqmask()
+ \sa hasAlpha() mask()
*/
bool TQPixmap::hasAlphaChannel() const
{
@@ -2386,7 +2386,7 @@ bool TQPixmap::hasAlphaChannel() const
\relates TQPixmap
Copies a block of pixels from \a src to \a dst. The alpha channel
- and tqmask data (if any) is also copied from \a src. NOTE: \a src
+ and mask data (if any) is also copied from \a src. NOTE: \a src
is \e not alpha blended or masked when copied to \a dst. Use
bitBlt() or TQPainter::drawPixmap() to perform alpha blending or
masked drawing.
@@ -2416,17 +2416,17 @@ TQ_EXPORT void copyBlt( TQPixmap *dst, int dx, int dy,
// copy pixel data
bitBlt( dst, dx, dy, src, sx, sy, sw, sh, TQt::CopyROP, TRUE );
- // copy tqmask data
- if ( src->data->tqmask ) {
- if ( ! dst->data->tqmask ) {
- dst->data->tqmask = new TQBitmap( dst->width(), dst->height() );
+ // copy mask data
+ if ( src->data->mask ) {
+ if ( ! dst->data->mask ) {
+ dst->data->mask = new TQBitmap( dst->width(), dst->height() );
// new masks are fully opaque by default
- dst->data->tqmask->fill( TQt::color1 );
+ dst->data->mask->fill( TQt::color1 );
}
- bitBlt( dst->data->tqmask, dx, dy,
- src->data->tqmask, sx, sy, sw, sh, TQt::CopyROP, TRUE );
+ bitBlt( dst->data->mask, dx, dy,
+ src->data->mask, sx, sy, sw, sh, TQt::CopyROP, TRUE );
}
#ifndef TQT_NO_XFTFREETYPE