You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, August 5th 2005, 9:41am

QImage:ScanLine Index out of range

I'm dragging around curves on my canvas, and sometimes the program crashes with the above error. Why is this?
Could it be because my areaPoints "box" does not cover the curve entirely?

thanks in advance
[TTGUY]
[TTGUY] kr

2

Friday, August 5th 2005, 10:29am

RE: QImage:ScanLine Index out of range

I've found out that the error is occuring because an integer is greater than the height of an image. The following code is from QImage.h:

Source code

1
2
3
4
5
6
7
8
inline uchar *QImage::scanLine( int i ) const
{
#if defined(QT_CHECK_RANGE)
    if ( i >= data->h )
	warningIndexRange( "scanLine", i );
#endif
    return data->bits ? data->bits[i] : 0;
}


What is the int i parameter?
[TTGUY] kr

3

Friday, August 5th 2005, 1:11pm

RE: QImage:ScanLine Index out of range

Any ideas??
[TTGUY] kr