Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
I want to know the total size of a shape drawn with Painter.
Pada_ last edited by Pada_
I'm using Linux 64Bit, Qt 5.4.0.
Using the Painter's DrawPolygon, inside a rectangle of size from QPoint(0,0) to QPoint(100,100)
I drew my brother.
When the width of the pen is 1, it is drawn just inside the rectangular area, but when it is 10, it is drawn outside the area because it is thick.
Can you know the entire area to be drawn?
Kent-Dorfman last edited by
line drawing with width greater than one should average the line on both sides of the line's formula. (half inside, and half outside). Calculating the space inside the polygon is a math problem left as an exercise for you.