PDA

View Full Version : drawPoint not centered



Alundra
3rd November 2013, 04:58
Hi all,
I draw a circle with a dot inside on the center using this code :


p.setBrush( Qt::NoBrush );
p.setPen( Qt::white );
p.drawEllipse( m_CursorPos, 5, 5 );
p.drawPoint( m_CursorPos );

But I see the point is not centered, is it normal ?
Thanks for the help

ChrisW67
3rd November 2013, 08:38
It is likely the result of the difference between the logical point and the actual point. Have a read of the Coordinate System. A circle of diameter 10 has no single pixel at the centre.

You may also find difference between if m_CursorPos as QPoint or QPointF.