QPolygonF is a class in the Qt library of C++ that represents a polygon in a 2D coordinate space. It is a container class that holds a list of QPointF objects representing the vertices of the polygon.
Example 1: Creating a QPolygonF object and adding vertices to it
if(polygon.containsPoint(point, Qt::WindingFill)) { // point is inside the polygon }
This code creates a new instance of QPolygonF and adds four vertices to it to create a square. It then checks if a point with coordinates (5, 5) is inside the polygon using the containsPoint() method.
The QPolygonF class is part of the Qt Widgets module in the Qt library.
C++ (Cpp) QPolygonF::at - 30 examples found. These are the top rated real world C++ (Cpp) examples of QPolygonF::at extracted from open source projects. You can rate examples to help us improve the quality of examples.