diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/draw_arrangement_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/draw_arrangement_2.h index 51507311b8d..9ba97a1c529 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/draw_arrangement_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/draw_arrangement_2.h @@ -26,11 +26,11 @@ namespace CGAL { /*! \ingroup PkgArrangementOnSurface2Draw * * opens a new window and draws `arr`, an instance of the `CGAL::Arrangement_2` - * class template. A call to this function is blocking; that is, the program - * continues only after the user closes the window. 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`. + * class template. 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`. + * * \tparam GeometryTraits_2 a geometry traits type, a model of a 2D arrangement * traits concept. At this point it must be an instance of either @@ -44,9 +44,39 @@ namespace CGAL { * \sa `ArrangementDcel` * \sa `ArrangementTraits_2` */ +template +void draw(const Arrangement_2& arr, const GSOptions& gso); + +/*! \ingroup PkgArrangementOnSurface2Draw + + A shortcut to `CGAL::draw(arr, Graphics_scene_options{})`. + */ template -void draw(const Arrangement_2& arr, - const char* title = "2D Arrangement Basic Viewer"); +void draw(const Arrangement_2& arr); + +/*! \ingroup PkgArrangementOnSurface2Draw + +adds the vertices, edges and faces of `arr` 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). + +\tparam GeometryTraits_2 a geometry traits type, a model of a 2D arrangement traits concept. At this point it must be an instance of either `CGAL::Arr_segment_traits_2` or `CGAL::Arr_conic_traits_2`. +\tparam Dcel the \dcel type, a model of the `ArrangementDcel` concept. +\tparam GSOptions a model of `GraphicsSceneOptions` concept. + +\param arr the 2D arrangement to draw. +\param gs the graphic scene to fill. +\param gso the graphics scene options parameter. + */ +template +void add_to_graphics_scene(const Arrangement_2& arr, + CGAL::Graphics_scene& gs, const GSOptions& gso); + +/*! \ingroup PkgArrangementOnSurface2Draw + + A shortcut to `CGAL::add_to_graphics_scene(arr, gs, Graphics_scene_options{})`. + */ +template +void add_to_graphics_scene(const Arrangement_2& arr, + CGAL::Graphics_scene& gs); } /* namespace CGAL */ diff --git a/Surface_mesh_topology/doc/Surface_mesh_topology/CGAL/draw_face_graph_with_paths.h b/Surface_mesh_topology/doc/Surface_mesh_topology/CGAL/draw_face_graph_with_paths.h index 75c2b5378e8..9a088f236f5 100644 --- a/Surface_mesh_topology/doc/Surface_mesh_topology/CGAL/draw_face_graph_with_paths.h +++ b/Surface_mesh_topology/doc/Surface_mesh_topology/CGAL/draw_face_graph_with_paths.h @@ -23,7 +23,7 @@ void draw(const Mesh& amesh, /*! \ingroup PkgDrawFaceGraphWithPaths -A shortcut to `CGAL::draw(mesh, paths, Graphics_scene_options_face_graph_with_paths{})`. +A shortcut to `CGAL::draw(amesh, apaths, Graphics_scene_options_face_graph_with_paths{})`. */ template void draw(const Mesh& amesh, @@ -62,20 +62,20 @@ adds the vertices, edges and faces of `amesh`, either a 2D linear cell complex o \param apaths the paths to draw, which should lie on `amesh`. */ template -void add_to_graphics_scene(const Mesh& mesh, - CGAL::Graphics_scene& graphics_scene, +void add_to_graphics_scene(const Mesh& amesh, + CGAL::Graphics_scene& gs, const GSOptions& gso, - const std::vector>& paths); + const std::vector>& apaths); /*! \ingroup PkgDrawFaceGraphWithPaths -A shortcut to `CGAL::add_to_graphics_scene(mesh, graphics_scene, Graphics_scene_options_face_graph_with_paths{}, paths)`. +A shortcut to `CGAL::add_to_graphics_scene(amesh, gs, Graphics_scene_options_face_graph_with_paths{}, apaths)`. */ template -void add_to_graphics_scene(const Mesh& mesh, - CGAL::Graphics_scene& graphics_scene, - const std::vector>& paths); +void add_to_graphics_scene(const Mesh& amesh, + CGAL::Graphics_scene& gs, + const std::vector>& apaths); /*! \ingroup PkgDrawFaceGraphWithPaths @@ -83,8 +83,8 @@ void add_to_graphics_scene(const Mesh& mesh, Same function than add_to_graphics_scene() but taking the paths from a list instead from an std::vector. */ template -void add_to_graphics_scene(const Mesh& mesh, - CGAL::Graphics_scene& graphics_scene, +void add_to_graphics_scene(const Mesh& amesh, + CGAL::Graphics_scene& gs, const GSOptions& gso, std::initializer_list > apaths); @@ -94,8 +94,8 @@ void add_to_graphics_scene(const Mesh& mesh, Same function than add_to_graphics_scene() but taking the paths from a list instead from an std::vector. */ template -void add_to_graphics_scene(const Mesh& mesh, - CGAL::Graphics_scene& graphics_scene, +void add_to_graphics_scene(const Mesh& amesh, + CGAL::Graphics_scene& gs, std::initializer_list > apaths); } /* namespace CGAL */