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.
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]](wcf/images/smilies/on.gif)
kr
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]](wcf/images/smilies/on.gif)
kr
RE: QImage:ScanLine Index out of range
![[TTGUY]](wcf/images/smilies/on.gif)
kr