diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-13 17:43:39 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-13 17:43:39 -0600 |
commit | 359640943bcf155faa9a067dde9e00a123276290 (patch) | |
tree | fb3d55ea5e18949042fb0064123fb73d2b1eb932 /src/kernel/qimage.cpp | |
parent | a829bcdc533e154000803d517200d32fe762e85c (diff) | |
download | tqt3-359640943bcf155faa9a067dde9e00a123276290.tar.gz tqt3-359640943bcf155faa9a067dde9e00a123276290.zip |
Automated update from Qt3
Diffstat (limited to 'src/kernel/qimage.cpp')
-rw-r--r-- | src/kernel/qimage.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/kernel/qimage.cpp b/src/kernel/qimage.cpp index 56bd482e0..d904b28c7 100644 --- a/src/kernel/qimage.cpp +++ b/src/kernel/qimage.cpp @@ -498,11 +498,11 @@ TQImage::TQImage( uchar* yourdata, int w, int h, int depth, } else { // calloc since we realloc, etc. later (ick) data->ctbl = (TQRgb*)calloc( data->ncols*sizeof(TQRgb), data->ncols ); - Q_CHECK_PTR(data->ctbl); + TQ_CHECK_PTR(data->ctbl); data->ctbl_mine = TRUE; } uchar** jt = (uchar**)malloc(h*sizeof(uchar*)); - Q_CHECK_PTR(jt); + TQ_CHECK_PTR(jt); for (int j=0; j<h; j++) { jt[j] = yourdata+j*bpl; } @@ -548,11 +548,11 @@ TQImage::TQImage( uchar* yourdata, int w, int h, int depth, } else { // calloc since we realloc, etc. later (ick) data->ctbl = (TQRgb*)calloc( numColors*sizeof(TQRgb), numColors ); - Q_CHECK_PTR(data->ctbl); + TQ_CHECK_PTR(data->ctbl); data->ctbl_mine = TRUE; } uchar** jt = (uchar**)malloc(h*sizeof(uchar*)); - Q_CHECK_PTR(jt); + TQ_CHECK_PTR(jt); for (int j=0; j<h; j++) { jt[j] = yourdata+j*bpl; } @@ -1168,7 +1168,7 @@ void TQImage::setNumColors( int numColors ) (numColors-data->ncols)*sizeof(TQRgb) ); } else { // create new color table data->ctbl = (TQRgb*)calloc( numColors*sizeof(TQRgb), 1 ); - Q_CHECK_PTR(data->ctbl); + TQ_CHECK_PTR(data->ctbl); data->ctbl_mine = TRUE; } data->ncols = data->ctbl == 0 ? 0 : numColors; @@ -1297,7 +1297,7 @@ bool TQImage::create( int width, int height, int depth, int numColors, int ptbl = height*sizeof(uchar*); // pointer table size int size = nbytes + ptbl; // total size of data block uchar **p = (uchar **)malloc( size ); // alloc image bits - Q_CHECK_PTR(p); + TQ_CHECK_PTR(p); if ( !p ) { // no memory setNumColors( 0 ); return FALSE; @@ -1336,7 +1336,7 @@ bool TQImage::create( const TQSize& size, int depth, int numColors, void TQImage::init() { data = new TQImageData; - Q_CHECK_PTR( data ); + TQ_CHECK_PTR( data ); reinit(); } @@ -2977,8 +2977,8 @@ TQImage TQImage::xForm( const TQWMatrix &matrix ) const if ( mat.m12() == 0.0F && mat.m21() == 0.0F ) { if ( mat.m11() == 1.0F && mat.m22() == 1.0F ) // identity matrix return copy(); - hd = qRound( mat.m22() * hs ); - wd = qRound( mat.m11() * ws ); + hd = tqRound( mat.m22() * hs ); + wd = tqRound( mat.m11() * ws ); hd = TQABS( hd ); wd = TQABS( wd ); } else { // rotation or shearing @@ -3897,7 +3897,7 @@ void qt_init_image_handlers() // initialize image handlers { if ( !imageHandlers ) { imageHandlers = new TQIHList; - Q_CHECK_PTR( imageHandlers ); + TQ_CHECK_PTR( imageHandlers ); imageHandlers->setAutoDelete( TRUE ); qAddPostRoutine( cleanup ); #ifndef QT_NO_IMAGEIO_BMP @@ -4016,7 +4016,7 @@ void TQImageIO::defineIOHandler( const char *format, TQImageHandler *p; p = new TQImageHandler( format, header, flags, readImage, writeImage ); - Q_CHECK_PTR( p ); + TQ_CHECK_PTR( p ); imageHandlers->insert( 0, p ); } @@ -4765,7 +4765,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image ) else if ( nbits == 4 ) { // 4 bit BMP image int buflen = ((w+7)/8)*4; uchar *buf = new uchar[buflen]; - Q_CHECK_PTR( buf ); + TQ_CHECK_PTR( buf ); if ( comp == BMP_RLE4 ) { // run length compression int x=0, y=0, b, c, i; register uchar *p = line[h-1]; @@ -4957,7 +4957,7 @@ static void read_bmp_image( TQImageIO *iio ) s.setByteOrder( TQDataStream::LittleEndian );// Intel byte order s >> bf; // read BMP file header - if ( qstrncmp(bf.bfType,"BM",2) != 0 ) // not a BMP image + if ( tqstrncmp(bf.bfType,"BM",2) != 0 ) // not a BMP image return; TQImage image; @@ -5584,11 +5584,11 @@ static void write_xbm_image( TQImageIO *iio ) char *buf = new char[s.length() + 100]; sprintf( buf, "#define %s_width %d\n", s.ascii(), w ); - d->writeBlock( buf, qstrlen(buf) ); + d->writeBlock( buf, tqstrlen(buf) ); sprintf( buf, "#define %s_height %d\n", s.ascii(), h ); - d->writeBlock( buf, qstrlen(buf) ); + d->writeBlock( buf, tqstrlen(buf) ); sprintf( buf, "static char %s_bits[] = {\n ", s.ascii() ); - d->writeBlock( buf, qstrlen(buf) ); + d->writeBlock( buf, tqstrlen(buf) ); iio->setStatus( 0 ); @@ -5627,7 +5627,7 @@ static void write_xbm_image( TQImageIO *iio ) *p++ = '\n'; *p++ = ' '; *p = '\0'; - if ( (int)qstrlen(buf) != d->writeBlock( buf, qstrlen(buf) ) ) { + if ( (int)tqstrlen(buf) != d->writeBlock( buf, tqstrlen(buf) ) ) { iio->setStatus( 1 ); delete [] buf; return; @@ -5639,7 +5639,7 @@ static void write_xbm_image( TQImageIO *iio ) } } strcpy( p, " };\n" ); - if ( (int)qstrlen(buf) != d->writeBlock( buf, qstrlen(buf) ) ) + if ( (int)tqstrlen(buf) != d->writeBlock( buf, tqstrlen(buf) ) ) iio->setStatus( 1 ); delete [] buf; } @@ -6082,10 +6082,10 @@ void bitBlt( TQImage* dst, int dx, int dy, const TQImage* src, // - 1 bit, identical palette and byte-aligned area // if ( haveSamePalette(*dst,*src) - && ( dst->depth() != 1 || - !( (dx&7) || (sx&7) || - ((sw&7) && (sx+sw < src->width()) || - (dx+sw < dst->width()) ) ) ) ) + && ( (dst->depth() != 1) || + (!( (dx&7) || (sx&7) || + (((sw&7) && (sx+sw < src->width())) || + (dx+sw < dst->width()) ) )) ) ) { // easy to copy } else if ( dst->depth() != 32 ) { @@ -6103,7 +6103,7 @@ void bitBlt( TQImage* dst, int dx, int dy, const TQImage* src, // Now assume palette can be ignored if ( dst->depth() != src->depth() ) { - if ( sw == src->width() && sh == src->height() || dst->depth()==32 ) { + if ( ((sw == src->width()) && (sh == src->height())) || (dst->depth()==32) ) { TQImage srcconv = src->convertDepth( dst->depth(), conversion_flags ); bitBlt( dst, dx, dy, &srcconv, sx, sy, sw, sh, conversion_flags ); } else { |