Are we supposed to accomodate half of the pen width extra for non rectangular items , which draws rect only when selected ?
Are we supposed to accomodate half of the pen width extra for non rectangular items , which draws rect only when selected ?
The biggest difference between time and space is that you can't reuse time.
-- Merrick Furst
I think yes...
from the docs...
Even if u are drawing non rectangular items, the top/bottom or right/left side will touch the rectangle...Note: For shapes that paint an outline / stroke, it is important to include half the pen width in the bounding rect. It is not necessary to compensate for antialiasing, though.
hope i am right![]()
You are. Lines, rectangles, ellipses, every shape whose outline touches the bounding rect needs to add half the pen width in boundingRect(). All Qt's standard items do this.
Bitto / Andreas Aardal Hanssen - andreas dot aardal dot hanssen at nokia
Nokia Software Manager, Qt Development
Thanks to you both.
The biggest difference between time and space is that you can't reuse time.
-- Merrick Furst
Bookmarks