Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
4.4.0
-
None
Description
Running the code below produces and saves an image that should be absolutely white, but instead has a black dot on the left edge. This happens on Window only, and seems to be related to some misdealing of coordinates higher than 2^15. Playing around with some other coordinates can also produce different artifacts such as lines crossing the image.
Test case main.cpp to reproduce:
//-------------------------------------------------
#include <QtGui>
int main( int argc, char * argv[] )
{
QApplication app( argc, argv );
QImage image( 100, 100, QImage::Format_RGB32 );
QPainter painter( & image );
painter.fillRect( image.rect(), Qt::white );
painter.drawLine( 32760, 50, 32770, 50 );
painter.end();
image.save( "test.png" );
return 0;
}
//-------------------------------------------------