PDA

View Full Version : QPixmap size limitation



Thuan Seah Tan
20th February 2012, 23:15
Hi guys,

I did a search and most people who encountered issues due to QPixmap size limitation seems to report the QPixmap is null or invalid. I tried to create a QPixmap on my machine (windows 7 64bit) and the QPixmap returned was of the correct size (i.e. 40000 width by 100 height). The issue I encountered was during the drawing stage where calling QPainter's drawPixmap or drawTiledPixmap would simply clip any bits of the image that is past 32000 (or around 32768) so the image gets partially drawn.

Is this a known issue?

Thuan

ChrisW67
20th February 2012, 23:33
QPainter Limitations

Thuan Seah Tan
20th February 2012, 23:50
Thanks for the link. I do notice however, if I were to draw everything I intend to draw (ie QPainterPath) directly on the QPainter passed to the paint function of the QGraphicsWidget it seems to work fine. It's only if I draw the QPainterPath onto a QPixmap and then drawing the pixmap that is causing the clipping issue. Is drawing a path not using the raster-based paint engine?

ChrisW67
21st February 2012, 00:26
Yes, possibly, but it is exercising different code paths that may be doing things slightly differently. The statement about short int limitations is a little vague "not guaranteed to be shown".