diff options
Diffstat (limited to 'src/kernel/tqpixmap.cpp')
| -rw-r--r-- | src/kernel/tqpixmap.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/src/kernel/tqpixmap.cpp b/src/kernel/tqpixmap.cpp index c3eceba6b..db404beee 100644 --- a/src/kernel/tqpixmap.cpp +++ b/src/kernel/tqpixmap.cpp @@ -207,7 +207,7 @@ TQPixmap::TQPixmap( int w, int h, int depth, bool bitmap, TQPixmap::TQPixmap() : TQPaintDevice( TQInternal::Pixmap ) { - init( 0, 0, 0, FALSE, defOptim ); + init( 0, 0, 0, false, defOptim ); } /*! @@ -219,7 +219,7 @@ TQPixmap::TQPixmap() TQPixmap::TQPixmap( const TQImage& image ) : TQPaintDevice( TQInternal::Pixmap ) { - init( 0, 0, 0, FALSE, defOptim ); + init( 0, 0, 0, false, defOptim ); convertFromImage( image ); } @@ -242,7 +242,7 @@ TQPixmap::TQPixmap( const TQImage& image ) TQPixmap::TQPixmap( int w, int h, int depth, Optimization optimization ) : TQPaintDevice( TQInternal::Pixmap ) { - init( w, h, depth, FALSE, optimization ); + init( w, h, depth, false, optimization ); } /*! @@ -255,7 +255,7 @@ TQPixmap::TQPixmap( int w, int h, int depth, Optimization optimization ) TQPixmap::TQPixmap( const TQSize &size, int depth, Optimization optimization ) : TQPaintDevice( TQInternal::Pixmap ) { - init( size.width(), size.height(), depth, FALSE, optimization ); + init( size.width(), size.height(), depth, false, optimization ); } #ifndef TQT_NO_IMAGEIO @@ -281,7 +281,7 @@ TQPixmap::TQPixmap( const TQString& fileName, const char *format, int conversion_flags ) : TQPaintDevice( TQInternal::Pixmap ) { - init( 0, 0, 0, FALSE, defOptim ); + init( 0, 0, 0, false, defOptim ); load( fileName, format, conversion_flags ); } @@ -302,7 +302,7 @@ TQPixmap::TQPixmap( const TQString& fileName, const char *format, TQPixmap::TQPixmap( const TQString& fileName, const char *format, ColorMode mode ) : TQPaintDevice( TQInternal::Pixmap ) { - init( 0, 0, 0, FALSE, defOptim ); + init( 0, 0, 0, false, defOptim ); load( fileName, format, mode ); } @@ -332,7 +332,7 @@ TQPixmap::TQPixmap( const TQString& fileName, const char *format, ColorMode mode TQPixmap::TQPixmap( const char *xpm[] ) : TQPaintDevice( TQInternal::Pixmap ) { - init( 0, 0, 0, FALSE, defOptim ); + init( 0, 0, 0, false, defOptim ); TQImage image( xpm ); if ( !image.isNull() ) convertFromImage( image ); @@ -348,7 +348,7 @@ TQPixmap::TQPixmap( const char *xpm[] ) TQPixmap::TQPixmap( const TQByteArray & img_data ) : TQPaintDevice( TQInternal::Pixmap ) { - init( 0, 0, 0, FALSE, defOptim ); + init( 0, 0, 0, false, defOptim ); loadFromData( img_data ); } #endif //TQT_NO_IMAGEIO @@ -437,7 +437,7 @@ TQPixmap TQPixmap::copy( bool ignoreMask ) const #endif // TQ_WS_X11 if ( ignoreMask ) - bitBlt( &pm, 0, 0, this, 0, 0, data->w, data->h, TQt::CopyROP, TRUE ); + bitBlt( &pm, 0, 0, this, 0, 0, data->w, data->h, TQt::CopyROP, true ); else copyBlt( &pm, 0, 0, this, 0, 0, data->w, data->h ); } @@ -468,7 +468,7 @@ TQPixmap &TQPixmap::operator=( const TQPixmap &pixmap ) if ( pixmap.paintingActive() ) { // make a deep copy init( pixmap.width(), pixmap.height(), pixmap.depth(), pixmap.data->bitmap, pixmap.data->optim ); - data->uninit = FALSE; + data->uninit = false; if ( !isNull() ) copyBlt( this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height() ); pixmap.data->deref(); @@ -508,13 +508,13 @@ TQPixmap &TQPixmap::operator=( const TQImage &image ) /*! \fn bool TQPixmap::isTQBitmap() const - Returns TRUE if this is a TQBitmap; otherwise returns FALSE. + Returns true if this is a TQBitmap; otherwise returns false. */ /*! \fn bool TQPixmap::isNull() const - Returns TRUE if this is a null pixmap; otherwise returns FALSE. + Returns true if this is a null pixmap; otherwise returns false. A null pixmap has zero width, zero height and no contents. You cannot draw in a null pixmap or bitBlt() anything to it. @@ -666,7 +666,7 @@ void TQPixmap::resize( int w, int h ) if ( !data->uninit && !isNull() ) // has existing pixmap bitBlt( &pm, 0, 0, this, 0, 0, // copy old pixmap TQMIN(width(), w), - TQMIN(height(),h), CopyROP, TRUE ); + TQMIN(height(),h), CopyROP, true ); #if defined(TQ_WS_MAC) if(data->alphapm) { data->alphapm->resize(w, h); @@ -724,16 +724,16 @@ void TQPixmap::setMask( const TQBitmap &newmask ) const TQPixmap *tmp = &newmask; // dec cxx bug if ( (data == tmp->data) || ( newmask.handle() && newmask.handle() == handle() ) ) { - TQPixmap m = tmp->copy( TRUE ); + TQPixmap m = tmp->copy( true ); setMask( *((TQBitmap*)&m) ); - data->selfmask = TRUE; // mask == pixmap + data->selfmask = true; // mask == pixmap return; } if ( newmask.isNull() ) { // reset the mask if (data->mask) { detach(); - data->selfmask = FALSE; + data->selfmask = false; delete data->mask; data->mask = 0; @@ -742,7 +742,7 @@ void TQPixmap::setMask( const TQBitmap &newmask ) } detach(); - data->selfmask = FALSE; + data->selfmask = false; if ( newmask.width() != width() || newmask.height() != height() ) { #if defined(QT_CHECK_RANGE) @@ -760,7 +760,7 @@ void TQPixmap::setMask( const TQBitmap &newmask ) delete data->mask; TQBitmap* newmaskcopy; if ( newmask.mask() ) - newmaskcopy = (TQBitmap*)new TQPixmap( tmp->copy( TRUE ) ); + newmaskcopy = (TQBitmap*)new TQPixmap( tmp->copy( true ) ); else newmaskcopy = new TQBitmap( newmask ); #ifdef TQ_WS_X11 @@ -773,8 +773,8 @@ void TQPixmap::setMask( const TQBitmap &newmask ) /*! \fn bool TQPixmap::selfMask() const - Returns TRUE if the pixmap's mask is identical to the pixmap - itself; otherwise returns FALSE. + Returns true if the pixmap's mask is identical to the pixmap + itself; otherwise returns false. \sa mask() */ @@ -795,7 +795,7 @@ void TQPixmap::setMask( const TQBitmap &newmask ) TQImage, non-trivial computations and a transformation back to a TQBitmap. - If \a clipTight is TRUE the mask is just large enough to cover the + If \a clipTight is true the mask is just large enough to cover the pixels; otherwise, the mask is larger than the data pixels. \sa TQImage::createHeuristicMask() @@ -825,8 +825,8 @@ const char* TQPixmap::imageFormat( const TQString &fileName ) } /*! - Loads a pixmap from the file \a fileName at runtime. Returns TRUE - if successful; otherwise returns FALSE. + Loads a pixmap from the file \a fileName at runtime. Returns true + if successful; otherwise returns false. If \a format is specified, the loader attempts to read the pixmap using the specified format. If \a format is not specified @@ -892,7 +892,7 @@ bool TQPixmap::load( const TQString &fileName, const char *format, \overload Converts \a image and sets this pixmap using color mode \a mode. - Returns TRUE if successful; otherwise returns FALSE. + Returns true if successful; otherwise returns false. \sa TQPixmap::ColorMode */ @@ -902,7 +902,7 @@ bool TQPixmap::convertFromImage( const TQImage &image, ColorMode mode ) if ( image.isNull() ) { // convert null image to null pixmap *this = TQPixmap(); - return TRUE; + return true; } int conversion_flags = 0; @@ -922,7 +922,7 @@ bool TQPixmap::convertFromImage( const TQImage &image, ColorMode mode ) #ifndef TQT_NO_IMAGEIO /*! Loads a pixmap from the binary data in \a buf (\a len bytes). - Returns TRUE if successful; otherwise returns FALSE. + Returns true if successful; otherwise returns false. If \a format is specified, the loader attempts to read the pixmap using the specified format. If \a format is not specified @@ -961,8 +961,8 @@ bool TQPixmap::loadFromData( const uchar *buf, uint len, const char *format, \overload Loads a pixmap from the binary data in \a buf (\a len bytes) using - color mode \a mode. Returns TRUE if successful; otherwise returns - FALSE. + color mode \a mode. Returns true if successful; otherwise returns + false. If \a format is specified, the loader attempts to read the pixmap using the specified format. If \a format is not specified @@ -1006,8 +1006,8 @@ bool TQPixmap::loadFromData( const TQByteArray &buf, const char *format, format \a format and a quality factor \a quality. \a quality must be in the range [0,100] or -1. Specify 0 to obtain small compressed files, 100 for large uncompressed files, and -1 to use - the default settings. Returns TRUE if successful; otherwise - returns FALSE. + the default settings. Returns true if successful; otherwise + returns false. \sa load(), loadFromData(), imageFormat(), TQImage::save(), TQImageIO @@ -1016,7 +1016,7 @@ bool TQPixmap::loadFromData( const TQByteArray &buf, const char *format, bool TQPixmap::save( const TQString &fileName, const char *format, int quality ) const { if ( isNull() ) - return FALSE; // nothing to save + return false; // nothing to save TQImageIO io( fileName, format ); return doImageIO( &io, quality ); } @@ -1039,7 +1039,7 @@ bool TQPixmap::save( const TQString &fileName, const char *format, int quality ) bool TQPixmap::save( TQIODevice* device, const char* format, int quality ) const { if ( isNull() ) - return FALSE; // nothing to save + return false; // nothing to save TQImageIO io( device, format ); return doImageIO( &io, quality ); } @@ -1050,7 +1050,7 @@ bool TQPixmap::save( TQIODevice* device, const char* format, int quality ) const bool TQPixmap::doImageIO( TQImageIO* io, int quality ) const { if ( !io ) - return FALSE; + return false; io->setImage( convertToImage() ); #if defined(QT_CHECK_RANGE) if ( quality > 100 || quality < -1 ) @@ -1116,8 +1116,8 @@ static TQPixmap grabChildWidgets( TQWidget * w ) TQPaintDevice *oldRedirect = TQPainter::redirect( w ); TQPainter::redirect( w, &res ); bool dblbfr = TQSharedDoubleBuffer::isDisabled(); - TQSharedDoubleBuffer::setDisabled( TRUE ); - TQPaintEvent e( w->rect(), FALSE ); + TQSharedDoubleBuffer::setDisabled( true ); + TQPaintEvent e( w->rect(), false ); TQApplication::sendEvent( w, &e ); TQSharedDoubleBuffer::setDisabled( dblbfr ); TQPainter::redirect( w, oldRedirect ); @@ -1450,7 +1450,7 @@ bool qt_xForm_helper( const TQWMatrix &trueMat, int xoffset, break; default: { - return FALSE; + return false; } } } else { @@ -1502,7 +1502,7 @@ bool qt_xForm_helper( const TQWMatrix &trueMat, int xoffset, m22ydy += m22; dptr += p_inc; } - return TRUE; + return true; } #undef IWX_MSB #undef IWX_LSB |
