summaryrefslogtreecommitdiffstats
path: root/src/imageutils/croppedqimage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imageutils/croppedqimage.cpp')
-rw-r--r--src/imageutils/croppedqimage.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/imageutils/croppedqimage.cpp b/src/imageutils/croppedqimage.cpp
index 0271e85..7f47366 100644
--- a/src/imageutils/croppedqimage.cpp
+++ b/src/imageutils/croppedqimage.cpp
@@ -23,43 +23,43 @@
namespace ImageUtils
{
-// This class is used in ImageView::performPaint(). Just using QImage::copy( QRect )
+// This class is used in ImageView::performPaint(). Just using TQImage::copy( TQRect )
// takes a significant time with very large images. So instead of copying the image data
-// just create CroppedQImage which fakes a subimage by manipulating its scanline pointers.
+// just create CroppedTQImage which fakes a subimage by manipulating its scanline pointers.
// That will of course break if something doesn't use scanlines but accesses the image
-// data directly, QImage::copy() being the most notable case. There are two ways
+// data directly, TQImage::copy() being the most notable case. There are two ways
// to handle that: 1) It is possible to manually call normalize() which will make
-// CroppedQImage copy the image data and own it, just like proper QImage. 2) CroppedQImage
-// has as a data member also QImage holding the original image. This ensures that all
-// the original image data are still available for the whole lifetime of CroppedQImage.
+// CroppedTQImage copy the image data and own it, just like proper TQImage. 2) CroppedTQImage
+// has as a data member also TQImage holding the original image. This ensures that all
+// the original image data are still available for the whole lifetime of CroppedTQImage.
-CroppedQImage::CroppedQImage( const QImage& im, const QRect& rect )
- : QImage( rect.size(), im.depth(), im.numColors(), im.bitOrder())
+CroppedTQImage::CroppedTQImage( const TQImage& im, const TQRect& rect )
+ : TQImage( rect.size(), im.depth(), im.numColors(), im.bitOrder())
, orig( im )
{
if( im.isNull())
return;
- memcpy( colorTable(), im.colorTable(), im.numColors() * sizeof( QRgb ));
+ memcpy( tqcolorTable(), im.tqcolorTable(), im.numColors() * sizeof( TQRgb ));
setAlphaBuffer( im.hasAlphaBuffer());
setDotsPerMeterX( im.dotsPerMeterX());
setDotsPerMeterY( im.dotsPerMeterY());
//data->offset = im.offset();
- // make scanlines point to right places in the original QImage
+ // make scanlines point to right places in the original TQImage
for( int i = 0;
i < height();
++i )
- jumpTable()[ i ] = im.scanLine( rect.y() + i ) + rect.x() * ( depth() / 8 );
+ const_cast<CroppedTQImage*>(this)->jumpTable()[ i ] = const_cast<TQImage&>(im).scanLine( rect.y() + i ) + rect.x() * ( depth() / 8 );
}
-CroppedQImage& CroppedQImage::operator= ( const QImage& im )
+CroppedTQImage& CroppedTQImage::operator= ( const TQImage& im )
{
- QImage::operator=( im );
+ TQImage::operator=( im );
return *this;
}
-void CroppedQImage::normalize()
+void CroppedTQImage::normalize()
{
- // is it a normal QImage with its own data?
+ // is it a normal TQImage with its own data?
uchar* firstdata = ( uchar* )( jumpTable() + height());
if( scanLine( 0 ) == firstdata )
return;