CGAL 5.6.3 - 2D Polygons

Loading...
Searching...
No Matches
Functions
Draw a 2D Polygon
2D Polygon Reference

##

#include <CGAL/draw_polygon_2.h>

## Functions
template<class P >
void | CGAL::draw (const P &ap)
| opens a new window and draws `ap`, an instance of the `CGAL::Polygon_2` class.

## Function Documentation

## ◆ draw()

template<class P >

void CGAL::draw | ( | const P & | ap | ) |

`#include <CGAL/draw_polygon_2.h>`

opens a new window and draws `ap`, an instance of the `CGAL::Polygon_2` class.

A call to this function is blocking, that is the program continues as soon as the user closes the window. This function requires `CGAL_Qt5`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined. Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt5` and add the definition `CGAL_USE_BASIC_VIEWER`.

Template Parameters

  P | an instance of the `CGAL::Polygon_2` class.

Parameters

  ap | the polygon to draw.

Examples
  Polygon/draw_polygon.cpp, and Polygon/draw_polygon_with_holes.cpp.