From 095161fee2332424456ddf74cbcd76eaa5ae939c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 30 Apr 2007 15:33:39 +0000 Subject: [PATCH] colors, initial size, segment input --- .../demo/Snap_rounding_2/snap_rounding_2.cpp | 11 +++++------ .../demo/Snap_rounding_2/snap_rounding_2_layers.h | 4 ++-- .../demo/Snap_rounding_2/snap_rounding_2_toolbar.cpp | 1 + 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Snap_rounding_2/demo/Snap_rounding_2/snap_rounding_2.cpp b/Snap_rounding_2/demo/Snap_rounding_2/snap_rounding_2.cpp index 88eb2bf3856..0c1d49f8386 100644 --- a/Snap_rounding_2/demo/Snap_rounding_2/snap_rounding_2.cpp +++ b/Snap_rounding_2/demo/Snap_rounding_2/snap_rounding_2.cpp @@ -35,8 +35,7 @@ int main(int, char*) #include "cgal_types.h" //global flags and variables int current_state; -const QString my_title_string("Snap_rounding_2 Demo with" - " CGAL Qt_widget"); +const QString my_title_string("2D Snap Rounding"); std::list seg_list; std::list > output_list; Number_type prec; @@ -172,10 +171,10 @@ public: connect(but4, SIGNAL(stateChanged(int)), this, SLOT(toggle_grid(int))); - *widget << CGAL::LineWidth(2) << CGAL::BackgroundColor (CGAL::BLACK); + *widget << CGAL::LineWidth(2) << CGAL::BackgroundColor (CGAL::WHITE); resize(w,h); - widget->set_window(-1, 1, -1, 1); + widget->set_window(-10.1, 10.1, -10.1, 10.1); widget->setMouseTracking(TRUE); //connect the widget to the main function that receives the objects @@ -204,7 +203,7 @@ public slots: seg_list.clear(); output_list.clear(); stoolbar->clear_history(); - widget->set_window(-1.1, 1.1, -1.1, 1.1); + widget->set_window(-10.1, 10.1, -10.1, 10.1); // set the Visible Area to the Interval widget->unlock(); something_changed(); @@ -349,7 +348,7 @@ private slots: MyWindow *ed = new MyWindow(500, 500); ed->setCaption("Layer"); ed->stoolbar->clear_history(); - ed->widget->set_window(-1.1, 1.1, -1.1, 1.1); + ed->widget->set_window(-10.1, 10.1, -10.1, 10.1); ed->show(); something_changed(); } diff --git a/Snap_rounding_2/demo/Snap_rounding_2/snap_rounding_2_layers.h b/Snap_rounding_2/demo/Snap_rounding_2/snap_rounding_2_layers.h index 9e9ab65f306..53672f67be0 100644 --- a/Snap_rounding_2/demo/Snap_rounding_2/snap_rounding_2_layers.h +++ b/Snap_rounding_2/demo/Snap_rounding_2/snap_rounding_2_layers.h @@ -33,7 +33,7 @@ public: */ void draw_grid() { - *widget << CGAL::WHITE << CGAL::LineWidth(1); + *widget << CGAL::GRAY << CGAL::LineWidth(1); // get the edge coordinate int min_x = static_cast(widget->x_min()); @@ -61,7 +61,7 @@ public: widget->lock(); widget->setRasterOp(CopyROP); if(show_input) { - *widget << CGAL::WHITE << CGAL::LineWidth(1); + *widget << CGAL::BLUE << CGAL::LineWidth(1); for(Segment_2_list_const_iterator i1 = seg_list.begin(); i1 != seg_list.end(); ++i1) diff --git a/Snap_rounding_2/demo/Snap_rounding_2/snap_rounding_2_toolbar.cpp b/Snap_rounding_2/demo/Snap_rounding_2/snap_rounding_2_toolbar.cpp index 1171537fd85..a9bd419b060 100644 --- a/Snap_rounding_2/demo/Snap_rounding_2/snap_rounding_2_toolbar.cpp +++ b/Snap_rounding_2/demo/Snap_rounding_2/snap_rounding_2_toolbar.cpp @@ -65,6 +65,7 @@ Tools_toolbar::Tools_toolbar(CGAL::Qt_widget * w, connect(but[1], SIGNAL(stateChanged(int)), &segment_layer, SLOT(stateChanged(int))); + but[1]->toggle(); }; #include "snap_rounding_2_toolbar.moc"