Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
create polygon from list of points
ranshalit last edited by
I need to create a polygon (which can be filled) , from a list of points.
I see in https://forum.qt.io/topic/62142/qpainterpath-from-list-of-points that this my problem might already have a simple solution in Qt by using QPainterPathStroker .
I haven't tried it yet, but would first like to ask: Does the order of points matters here ?
Yes, the order of points in a path matters. Imagine 4 points of a rectangle. depending on the order you connect them in you'll get either a rectangle or an hourglass. How such intersecting geometry fills depends then on the fill rule of the path.