From 2c1ca1e8939a995687cdb28e148bdf041b42dcb8 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Thu, 24 Jan 2019 14:18:49 +0100 Subject: [PATCH] Replace old color API using global const variable with new one using functions --- .../xalci/misc.cpp | 2 +- .../Arrangement_on_surface_2/arr_bench.cpp | 10 ++++----- .../demo/Convex_hull_3/quickhull_3_demo.cpp | 4 ++-- Geomview/demo/Geomview/gv_terrain.cpp | 4 ++-- Geomview/demo/Geomview/kernel.cpp | 16 +++++++------- .../Qt/SegmentDelaunayGraphGraphicsItem.h | 4 ++-- .../Qt/SegmentDelaunayGraphLinfGraphicsItem.h | 4 ++-- .../examples/HalfedgeDS/hds_prog_color.cpp | 6 ++--- .../Interpolation/interpolation_2_demo.cpp | 4 ++-- .../demo/Interpolation/surface_voronoi.cpp | 10 ++++----- .../applications/display_distribution.cpp | 6 ++--- Mesh_3/archive/applications/distribution.cpp | 4 ++-- .../applications/lanteri_process_results.cpp | 2 +- .../output_distribution_to_stdout.cpp | 6 ++--- Nef_3/include/CGAL/Nef_3/SM_visualizor.h | 6 ++--- Nef_3/include/CGAL/Nef_3/SNC_SM_visualizor.h | 6 ++--- Nef_S2/include/CGAL/Nef_S2/SM_visualizor.h | 6 ++--- .../include/CGAL/Nef_S2/Sphere_geometry_OGL.h | 22 +++++++++---------- .../p2t2_colored_vertices.cpp | 2 +- .../colored_vertices.cpp | 2 +- .../Polyhedron/polyhedron_prog_color.cpp | 2 +- .../polyhedron_prog_vertex_color.cpp | 2 +- .../demo/Polyhedron_IO/geomview_demo.cpp | 2 +- .../examples/Triangulation_2/colored_face.cpp | 4 ++-- .../Triangulation_3_color_demo.cpp | 2 +- .../Triangulation_3_demo.cpp | 4 ++-- .../Triangulation_3_voronoi_demo.cpp | 2 +- .../examples/Triangulation_3/color.cpp | 2 +- 28 files changed, 73 insertions(+), 73 deletions(-) diff --git a/Arrangement_on_surface_2/archive/demo/Arr_algebraic_segment_traits_2/xalci/misc.cpp b/Arrangement_on_surface_2/archive/demo/Arr_algebraic_segment_traits_2/xalci/misc.cpp index 5641b3e6296a..453a43b5e6a9 100644 --- a/Arrangement_on_surface_2/archive/demo/Arr_algebraic_segment_traits_2/xalci/misc.cpp +++ b/Arrangement_on_surface_2/archive/demo/Arr_algebraic_segment_traits_2/xalci/misc.cpp @@ -479,7 +479,7 @@ void xAlci_main_window::setup(int w, int h) tab_widget->addTab(cad_tab,"cad"); tab_widget->addTab(arr_tab,"arrangement"); - *widget << CGAL::LineWidth(2) << CGAL::BackgroundColor(CGAL::WHITE); + *widget << CGAL::LineWidth(2) << CGAL::BackgroundColor(CGAL::white()); resize(w,h); double ratio = 1.0;//(double)h/w; widget->set_window(-1, 1, -ratio, ratio, true); diff --git a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/arr_bench.cpp b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/arr_bench.cpp index 86e299c27ad5..903fc5a1b908 100644 --- a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/arr_bench.cpp +++ b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/arr_bench.cpp @@ -277,11 +277,11 @@ inline std::ostream & operator<<(std::ostream & os, const Arr::Vertex & vertex) inline Window_stream & operator<<(Window_stream & ws, Arr & arr) { Arr::Edge_iterator ei; - ws << CGAL::BLUE; + ws << CGAL::blue(); for (ei = arr.edges_begin(); ei != arr.edges_end(); ++ei) ws << (*ei).curve(); Arr::Vertex_iterator vi; - ws << CGAL::RED; + ws << CGAL::red(); for (vi = arr.vertices_begin(); vi != arr.vertices_end(); ++vi) ws << (*vi).point(); return ws; @@ -474,7 +474,7 @@ class Display_arr : public Basic_arr { m_window->flush(); #else m_window->lock(); - *m_window << CGAL::BackgroundColor(CGAL::WHITE) << CGAL::RED; + *m_window << CGAL::BackgroundColor(CGAL::white()) << CGAL::red(); (*m_window) << arr; m_window->unlock(); App->flush(); @@ -490,9 +490,9 @@ class Display_arr : public Basic_arr { ps_stream.set_line_width(1); CGAL::Arr_drawer drawer(ps_stream); // drawer.draw_faces(arr.faces_begin(), arr.faces_end()); - ps_stream << CGAL::BLUE; + ps_stream << CGAL::blue(); drawer.draw_halfedges(arr.halfedges_begin(), arr.halfedges_end()); - ps_stream << CGAL::RED; + ps_stream << CGAL::red(); drawer.draw_vertices(arr.vertices_begin(), arr.vertices_end()); // draw_arr(arr, drawer, ps_stream); diff --git a/Convex_hull_3/demo/Convex_hull_3/quickhull_3_demo.cpp b/Convex_hull_3/demo/Convex_hull_3/quickhull_3_demo.cpp index d50f0faef09b..786598fb80be 100644 --- a/Convex_hull_3/demo/Convex_hull_3/quickhull_3_demo.cpp +++ b/Convex_hull_3/demo/Convex_hull_3/quickhull_3_demo.cpp @@ -67,7 +67,7 @@ void draw_points_and_hull(const std::vector& points, std::vector::const_iterator p_it; CGAL::Geomview_stream geomview; - geomview << CGAL::RED; + geomview << CGAL::red(); for (p_it = points.begin(); p_it != points.end(); p_it++) { geomview << *p_it; @@ -78,7 +78,7 @@ void draw_points_and_hull(const std::vector& points, Point_3 point; Polyhedron_3 polyhedron; - geomview << CGAL::BLUE; + geomview << CGAL::blue(); if ( CGAL::assign(point, object) ) geomview << point; else if ( CGAL::assign(segment, object) ) diff --git a/Geomview/demo/Geomview/gv_terrain.cpp b/Geomview/demo/Geomview/gv_terrain.cpp index 27ce828d30c1..bed8f15171ad 100644 --- a/Geomview/demo/Geomview/gv_terrain.cpp +++ b/Geomview/demo/Geomview/gv_terrain.cpp @@ -57,13 +57,13 @@ int main() // use different colors, and put a few sleeps/clear. - gv << CGAL::BLUE; + gv << CGAL::blue(); std::cout << "Drawing 2D Delaunay triangulation in wired mode.\n"; gv.set_wired(true); gv << D; #if 1 // It's too slow ! Needs to use OFF for that. - gv << CGAL::RED; + gv << CGAL::red(); std::cout << "Drawing its Voronoi diagram.\n"; gv.set_wired(true); D.draw_dual(gv); diff --git a/Geomview/demo/Geomview/kernel.cpp b/Geomview/demo/Geomview/kernel.cpp index e496e59a3112..0fe909a05fcf 100644 --- a/Geomview/demo/Geomview/kernel.cpp +++ b/Geomview/demo/Geomview/kernel.cpp @@ -50,25 +50,25 @@ int main() gv.clear(); // remove the pickplane. gv << K::Point_2 (200, 100); - gv << CGAL::BLUE; + gv << CGAL::blue(); gv << K::Point_3 (200, 100, 100); - gv << CGAL::RED; + gv << CGAL::red(); gv << K::Segment_2 (K::Point_2(200, 100), K::Point_2(300, 100)); - gv << CGAL::GREEN; + gv << CGAL::green(); gv << K::Segment_3 (K::Point_3(200, 100, 100), K::Point_3(300, 100, 200)); - gv << CGAL::DEEPBLUE; + gv << CGAL::deep_blue(); gv << K::Sphere_3 (K::Point_3(100, 100, 100), 1000); - gv << CGAL::VIOLET; + gv << CGAL::violet(); gv << K::Triangle_2 (K::Point_2(200, 200), K::Point_2(220, 220), K::Point_2(180, 220)); - gv << CGAL::ORANGE; + gv << CGAL::orange(); gv << K::Triangle_3 (K::Point_3(200, 200, 50), K::Point_3(220, 220, 80), K::Point_3(180, 220, 100)); - gv << CGAL::PURPLE; + gv << CGAL::purple(); gv << K::Tetrahedron_3 (K::Point_3(100, 100, 180), K::Point_3(120, 70, 220), K::Point_3(100, 100, 220), @@ -76,7 +76,7 @@ int main() gv << CGAL::Bbox_2(10, 10, 30, 30); gv << CGAL::Bbox_3(10, 10, 10, 30, 30, 30); - gv << CGAL::RED; + gv << CGAL::red(); gv << K::Ray_2(K::Point_2(205,205), K::Point_2(500,500)); gv << K::Ray_3(K::Point_3(250,250,250), K::Point_3(500,500,500)); gv << K::Line_2(K::Point_2(195,195), K::Point_2(500,500)); diff --git a/GraphicsView/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h b/GraphicsView/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h index d9fb9e6b5e07..71a524598059 100644 --- a/GraphicsView/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h @@ -173,9 +173,9 @@ SegmentDelaunayGraphGraphicsItem::drawAll(QPainter *painter, const QStyleOpti vit != t->finite_vertices_end(); ++vit) { typename T::Site_2 s = vit->site(); if ( s.is_input() ) { - //*widget << CGAL::RED; + //*widget << CGAL::red(); } else { - //*widget << CGAL::YELLOW; + //*widget << CGAL::yellow(); } if ( s.is_point() ) { QPointF point = matrix.map(convert(s.point())); diff --git a/GraphicsView/include/CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h b/GraphicsView/include/CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h index 43ba00ccbf69..1542ff69acf3 100644 --- a/GraphicsView/include/CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h @@ -208,9 +208,9 @@ SegmentDelaunayGraphLinfGraphicsItem::drawAll(QPainter *painter, const QStyle vit != t->finite_vertices_end(); ++vit) { typename T::Site_2 s = vit->site(); if ( s.is_input() ) { - //*widget << CGAL::RED; + //*widget << CGAL::red(); } else { - //*widget << CGAL::YELLOW; + //*widget << CGAL::yellow(); } if ( s.is_point() ) { QPointF point = matrix.map(convert(s.point())); diff --git a/HalfedgeDS/examples/HalfedgeDS/hds_prog_color.cpp b/HalfedgeDS/examples/HalfedgeDS/hds_prog_color.cpp index 35300c92bab3..6b294fefe5c3 100644 --- a/HalfedgeDS/examples/HalfedgeDS/hds_prog_color.cpp +++ b/HalfedgeDS/examples/HalfedgeDS/hds_prog_color.cpp @@ -28,8 +28,8 @@ typedef HDS::Face_handle Face_handle; int main() { HDS hds; - Face_handle f = hds.faces_push_back( Face( CGAL::RED)); - f->color = CGAL::BLUE; - CGAL_assertion( f->color == CGAL::BLUE); + Face_handle f = hds.faces_push_back( Face( CGAL::red())); + f->color = CGAL::blue(); + CGAL_assertion( f->color == CGAL::blue()); return 0; } diff --git a/Interpolation/demo/Interpolation/interpolation_2_demo.cpp b/Interpolation/demo/Interpolation/interpolation_2_demo.cpp index 2ed7aa06b07a..d3d0a5136e66 100644 --- a/Interpolation/demo/Interpolation/interpolation_2_demo.cpp +++ b/Interpolation/demo/Interpolation/interpolation_2_demo.cpp @@ -287,14 +287,14 @@ int main(int , char** ) std::cout << "The data points are displayed in blue in the geomview" << " application." << std::endl; - gv << CGAL::BLUE; + gv << CGAL::blue(); visu_points(gv,sample_3); //show the gradients if(method>0){ std::cout << "The function gradients are displayed by red lines " <<" in the geomview application." << std::endl; - gv <> ch; diff --git a/Mesh_3/archive/applications/display_distribution.cpp b/Mesh_3/archive/applications/display_distribution.cpp index 838b3bb595ac..547ff00693e2 100644 --- a/Mesh_3/archive/applications/display_distribution.cpp +++ b/Mesh_3/archive/applications/display_distribution.cpp @@ -174,7 +174,7 @@ void output_distribution_to_png(std::vector& elements, const double scale = double_options["scale"]; - *widget << CGAL::FillColor(CGAL::BLACK); + *widget << CGAL::FillColor(CGAL::black()); // *widget << Segment_2(Point_2(0., 0.), Point_2(1., 0.)); for(int k=0;k0) @@ -184,12 +184,12 @@ void output_distribution_to_png(std::vector& elements, height = ( (distribution[k]+0.)/number_of_cells ) * scale; else height = ( std::log(distribution[k]+0.)/std::log(number_of_cells) ) * (-scale); - *widget << CGAL::BLACK + *widget << CGAL::black() << Rectangle_2(Point_2(k*width, 0), Point_2((k+1)*width, height)); } else - *widget << CGAL::RED << Segment_2(Point_2(k*width, 0), + *widget << CGAL::red() << Segment_2(Point_2(k*width, 0), Point_2((k+1)*width, 0)); widget->unlock(); diff --git a/Mesh_3/archive/applications/distribution.cpp b/Mesh_3/archive/applications/distribution.cpp index 42fb5678ddee..4a7d44f780e7 100644 --- a/Mesh_3/archive/applications/distribution.cpp +++ b/Mesh_3/archive/applications/distribution.cpp @@ -34,10 +34,10 @@ void display_distribution(Distribution_displayer* display, const double height = ( distribution[k]+0. ) * echelle; display->fill_rectangle(k * width, 0, (k+1)* width, height, - CGAL::BLACK); + CGAL::black()); } else display->segment(k * width, 0., (k+1) * width, 0., - CGAL::RED); + CGAL::red()); } diff --git a/Mesh_3/archive/applications/lanteri_process_results.cpp b/Mesh_3/archive/applications/lanteri_process_results.cpp index 982e18c52016..b7403c49f092 100644 --- a/Mesh_3/archive/applications/lanteri_process_results.cpp +++ b/Mesh_3/archive/applications/lanteri_process_results.cpp @@ -99,7 +99,7 @@ bool process_aux_2(const std::vector& qualities, displays[i]->segment(x_position_of_length_bound, 0.0, x_position_of_length_bound, -0.05, - CGAL::BLUE); + CGAL::blue()); } *out_stream << "saving " << filename.c_str() << "...\n"; diff --git a/Mesh_3/archive/applications/output_distribution_to_stdout.cpp b/Mesh_3/archive/applications/output_distribution_to_stdout.cpp index 4b7a586eba60..6ceef9c3ca0d 100644 --- a/Mesh_3/archive/applications/output_distribution_to_stdout.cpp +++ b/Mesh_3/archive/applications/output_distribution_to_stdout.cpp @@ -180,7 +180,7 @@ void parse_argv(int argc, char** argv, int extra_args = 0) // // const double scale = double_options["scale"]; // -//// *widget << CGAL::FillColor(CGAL::BLACK); +//// *widget << CGAL::FillColor(CGAL::black()); // // *widget << Segment_2(Point_2(0., 0.), Point_2(1., 0.)); // for(int k=0;k0) @@ -190,12 +190,12 @@ void parse_argv(int argc, char** argv, int extra_args = 0) // height = ( (distribution[k]+0.)/number_of_cells ) * scale; // else // height = ( std::log(distribution[k]+0.)/std::log(number_of_cells) ) * (-scale); -//// *widget << CGAL::BLACK +//// *widget << CGAL::black() //// << Rectangle_2(Point_2(k*width, 0), //// Point_2((k+1)*width, height)); // } // else -//// *widget << CGAL::RED << Segment_2(Point_2(k*width, 0), +//// *widget << CGAL::red() << Segment_2(Point_2(k*width, 0), //// Point_2((k+1)*width, 0)); // // // widget->unlock(); diff --git a/Nef_3/include/CGAL/Nef_3/SM_visualizor.h b/Nef_3/include/CGAL/Nef_3/SM_visualizor.h index a8c6c67512b6..0423db7b4766 100644 --- a/Nef_3/include/CGAL/Nef_3/SM_visualizor.h +++ b/Nef_3/include/CGAL/Nef_3/SM_visualizor.h @@ -48,11 +48,11 @@ class SNC_SM_BooleColor typedef typename Refs_::Mark Mark; public: Color color(SVertex_const_handle, Mark m) const - { return ( m ? CGAL::BLACK : CGAL::WHITE ); } + { return ( m ? CGAL::black() : CGAL::white() ); } Color color(SHalfedge_const_handle, Mark m) const - { return ( m ? CGAL::BLACK : CGAL::WHITE ); } + { return ( m ? CGAL::black() : CGAL::white() ); } Color color(SHalfloop_const_handle, Mark m) const - { return ( m ? CGAL::BLACK : CGAL::WHITE ); } + { return ( m ? CGAL::black() : CGAL::white() ); } Color color(SFace_const_handle, Mark m) const { return ( m ? CGAL_NEF3_DGREY : CGAL_NEF3_LGREY ); } }; diff --git a/Nef_3/include/CGAL/Nef_3/SNC_SM_visualizor.h b/Nef_3/include/CGAL/Nef_3/SNC_SM_visualizor.h index 25330ad75011..b2d18c431306 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_SM_visualizor.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_SM_visualizor.h @@ -48,11 +48,11 @@ class SNC_SM_BooleColor typedef typename Map_::Mark Mark; public: Color color(SVertex_const_handle, Mark m) const - { return ( m ? CGAL::BLACK : CGAL::WHITE ); } + { return ( m ? CGAL::black() : CGAL::white() ); } Color color(SHalfedge_const_handle, Mark m) const - { return ( m ? CGAL::BLACK : CGAL::WHITE ); } + { return ( m ? CGAL::black() : CGAL::white() ); } Color color(SHalfloop_const_handle, Mark m) const - { return ( m ? CGAL::BLACK : CGAL::WHITE ); } + { return ( m ? CGAL::black() : CGAL::white() ); } Color color(SFace_const_handle, Mark m) const { return ( m ? CGAL_NEF_DGREY : CGAL_NEF_LGREY ); } }; diff --git a/Nef_S2/include/CGAL/Nef_S2/SM_visualizor.h b/Nef_S2/include/CGAL/Nef_S2/SM_visualizor.h index 51ee7fe9917a..a007e6a9338b 100644 --- a/Nef_S2/include/CGAL/Nef_S2/SM_visualizor.h +++ b/Nef_S2/include/CGAL/Nef_S2/SM_visualizor.h @@ -44,11 +44,11 @@ class SM_BooleColor typedef typename Map_::Mark Mark; public: Color color(SVertex_const_handle, Mark m) const - { return ( m ? CGAL::BLACK : CGAL::WHITE ); } + { return ( m ? CGAL::black() : CGAL::white() ); } Color color(SHalfedge_const_handle, Mark m) const - { return ( m ? CGAL::BLACK : CGAL::WHITE ); } + { return ( m ? CGAL::black() : CGAL::white() ); } Color color(SHalfloop_const_handle, Mark m) const - { return ( m ? CGAL::BLACK : CGAL::WHITE ); } + { return ( m ? CGAL::black() : CGAL::white() ); } Color color(SFace_const_handle, Mark m) const { return ( m ? CGAL_NEF_DGREY : CGAL_NEF_LGREY ); } }; diff --git a/Nef_S2/include/CGAL/Nef_S2/Sphere_geometry_OGL.h b/Nef_S2/include/CGAL/Nef_S2/Sphere_geometry_OGL.h index f0527bb932bc..34fecb1aa9f2 100644 --- a/Nef_S2/include/CGAL/Nef_S2/Sphere_geometry_OGL.h +++ b/Nef_S2/include/CGAL/Nef_S2/Sphere_geometry_OGL.h @@ -254,7 +254,7 @@ class Sphere_point : public VPoint, public Gen_object { public: Sphere_point() {} Sphere_point(const CGAL::Sphere_point& p, - CGAL::Color c = CGAL::BLACK, unsigned w = 10) : + CGAL::Color c = CGAL::black(), unsigned w = 10) : VPoint(Approximator::approximate(p)), p_(p), c_(c), w_(w) {} Sphere_point(const Sphere_point& p) : VPoint(p), Gen_object() { p_ = p.p_; c_ = p.c_; w_ = p.w_; } @@ -297,7 +297,7 @@ class Sphere_segment : public VSegment, public Gen_object { public: Sphere_segment() {} Sphere_segment(const CGAL::Sphere_segment& s, - CGAL::Color c = CGAL::BLACK, unsigned w = 2) + CGAL::Color c = CGAL::black(), unsigned w = 2) : VSegment(Approximator::approximate(s)), s_(s), c_(c), w_(w) {} Sphere_segment(const Sphere_segment& s) : VSegment(s), Gen_object() { s_ = s.s_; c_ = s.c_; w_ = s.w_; } @@ -350,7 +350,7 @@ class Sphere_circle : public VSegment, public Gen_object { public: Sphere_circle() {} Sphere_circle(const CGAL::Sphere_circle& s, - CGAL::Color c = CGAL::BLACK, unsigned w = 2) + CGAL::Color c = CGAL::black(), unsigned w = 2) : VSegment(Approximator::approximate(s)), s_(s), c_(c), w_(w) {} Sphere_circle(const Sphere_circle& s) : VSegment(s), Gen_object() { s_ = s.s_; c_ = s.c_; w_ = s.w_; } @@ -539,27 +539,27 @@ Unit_sphere& operator=(const Unit_sphere& S) template void push_back(const CGAL::Sphere_point& p, - CGAL::Color c = CGAL::YELLOW, unsigned w = 5) + CGAL::Color c = CGAL::yellow(), unsigned w = 5) { objects_.push_back(new Sphere_point(p,c,w)); } template void push_back(const CGAL::Sphere_segment& s, - CGAL::Color c = CGAL::BLACK, unsigned w = 1) + CGAL::Color c = CGAL::black(), unsigned w = 1) { objects_.push_back(new Sphere_segment(s,c,w)); } template void push_back(const CGAL::Sphere_circle& s, - CGAL::Color c = CGAL::BLACK, unsigned w = 1) + CGAL::Color c = CGAL::black(), unsigned w = 1) { objects_.push_back(new Sphere_circle(s,c,w)); } template void push_back(const CGAL::Sphere_triangle& t, - CGAL::Color c = CGAL::WHITE) + CGAL::Color c = CGAL::white()) { triangles_.push_back(new Sphere_triangle(t,c)); } template void push_back_triangle_edge(const CGAL::Sphere_segment& s, - CGAL::Color c = CGAL::BLUE, unsigned w = 1) + CGAL::Color c = CGAL::blue(), unsigned w = 1) { triangle_edges_.push_back(new Sphere_segment(s,c,w)); } void set_style(int style) { @@ -718,11 +718,11 @@ class SM_BooleColor typedef typename Map_::Mark Mark; public: Color color(SVertex_const_handle, Mark m) const - { return ( m ? CGAL::BLACK : CGAL::WHITE ); } + { return ( m ? CGAL::black() : CGAL::white() ); } Color color(SHalfedge_const_handle, Mark m) const - { return ( m ? CGAL::BLACK : CGAL::WHITE ); } + { return ( m ? CGAL::black() : CGAL::white() ); } Color color(SHalfloop_const_handle, Mark m) const - { return ( m ? CGAL::BLACK : CGAL::WHITE ); } + { return ( m ? CGAL::black() : CGAL::white() ); } Color color(SFace_const_handle, Mark m) const { return ( m ? CGAL_NEF_DGREY : CGAL_NEF_LGREY ); } }; diff --git a/Periodic_2_triangulation_2/examples/Periodic_2_triangulation_2/p2t2_colored_vertices.cpp b/Periodic_2_triangulation_2/examples/Periodic_2_triangulation_2/p2t2_colored_vertices.cpp index 63097b27e00b..aeed55bfdd38 100644 --- a/Periodic_2_triangulation_2/examples/Periodic_2_triangulation_2/p2t2_colored_vertices.cpp +++ b/Periodic_2_triangulation_2/examples/Periodic_2_triangulation_2/p2t2_colored_vertices.cpp @@ -32,7 +32,7 @@ int main() PDT::Vertex_iterator vit; for (vit = T.vertices_begin(); vit != T.vertices_end(); ++vit) if (T.degree(vit) == 6) - vit->info() = CGAL::RED; + vit->info() = CGAL::red(); return 0; } diff --git a/Periodic_3_triangulation_3/examples/Periodic_3_triangulation_3/colored_vertices.cpp b/Periodic_3_triangulation_3/examples/Periodic_3_triangulation_3/colored_vertices.cpp index aa9cd4e42259..989b702679ae 100644 --- a/Periodic_3_triangulation_3/examples/Periodic_3_triangulation_3/colored_vertices.cpp +++ b/Periodic_3_triangulation_3/examples/Periodic_3_triangulation_3/colored_vertices.cpp @@ -36,7 +36,7 @@ int main(int, char**) P3DT3::Vertex_iterator vit; for (vit = T.vertices_begin(); vit != T.vertices_end(); ++vit) { if (T.degree(vit) == 16) { - vit->info() = CGAL::RED; + vit->info() = CGAL::red(); } } diff --git a/Polyhedron/examples/Polyhedron/polyhedron_prog_color.cpp b/Polyhedron/examples/Polyhedron/polyhedron_prog_color.cpp index 57fba3f5d8ef..13a5569c3d0f 100644 --- a/Polyhedron/examples/Polyhedron/polyhedron_prog_color.cpp +++ b/Polyhedron/examples/Polyhedron/polyhedron_prog_color.cpp @@ -23,6 +23,6 @@ typedef Polyhedron::Halfedge_handle Halfedge_handle; int main() { Polyhedron P; Halfedge_handle h = P.make_tetrahedron(); - h->facet()->color = CGAL::RED; + h->facet()->color = CGAL::red(); return 0; } diff --git a/Polyhedron/examples/Polyhedron/polyhedron_prog_vertex_color.cpp b/Polyhedron/examples/Polyhedron/polyhedron_prog_vertex_color.cpp index 1a29a2674e91..63abfbc9b2a2 100644 --- a/Polyhedron/examples/Polyhedron/polyhedron_prog_vertex_color.cpp +++ b/Polyhedron/examples/Polyhedron/polyhedron_prog_vertex_color.cpp @@ -29,6 +29,6 @@ typedef Polyhedron::Halfedge_handle Halfedge_handle; int main() { Polyhedron P; Halfedge_handle h = P.make_tetrahedron(); - h->vertex()->color = CGAL::RED; + h->vertex()->color = CGAL::red(); return 0; } diff --git a/Polyhedron_IO/demo/Polyhedron_IO/geomview_demo.cpp b/Polyhedron_IO/demo/Polyhedron_IO/geomview_demo.cpp index 1b806c21fa4d..7ab19eccca25 100644 --- a/Polyhedron_IO/demo/Polyhedron_IO/geomview_demo.cpp +++ b/Polyhedron_IO/demo/Polyhedron_IO/geomview_demo.cpp @@ -47,7 +47,7 @@ int main() { Polyhedron P; P.make_tetrahedron( p,q,r,s); CGAL::Geomview_stream geo; - geo << CGAL::GREEN << P; + geo << CGAL::green() << P; // wait for a mouse click. Point click; diff --git a/Triangulation_2/examples/Triangulation_2/colored_face.cpp b/Triangulation_2/examples/Triangulation_2/colored_face.cpp index cbee32c63ed0..84392cd820b6 100644 --- a/Triangulation_2/examples/Triangulation_2/colored_face.cpp +++ b/Triangulation_2/examples/Triangulation_2/colored_face.cpp @@ -22,11 +22,11 @@ int main() { t.insert(Point(2,2)); Finite_faces_iterator fc = t.finite_faces_begin(); - for( ; fc != t.finite_faces_end(); ++fc) fc->info() = CGAL::BLUE; + for( ; fc != t.finite_faces_end(); ++fc) fc->info() = CGAL::blue(); Point p(0.5,0.5); Face_handle fh = t.locate(p); - fh->info() = CGAL::RED; + fh->info() = CGAL::red(); return 0; } diff --git a/Triangulation_3/demo/Triangulation_3_Geomview_demos/Triangulation_3_color_demo.cpp b/Triangulation_3/demo/Triangulation_3_Geomview_demos/Triangulation_3_color_demo.cpp index c718b0bb0879..8d3615ad60b6 100644 --- a/Triangulation_3/demo/Triangulation_3_Geomview_demos/Triangulation_3_color_demo.cpp +++ b/Triangulation_3/demo/Triangulation_3_Geomview_demos/Triangulation_3_color_demo.cpp @@ -66,7 +66,7 @@ int main() Delaunay::Finite_vertices_iterator vit; for (vit = T.finite_vertices_begin(); vit != T.finite_vertices_end(); ++vit) if (T.degree(vit) == 6) - vit->info() = CGAL::RED; + vit->info() = CGAL::red(); std::cout << " Visualization of T" << std::endl; gv.set_wired(true); diff --git a/Triangulation_3/demo/Triangulation_3_Geomview_demos/Triangulation_3_demo.cpp b/Triangulation_3/demo/Triangulation_3_Geomview_demos/Triangulation_3_demo.cpp index b7f14bf38088..206531e09c2f 100644 --- a/Triangulation_3/demo/Triangulation_3_Geomview_demos/Triangulation_3_demo.cpp +++ b/Triangulation_3/demo/Triangulation_3_Geomview_demos/Triangulation_3_demo.cpp @@ -136,7 +136,7 @@ int main() std::cout <<" Locating point (1,1,1) :" << std::endl; Point p(1,1,1); - gv.set_vertex_color(CGAL::ORANGE); + gv.set_vertex_color(CGAL::orange()); gv << p; Locate_type lt; int li, lj; @@ -144,7 +144,7 @@ int main() sleep(3); - gv << CGAL::VIOLET; + gv << CGAL::violet(); if ( lt == Triangulation::CELL ) { std::cout <<" CELL" << std::endl; visu_cell(gv,T,c); diff --git a/Triangulation_3/demo/Triangulation_3_Geomview_demos/Triangulation_3_voronoi_demo.cpp b/Triangulation_3/demo/Triangulation_3_Geomview_demos/Triangulation_3_voronoi_demo.cpp index e3fe523bcb24..383285ab01a3 100644 --- a/Triangulation_3/demo/Triangulation_3_Geomview_demos/Triangulation_3_voronoi_demo.cpp +++ b/Triangulation_3/demo/Triangulation_3_Geomview_demos/Triangulation_3_voronoi_demo.cpp @@ -74,7 +74,7 @@ int main() gv << T; std::cout <<" Visualizing the Voronoi edges" << std::endl; - gv << CGAL::RED; + gv << CGAL::red(); T.draw_dual(gv); char ch; diff --git a/Triangulation_3/examples/Triangulation_3/color.cpp b/Triangulation_3/examples/Triangulation_3/color.cpp index c1e769c8875d..1dbd7bdeb754 100644 --- a/Triangulation_3/examples/Triangulation_3/color.cpp +++ b/Triangulation_3/examples/Triangulation_3/color.cpp @@ -30,7 +30,7 @@ int main() Delaunay::Finite_vertices_iterator vit; for (vit = T.finite_vertices_begin(); vit != T.finite_vertices_end(); ++vit) if (T.degree(vit) == 6) - vit->info() = CGAL::RED; + vit->info() = CGAL::red(); return 0; }