CGAL 6.0 - 2D Polygons
Loading...
Searching...
No Matches
Draw a 2D Polygon with Holes

#include<CGAL/draw_polygon_with_holes_2.h>

Functions

template<typename PH , class GSOptions >
void CGAL::draw (const PH &ph, const GSOptions &gso)
 opens a new window and draws a 2D polygon with holes.
 
template<class PH >
void CGAL::draw (const PH &ph)
 A shortcut to CGAL::draw(ph, Graphics_scene_options{}).
 
template<class PH , class GSOptions >
void CGAL::add_to_graphics_scene (const PH &ph, CGAL::Graphics_scene &gs, const GSOptions &gso)
 adds the vertices, edges and faces of ph into the given graphic scene gs.
 
template<class PH >
void CGAL::add_to_graphics_scene (const PH &ph, CGAL::Graphics_scene &gs)
 A shortcut to CGAL::add_to_graphics_scene(ph, gs, Graphics_scene_options{}).
 

Function Documentation

◆ add_to_graphics_scene()

template<class PH , class GSOptions >
void CGAL::add_to_graphics_scene ( const PH &  ph,
CGAL::Graphics_scene &  gs,
const GSOptions &  gso 
)

#include <CGAL/draw_polygon_with_holes_2.h>

adds the vertices, edges and faces of ph into the given graphic scene gs.

Parameters of the cells are taken from the optional graphics scene options parameter gso. Note that gs is not cleared before being filled (to enable to draw several data structures in the same basic viewer).

Template Parameters
PHwhich must be an instantiation of a CGAL::Polygon_with_holes_2<...>.
GSOptionsa model of GraphicsSceneOptions concept.
Parameters
phthe polygon with holes to draw.
gsthe graphic scene to fill.
gsothe graphics scene options parameter.
Advanced

The real declaration of this function template is:

template<class T, class C, class GSOptions>

void CGAL::add_to_graphics_scene(const CGAL::Polygon_with_holes_2<T, C>& ph, CGAL::Graphics_scene& gs, const GSOptions& gso);

◆ draw()

template<typename PH , class GSOptions >
void CGAL::draw ( const PH &  ph,
const GSOptions &  gso 
)

#include <CGAL/draw_polygon_with_holes_2.h>

opens a new window and draws a 2D polygon with holes.

Parameters of the drawing are taken from the optional graphics scene options parameter.

A call to this function blocks the execution of the program until the drawing window is closed. This function requires CGAL_Qt6, 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_Qt6 and add the definition CGAL_USE_BASIC_VIEWER.

Template Parameters
PHwhich must be an instantiation of a CGAL::Polygon_with_holes_2<...>.
GSOptionsa model of GraphicsSceneOptions concept.
Parameters
phthe polygon with holes to draw.
gsothe graphics scene options parameter.
Advanced

The real declaration of this function template is:

template<class T, class C, class GSOptions>

void CGAL::draw(const CGAL::Polygon_with_holes_2<T, C>& ph, const GSOptions& gso);