[Qtce-preview-feedback] QPainter drawPoint issue

Maurice Kalinowski mkalinow at trolltech.com
Mon Jun 2 09:03:03 CEST 2008


Hi,

George H. Locktish wrote:
>
> I am drawing points on the screen, and what I am noticing is that 
> sometimes the points are displayed and sometimes they aren’t.
>
> Here is the call stack of an attempt to display a point:
>
> QPainterPath::isEmpty(void) Line: 336
>
> QRasterPaintEngine::drawPath(QPainterPath& path = {...}) Line: 1712
>
> QRasterPaintEngine::drawPoints(QPointF* points = 0x20ba2e34, int 
> pointCount = 1) Line: 3148
>
> QPaintEngine::drawPoints(QPoint* points = 0x20ba36d0, int pointCount = 
> 1) Line: 426,
>
> QPainter::drawPoints(QPoint* points = 0x20ba36d0, int pointCount = 1) 
> Line: 3103
>
> QPainter::drawPoint(int x = 190, int y = 133) Line: 593
>
> I believe the issue is that when drawPath is called on 
> QRasterPaintEngine, the isEmpty call on line 1712 is returning true. 
> For the points that are being displayed, the isEmpty call is returning 
> false.
>
Potentially this might be related to the fact, that Qt for Windows 
Mobile defines qreal to be float instead of double as on the desktop 
systems. Thus, some rounding inprecision might lead to this behaviour. 
Could you try to reconfigure Qt with "-D QT_COORD_TYPE=double"? I have 
just recognized that this will lead to a compiling issue inside our 
testlib, but the rest should compile fine.

Alternatively, you can send us a code snippet reproducing this issue and 
we will try to take care of this.


Best Regards

Maurice Kalinowski




More information about the Qt-wince-interest mailing list