An object of type Qt_widget_get_simple_polygon<Polygon> creates a CGAL simple polygon. A new vertex is inserted every time the left mouse button is pressed, if the polyline entered so far is simple. A right click closes the polygon, if it is simple. You can use the Escape key if you want to remove your last entered point in the polygon.

#include <CGAL/IO/Qt_widget_get_simple_polygon.h>


The full template declaration of Qt_widget_get_simple_polygon states one parameter:

template < class Polygon >
class Qt_widget_get_simple_polygon;

Polygon should be a CGAL Polygon, or it should provide the following types:.


typedef Polygon::Point_2 Point_2;

typedef Polygon::Segment_2 Segment2;

typedef Polygon::Edge_const_iterator

Inherits From



Qt_widget_get_simple_polygon<Polygon> getspoly ( const QCursor c=QCursor(Qt::crossCursor), QObject* parent = 0, const char* name = 0);
c is the cursor that this layer will use when is active. parent is the parent widget and name is the name you give to this layer.