mirror of https://github.com/CGAL/cgal
added files for Apollonius graph demo
This commit is contained in:
parent
663fdcaff4
commit
8cc9ba6ced
|
|
@ -712,6 +712,12 @@ Packages/Alpha_shapes_3/doc_tex/Alpha_shapes_3/alphashape.eps -text
|
|||
Packages/Alpha_shapes_3/doc_tex/Alpha_shapes_3/alphashape.gif -text svneol=unset#unset
|
||||
Packages/Alpha_shapes_3/doc_tex/basic/Alpha_shapes_3/alphashape.eps -text
|
||||
Packages/Alpha_shapes_3/doc_tex/basic/Alpha_shapes_3/alphashape.gif -text svneol=unset#unset
|
||||
Packages/Apollonius_graph_2/demo/Apollonius_graph_2/filenew.xpm -text
|
||||
Packages/Apollonius_graph_2/demo/Apollonius_graph_2/fileopen.xpm -text
|
||||
Packages/Apollonius_graph_2/demo/Apollonius_graph_2/fileprint.xpm -text
|
||||
Packages/Apollonius_graph_2/demo/Apollonius_graph_2/filesave.xpm -text
|
||||
Packages/Apollonius_graph_2/demo/Apollonius_graph_2/remove.xpm -text
|
||||
Packages/Apollonius_graph_2/demo/Apollonius_graph_2/removecircle.xpm -text
|
||||
Packages/Arrangement/doc_tex/Arrangement_2/arr3.gif svneol=native#unset
|
||||
Packages/Arrangement/doc_tex/Arrangement_2/circles.gif svneol=native#unset
|
||||
Packages/Arrangement/doc_tex/basic/Arrangement_2/arr3.gif svneol=native#unset
|
||||
|
|
|
|||
|
|
@ -0,0 +1,285 @@
|
|||
#include <qapplication.h>
|
||||
#include <qmainwindow.h>
|
||||
|
||||
//#include <CGAL/IO/Color.h>
|
||||
#include <CGAL/IO/Qt_widget.h>
|
||||
#include <CGAL/IO/Qt_widget_layer.h>
|
||||
#include <CGAL/IO/Qt_widget_standard_toolbar.h>
|
||||
#include <CGAL/IO/Qt_widget_get_circle.h>
|
||||
#include <CGAL/IO/Qt_widget_get_point.h>
|
||||
|
||||
|
||||
#include "typedefs.h"
|
||||
|
||||
#include "qt_file_toolbar.h"
|
||||
#include "qt_layers_toolbar.h"
|
||||
#include "qt_layers.h"
|
||||
|
||||
|
||||
//************************************
|
||||
// global variables
|
||||
//************************************
|
||||
AG_2 ag;
|
||||
|
||||
//************************************
|
||||
// conversion functions
|
||||
//************************************
|
||||
inline Weighted_point
|
||||
to_weighted_point(const Circle &c)
|
||||
{
|
||||
double r = CGAL_NTS sqrt(CGAL_NTS to_double(c.squared_radius()));
|
||||
return Weighted_point(c.center(), Rep::RT(r));
|
||||
}
|
||||
|
||||
inline Circle
|
||||
to_circle(const Weighted_point &wp)
|
||||
{
|
||||
return Circle(wp.point(), CGAL_NTS square(wp.weight()) );
|
||||
}
|
||||
|
||||
|
||||
//************************************
|
||||
// my window
|
||||
//************************************
|
||||
class My_Window : public QMainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
friend class Layers_toolbar;
|
||||
private:
|
||||
CGAL::Qt_widget *widget;
|
||||
Layers_toolbar *layers_toolbar;
|
||||
File_toolbar *file_toolbar;
|
||||
CGAL::Qt_widget_standard_toolbar *stoolbar;
|
||||
CGAL::Qt_widget_get_circle<Rep> get_circle;
|
||||
CGAL::Qt_widget_get_point<Rep> get_point;
|
||||
bool is_remove_mode;
|
||||
bool is_insert_point_mode;
|
||||
|
||||
public:
|
||||
My_Window(int x, int y)
|
||||
{
|
||||
is_remove_mode = false;
|
||||
is_insert_point_mode = false;
|
||||
|
||||
widget = new CGAL::Qt_widget(this);
|
||||
setCentralWidget(widget);
|
||||
|
||||
*widget << CGAL::BackgroundColor(CGAL::YELLOW);
|
||||
resize(x,y);
|
||||
widget->set_window(0, x, 0, y);
|
||||
widget->show();
|
||||
|
||||
// setUsesBigPixmaps(TRUE);
|
||||
|
||||
//How to attach the standard toolbar
|
||||
stoolbar = new CGAL::Qt_widget_standard_toolbar(widget, this);
|
||||
this->addToolBar(stoolbar->toolbar(), Top, FALSE);
|
||||
|
||||
file_toolbar = new File_toolbar(this);
|
||||
this->addToolBar(file_toolbar->toolbar(), Top, FALSE);
|
||||
|
||||
layers_toolbar = new Layers_toolbar(widget, this, ag);
|
||||
this->addToolBar(layers_toolbar->toolbar(), Top, FALSE);
|
||||
|
||||
connect(widget, SIGNAL(new_cgal_object(CGAL::Object)), this,
|
||||
SLOT(get_object(CGAL::Object)));
|
||||
|
||||
connect(layers_toolbar, SIGNAL(inputModeChanged(bool)), this,
|
||||
SLOT(get_input_mode(bool)));
|
||||
|
||||
connect(layers_toolbar, SIGNAL(removeModeChanged(bool)), this,
|
||||
SLOT(get_remove_mode(bool)));
|
||||
|
||||
connect(file_toolbar, SIGNAL(fileToRead(const QString&)), this,
|
||||
SLOT(read_from_file(const QString&)));
|
||||
|
||||
connect(file_toolbar, SIGNAL(printScreen()), this,
|
||||
SLOT(print_screen()));
|
||||
connect(file_toolbar, SIGNAL(clearAll()), this,
|
||||
SLOT(remove_all()));
|
||||
|
||||
widget->attach(&get_circle);
|
||||
|
||||
setMouseTracking(true);
|
||||
widget->setMouseTracking(true);
|
||||
|
||||
widget->attach(&get_point);
|
||||
|
||||
get_circle.activate();
|
||||
get_point.deactivate();
|
||||
|
||||
// get_circle.setMouseTracking(true);
|
||||
}
|
||||
~My_Window(){}
|
||||
|
||||
void set_window(double xmin, double xmax,
|
||||
double ymin, double ymax)
|
||||
{
|
||||
widget->set_window(xmin, xmax, ymin, ymax);
|
||||
}
|
||||
|
||||
private slots:
|
||||
void get_object(CGAL::Object obj)
|
||||
{
|
||||
if ( is_remove_mode ) {
|
||||
if ( ag.number_of_vertices() == 0 ) { return; }
|
||||
Point p;
|
||||
if ( CGAL::assign(p, obj) ) {
|
||||
Vertex_handle v = ag.nearest_neighbor(p);
|
||||
#if 0
|
||||
AG_2::Vertex_circulator vc = v->incident_vertices();
|
||||
AG_2::Vertex_circulator vc_start = vc;
|
||||
widget->redraw();
|
||||
*widget << CGAL::PURPLE;
|
||||
std::cout << "==============================" << std::endl;
|
||||
std::cout << v->point() << " " << v->timestamp() << std::endl;
|
||||
std::cout << "------------------------------" << std::endl;
|
||||
do {
|
||||
Vertex_handle v1(vc);
|
||||
if ( !ag.is_infinite(v1) ) {
|
||||
*widget << to_circle(v1->point());
|
||||
*widget << v1->point().point();
|
||||
std::cout << v1->point() << " " << v1->timestamp() << std::endl;
|
||||
}
|
||||
++vc;
|
||||
} while ( vc != vc_start );
|
||||
std::cout << "==============================" << std::endl;
|
||||
#else
|
||||
if ( v.ptr() != NULL ) {
|
||||
ag.remove(v);
|
||||
ag.is_valid(false,1);
|
||||
// std::cout << "--------" << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
widget->redraw();
|
||||
return;
|
||||
}
|
||||
Circle c;
|
||||
Point p;
|
||||
if ( CGAL::assign(c, obj) ) {
|
||||
Weighted_point wp = to_weighted_point(c);
|
||||
ag.insert(wp);
|
||||
} else if ( CGAL::assign(p, obj) ) {
|
||||
Weighted_point wp(p, Weight(0));
|
||||
ag.insert(wp);
|
||||
}
|
||||
ag.is_valid(false, 1);
|
||||
// std::cout << "--------" << std::endl;
|
||||
// *widget << CGAL::RED << c;
|
||||
widget->redraw();
|
||||
}
|
||||
|
||||
void get_input_mode(bool b)
|
||||
{
|
||||
is_insert_point_mode = b;
|
||||
|
||||
if ( !is_remove_mode ) {
|
||||
if ( is_insert_point_mode ) {
|
||||
get_point.activate();
|
||||
get_circle.deactivate();
|
||||
} else {
|
||||
get_point.deactivate();
|
||||
get_circle.activate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void get_remove_mode(bool b)
|
||||
{
|
||||
is_remove_mode = b;
|
||||
|
||||
if ( is_remove_mode ) {
|
||||
get_point.activate();
|
||||
get_circle.deactivate();
|
||||
} else {
|
||||
if ( !is_insert_point_mode ) {
|
||||
get_point.deactivate();
|
||||
get_circle.activate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void read_from_file(const QString& fileName)
|
||||
{
|
||||
std::ifstream f(fileName);
|
||||
assert( f );
|
||||
|
||||
int n;
|
||||
f >> n;
|
||||
Weighted_point wp;
|
||||
|
||||
int counter = 0;
|
||||
std::cout << std::endl;
|
||||
#if 1
|
||||
for (int i = 0; i < n; i++) {
|
||||
f >> wp;
|
||||
ag.insert(wp);
|
||||
counter++;
|
||||
if ( counter % 500 == 0 ) {
|
||||
std::cout << "\r" << counter
|
||||
<< " sites haved been inserted..." << std::flush;
|
||||
}
|
||||
}
|
||||
// std::cout << "\r" << counter
|
||||
// << " sites haved been inserted... Done!" << std::endl;
|
||||
ag.is_valid(false, 1);
|
||||
widget->redraw();
|
||||
#else
|
||||
for (int i = 0; i < n - 1; i++) {
|
||||
f >> wp;
|
||||
ag.insert(wp);
|
||||
counter++;
|
||||
if ( counter % 500 == 0 ) {
|
||||
std::cout << "\r" << counter
|
||||
<< " sites haved been inserted..." << std::flush;
|
||||
}
|
||||
}
|
||||
std::cout << "\r" << counter
|
||||
<< " sites haved been inserted... Done!" << std::endl;
|
||||
// assert( ag.is_valid(true, 1) );
|
||||
|
||||
f >> wp;
|
||||
std::vector<AG_2::Edge> edge_list =
|
||||
ag.find_conflict_region(wp);
|
||||
|
||||
widget->redraw();
|
||||
|
||||
*widget << CGAL::ORANGE;
|
||||
ag.draw_edge_list(*widget, edge_list.begin(), edge_list.end());
|
||||
#endif
|
||||
}
|
||||
|
||||
void print_screen()
|
||||
{
|
||||
widget->print_to_ps();
|
||||
}
|
||||
|
||||
void remove_all()
|
||||
{
|
||||
ag.clear();
|
||||
widget->redraw();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#include "qt_file_toolbar.moc"
|
||||
#include "qt_layers_toolbar.moc"
|
||||
#include "demo.moc"
|
||||
|
||||
int
|
||||
main(int argc, char* argv[])
|
||||
{
|
||||
int size = 750;
|
||||
|
||||
QApplication app( argc, argv );
|
||||
My_Window W(size,size);
|
||||
app.setMainWidget( &W );
|
||||
W.show();
|
||||
W.set_window(0,size,0,size);
|
||||
W.setCaption("Apollonius diagram 2");
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
|
||||
// moc_source_file: demo.C
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
/* XPM */
|
||||
static const char * filenew[] = {
|
||||
"10 14 5 1",
|
||||
" c None",
|
||||
". c #000000",
|
||||
"+ c #FFFFFF",
|
||||
"@ c #DCDCDC",
|
||||
"# c #C0C0C0",
|
||||
"....... ",
|
||||
".++++@@. ",
|
||||
".++++#+@. ",
|
||||
".++++#++@.",
|
||||
".++++#....",
|
||||
".+++++###.",
|
||||
".++++++++.",
|
||||
".++++++++.",
|
||||
".++++++++.",
|
||||
".++++++++.",
|
||||
".++++++++.",
|
||||
".++++++++.",
|
||||
".++++++++.",
|
||||
".........."};
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
/* XPM */
|
||||
static const char *fileopen[] = {
|
||||
" 16 13 5 1",
|
||||
". c #040404",
|
||||
"# c #808304",
|
||||
"a c None",
|
||||
"b c #f3f704",
|
||||
"c c #f3f7f3",
|
||||
"aaaaaaaaa...aaaa",
|
||||
"aaaaaaaa.aaa.a.a",
|
||||
"aaaaaaaaaaaaa..a",
|
||||
"a...aaaaaaaa...a",
|
||||
".bcb.......aaaaa",
|
||||
".cbcbcbcbc.aaaaa",
|
||||
".bcbcbcbcb.aaaaa",
|
||||
".cbcb...........",
|
||||
".bcb.#########.a",
|
||||
".cb.#########.aa",
|
||||
".b.#########.aaa",
|
||||
"..#########.aaaa",
|
||||
"...........aaaaa"
|
||||
};
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
/* XPM */
|
||||
static const char *fileprint[] = {
|
||||
" 16 14 6 1",
|
||||
". c #000000",
|
||||
"# c #848284",
|
||||
"a c #c6c3c6",
|
||||
"b c #ffff00",
|
||||
"c c #ffffff",
|
||||
"d c None",
|
||||
"ddddd.........dd",
|
||||
"dddd.cccccccc.dd",
|
||||
"dddd.c.....c.ddd",
|
||||
"ddd.cccccccc.ddd",
|
||||
"ddd.c.....c....d",
|
||||
"dd.cccccccc.a.a.",
|
||||
"d..........a.a..",
|
||||
".aaaaaaaaaa.a.a.",
|
||||
".............aa.",
|
||||
".aaaaaa###aa.a.d",
|
||||
".aaaaaabbbaa...d",
|
||||
".............a.d",
|
||||
"d.aaaaaaaaa.a.dd",
|
||||
"dd...........ddd"
|
||||
};
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
/* XPM */
|
||||
static const char *filesave[] = {
|
||||
" 14 14 4 1",
|
||||
". c #040404",
|
||||
"# c #808304",
|
||||
"a c #bfc2bf",
|
||||
"b c None",
|
||||
"..............",
|
||||
".#.aaaaaaaa.a.",
|
||||
".#.aaaaaaaa...",
|
||||
".#.aaaaaaaa.#.",
|
||||
".#.aaaaaaaa.#.",
|
||||
".#.aaaaaaaa.#.",
|
||||
".#.aaaaaaaa.#.",
|
||||
".##........##.",
|
||||
".############.",
|
||||
".##.........#.",
|
||||
".##......aa.#.",
|
||||
".##......aa.#.",
|
||||
".##......aa.#.",
|
||||
"b............."
|
||||
};
|
||||
|
|
@ -0,0 +1,704 @@
|
|||
// ======================================================================
|
||||
//
|
||||
// Copyright (c) 1997-2000 The CGAL Consortium
|
||||
//
|
||||
// This software and related documentation is part of an INTERNAL release
|
||||
// of the Computational Geometry Algorithms Library (CGAL). It is not
|
||||
// intended for general use.
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// file : include/CGAL/IO/Qt_widget.h
|
||||
// package : Qt_widget (1.2.38)
|
||||
// maintainer : Laurent Rineau <rineau@clipper.ens.fr>
|
||||
// author(s) : Laurent Rineau
|
||||
// release : $CGAL_Revision: CGAL-2.5-I-7 $
|
||||
// release_date : $CGAL_Date: 2002/07/12 $
|
||||
//
|
||||
// coordinator : Laurent Rineau <rineau@clipper.ens.fr>
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef CGAL_QT_WIDGET_H
|
||||
#define CGAL_QT_WIDGET_H
|
||||
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Ray_2_Iso_rectangle_2_intersection.h>
|
||||
#include <CGAL/Segment_2_Iso_rectangle_2_intersection.h>
|
||||
#include <CGAL/IO/Color.h>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qpainter.h>
|
||||
#include <qcolor.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <qprinter.h>
|
||||
|
||||
|
||||
#ifndef CGAL_QT_WIDGET_HISTORY_H
|
||||
#include <CGAL/IO/Qt_widget_history.h>
|
||||
#endif
|
||||
namespace CGAL {
|
||||
|
||||
class Qt_widget_layer;
|
||||
enum PointStyle { PIXEL, CROSS, PLUS, CIRCLE, DISC, RECT, BOX };
|
||||
|
||||
class Qt_widget : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
// constructor
|
||||
Qt_widget(QWidget *parent = 0, const char *name = 0);
|
||||
// destructor
|
||||
~Qt_widget() {};
|
||||
|
||||
// initialization of coordinates system
|
||||
void set_window(const double x_min,
|
||||
const double x_max,
|
||||
const double y_min,
|
||||
const double y_max,
|
||||
bool const_ranges = false);
|
||||
void zoom(double ratio);
|
||||
void zoom(double ratio, double xc, double yc);
|
||||
void set_x_scale(const double xscale){ xscal = xscale; }
|
||||
void set_y_scale(const double yscale){ yscal = yscale; }
|
||||
|
||||
void add_to_history(){history.add_to_history(xmin, xmax, ymin,
|
||||
ymax, xcentre, ycentre, xscal, yscal);}
|
||||
void clear_history(){history.clear();};
|
||||
|
||||
inline void move_center(double distx, double disty)
|
||||
{
|
||||
xcentre += distx;
|
||||
ycentre += disty;
|
||||
set_scale_center(xcentre, ycentre);
|
||||
add_to_history(); //add the current viewport to history
|
||||
configure_history_buttons();
|
||||
}
|
||||
inline void set_center(const double x, const double y)
|
||||
{
|
||||
xcentre = x; ycentre = y;
|
||||
set_scale_center(xcentre, ycentre);
|
||||
};
|
||||
|
||||
// painting system
|
||||
inline QPainter& get_painter() { return (*painter); };
|
||||
inline QPixmap& get_pixmap() { return (*pixmap); };
|
||||
inline QWMatrix& get_matrix() { return (*matrix); };
|
||||
void lock() { ++Locked; };
|
||||
void unlock() { if (Locked>0) --Locked; do_paint(); };
|
||||
void do_paint() { if (Locked==0) repaint( FALSE ); };
|
||||
|
||||
virtual QSize sizeHint() const {return QSize(geometry().width(),
|
||||
geometry().height());}
|
||||
|
||||
// properties
|
||||
// ~~~~~~~~~~
|
||||
// color
|
||||
QColor color() const;
|
||||
void setColor(const QColor c);
|
||||
// backGroundColor
|
||||
QColor backgroundColor() const;
|
||||
void setBackgroundColor(const QColor c);
|
||||
// fillColor
|
||||
QColor fillColor() const;
|
||||
void setFillColor(const QColor c);
|
||||
// isFilled
|
||||
bool isFilled() const;
|
||||
void setFilled(const bool f);
|
||||
// lineWidth
|
||||
uint lineWidth() const;
|
||||
void setLineWidth(const uint i);
|
||||
// pointSize
|
||||
uint pointSize() const;
|
||||
void setPointSize(const uint i);
|
||||
// pointStyle
|
||||
typedef CGAL::PointStyle PointStyle;
|
||||
PointStyle pointStyle() const;
|
||||
void setPointStyle(const PointStyle s);
|
||||
// rasterOp
|
||||
RasterOp rasterOp() {return painter->rasterOp();}
|
||||
void setRasterOp(const RasterOp r) {painter->setRasterOp(r);}
|
||||
|
||||
// CGAL version of setFooColor
|
||||
// used by the manipulators system
|
||||
// DO NOT USE THESE THREE UNDOCUMENTED FUNCTIONS !!
|
||||
inline void setColor(const Color c)
|
||||
{ setColor(CGAL2Qt_Color(c)); };
|
||||
inline void setBackgroundColor(const Color c)
|
||||
{ setBackgroundColor(CGAL2Qt_Color(c)); };
|
||||
inline void setFillColor(const Color c)
|
||||
{ setFillColor(CGAL2Qt_Color(c)); };
|
||||
|
||||
// set pen() color to c, cf. manipulators below for setting
|
||||
// backgroundColor and fillColor
|
||||
Qt_widget& operator<<(const Color& c);
|
||||
// set point style
|
||||
Qt_widget& operator<<(const PointStyle& ps);
|
||||
// clear the Widget, fill it with backgroundColor()
|
||||
void clear();
|
||||
|
||||
// coordinates system
|
||||
// ~~~~~~~~~~~~~~~~~~
|
||||
// real coordinates
|
||||
double x_real(int x) const;
|
||||
double y_real(int y) const;
|
||||
double x_real_dist(double d) const;
|
||||
double y_real_dist(double d) const;
|
||||
// pixel coordinates
|
||||
int x_pixel(double x) const;
|
||||
int y_pixel(double y) const;
|
||||
int x_pixel_dist(double d) const;
|
||||
int y_pixel_dist(double d) const;
|
||||
|
||||
inline double x_min() const { return xmin; };
|
||||
inline double y_min() const { return ymin; };
|
||||
inline double x_max() const { return xmax; };
|
||||
inline double y_max() const { return ymax; };
|
||||
|
||||
inline double x_scal() { return xscal; }
|
||||
inline double y_scal() { return yscal; }
|
||||
|
||||
void new_object(CGAL::Object obj) { emit(new_cgal_object(obj)); };
|
||||
|
||||
//layers
|
||||
|
||||
void attach(Qt_widget_layer *layer);
|
||||
|
||||
|
||||
// remove a layer from the list of displayable scenes
|
||||
void detach(Qt_widget_layer* s);
|
||||
|
||||
signals:
|
||||
void s_mousePressEvent(QMouseEvent *e);
|
||||
void s_mouseReleaseEvent(QMouseEvent *e);
|
||||
void s_mouseMoveEvent(QMouseEvent *e);
|
||||
void s_paintEvent(QPaintEvent *e);
|
||||
void s_resizeEvent(QResizeEvent *e);
|
||||
void s_wheelEvent(QWheelEvent *e);
|
||||
void s_mouseDoubleClickEvent(QMouseEvent *e);
|
||||
void s_keyPressEvent(QKeyEvent *e);
|
||||
void s_keyReleaseEvent(QKeyEvent *e);
|
||||
void s_enterEvent(QEvent *e);
|
||||
void s_leaveEvent(QEvent *e);
|
||||
void s_event(QEvent *e);
|
||||
|
||||
void custom_redraw(); // if user want to draw something after layers
|
||||
void new_cgal_object(CGAL::Object); //this signal is emited every time an
|
||||
//attached tool constructed an object
|
||||
//private signals (not documented)
|
||||
void set_back_enabled(bool i); //used by the standard toolbar
|
||||
void set_forward_enabled(bool i); //used by the standard toolbar
|
||||
|
||||
public slots:
|
||||
void print_to_ps();
|
||||
virtual void redraw();
|
||||
bool back();
|
||||
bool forth();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
void mousePressEvent(QMouseEvent *e);
|
||||
void mouseReleaseEvent(QMouseEvent *e);
|
||||
void mouseMoveEvent(QMouseEvent *e);
|
||||
void wheelEvent(QWheelEvent *e);
|
||||
void mouseDoubleClickEvent(QMouseEvent *e);
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
void keyReleaseEvent(QKeyEvent *e);
|
||||
void enterEvent(QEvent *e);
|
||||
void leaveEvent(QEvent *e);
|
||||
bool event(QEvent *e);
|
||||
|
||||
|
||||
private:
|
||||
void set_scales(); // set xscal and yscal
|
||||
void set_scale_center(const double xc, const double yc);
|
||||
double xcentre, ycentre; //the center of the axex
|
||||
|
||||
Qt_widget_history history;
|
||||
void configure_history_buttons(); //change the enabled state of
|
||||
//the history buttons
|
||||
|
||||
// color types convertors
|
||||
static QColor CGAL2Qt_Color(Color c);
|
||||
static Color Qt2CGAL_color(QColor c);
|
||||
|
||||
unsigned int Locked;
|
||||
// point style and size
|
||||
uint _pointSize;
|
||||
PointStyle _pointStyle;
|
||||
|
||||
QPixmap *pixmap; // the pixmap on which paints the painter
|
||||
QPainter *painter; // the painter
|
||||
QPrinter *printer; // the printer
|
||||
QWMatrix *matrix; // the world matrix
|
||||
|
||||
QBrush savedBrush; // saved brush, to be able to restore it on
|
||||
// setFilled(true)
|
||||
|
||||
double xmin, xmax, ymin, ymax; // real dimensions
|
||||
double xscal, yscal; // scalings int/double
|
||||
bool constranges; // tell if the ranges should be const
|
||||
bool is_the_first_time;
|
||||
|
||||
//for layers
|
||||
std::list<Qt_widget_layer*> qt_layers;
|
||||
std::list<Qt_widget_layer*> qt_standard_layers;
|
||||
void attach_standard(Qt_widget_layer *layer);
|
||||
bool is_standard_active();
|
||||
friend class Qt_widget_standard_toolbar;
|
||||
};//end Qt_widget class
|
||||
|
||||
// manipulators
|
||||
// ~~~~~~~~~~~~
|
||||
// single manipulators
|
||||
inline
|
||||
Qt_widget& operator<<(Qt_widget& w, Qt_widget& (*m)(Qt_widget&))
|
||||
{
|
||||
return m(w);
|
||||
};
|
||||
|
||||
// w << noFill << ... stop the filling of geometrical object
|
||||
inline
|
||||
Qt_widget& noFill(Qt_widget& w)
|
||||
{
|
||||
w.setFilled(false);
|
||||
return w;
|
||||
}
|
||||
|
||||
// manipulators with one argument
|
||||
template <class Param>
|
||||
struct Qt_widgetManip {
|
||||
Qt_widget& (*f)(Qt_widget&, Param);
|
||||
Param p;
|
||||
Qt_widgetManip(Qt_widget& (*ff)(Qt_widget&, Param),
|
||||
Param pp) : f(ff), p(pp) {}
|
||||
};
|
||||
|
||||
// usage: w << manip(Param) f ...
|
||||
template <class Param>
|
||||
Qt_widget& operator<<(Qt_widget& w, Qt_widgetManip<Param> m)
|
||||
{
|
||||
return m.f(w, m.p);
|
||||
}
|
||||
|
||||
#define CGAL_QTWIDGET_MANIP(param,function) \
|
||||
inline \
|
||||
Qt_widget& __Qt_widgetManip##function##Aux (Qt_widget& w, param p) \
|
||||
{ w.set##function(p); return w; } \
|
||||
inline \
|
||||
Qt_widgetManip<param> function(param p) \
|
||||
{ return Qt_widgetManip<param>( __Qt_widgetManip##function##Aux, p); }
|
||||
|
||||
// w << BackgroundColor(c) << ... sets the background color
|
||||
CGAL_QTWIDGET_MANIP( Color, BackgroundColor )
|
||||
|
||||
// w << FillColor(c) << ... sets the fill color
|
||||
CGAL_QTWIDGET_MANIP( Color, FillColor )
|
||||
|
||||
// w << LineWidth(i) << ... sets lines width
|
||||
CGAL_QTWIDGET_MANIP( unsigned int, LineWidth )
|
||||
|
||||
// w << PointSize(i) << ... sets points size
|
||||
CGAL_QTWIDGET_MANIP( unsigned int, PointSize )
|
||||
|
||||
// color types convertors
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~
|
||||
inline
|
||||
QColor Qt_widget::CGAL2Qt_Color(Color c)
|
||||
{
|
||||
return QColor(c.red(), c.green(), c.blue());
|
||||
}
|
||||
|
||||
inline
|
||||
Color Qt_widget::Qt2CGAL_color(QColor c)
|
||||
{
|
||||
return Color(c.red(),c.green(),c.blue());
|
||||
}
|
||||
|
||||
// properties
|
||||
// ~~~~~~~~~~
|
||||
inline
|
||||
QColor Qt_widget::color() const
|
||||
{
|
||||
return painter->pen().color();
|
||||
};
|
||||
|
||||
|
||||
inline
|
||||
void Qt_widget::setColor(const QColor c)
|
||||
{
|
||||
QPen p=get_painter().pen();
|
||||
p.setColor(c);
|
||||
get_painter().setPen(p);
|
||||
}
|
||||
|
||||
inline
|
||||
QColor Qt_widget::backgroundColor() const
|
||||
{
|
||||
return painter->backgroundColor();
|
||||
}
|
||||
|
||||
inline
|
||||
void Qt_widget::setBackgroundColor(const QColor c)
|
||||
{
|
||||
QWidget::setBackgroundColor(c);
|
||||
get_painter().setBackgroundColor(c);
|
||||
clear();
|
||||
}
|
||||
|
||||
inline
|
||||
QColor Qt_widget::fillColor() const
|
||||
{
|
||||
return painter->brush().color();
|
||||
}
|
||||
|
||||
inline
|
||||
void Qt_widget::setFillColor(const QColor c)
|
||||
{
|
||||
setFilled(true);
|
||||
get_painter().setBrush(c);
|
||||
}
|
||||
|
||||
inline
|
||||
bool Qt_widget::isFilled() const
|
||||
{
|
||||
return( painter->brush().style()==Qt::NoBrush );
|
||||
}
|
||||
|
||||
inline
|
||||
void Qt_widget::setFilled(const bool f)
|
||||
{
|
||||
if (f)
|
||||
painter->setBrush(savedBrush);
|
||||
else
|
||||
{
|
||||
savedBrush=painter->brush();
|
||||
painter->setBrush(QBrush());
|
||||
};
|
||||
}
|
||||
|
||||
inline
|
||||
uint Qt_widget::lineWidth() const
|
||||
{
|
||||
return( painter->pen().width());
|
||||
}
|
||||
|
||||
inline
|
||||
void Qt_widget::setLineWidth(const unsigned int i)
|
||||
{
|
||||
QPen p=get_painter().pen();
|
||||
p.setWidth(i);
|
||||
get_painter().setPen(p);
|
||||
}
|
||||
|
||||
inline
|
||||
uint Qt_widget::pointSize() const
|
||||
{
|
||||
return _pointSize;
|
||||
}
|
||||
|
||||
inline
|
||||
void Qt_widget::setPointSize(const unsigned int i)
|
||||
{
|
||||
_pointSize=i;
|
||||
}
|
||||
|
||||
inline
|
||||
PointStyle Qt_widget::pointStyle() const
|
||||
{
|
||||
return _pointStyle;
|
||||
}
|
||||
|
||||
inline
|
||||
void Qt_widget::setPointStyle(const PointStyle ps)
|
||||
{
|
||||
_pointStyle=ps;
|
||||
}
|
||||
|
||||
// drawing methods
|
||||
// ~~~~~~~~~~~~~~~
|
||||
|
||||
template <class R>
|
||||
Qt_widget& operator<<(Qt_widget& w, const Point_2<R>& p)
|
||||
{
|
||||
int x = w.x_pixel(CGAL::to_double(p.x()));
|
||||
int y = w.y_pixel(CGAL::to_double(p.y()));
|
||||
|
||||
uint size=w.pointSize();
|
||||
PointStyle ps=w.pointStyle();
|
||||
|
||||
switch (ps)
|
||||
{
|
||||
case PIXEL:
|
||||
{
|
||||
w.get_painter().drawPoint(x,y);
|
||||
break;
|
||||
}
|
||||
case CROSS:
|
||||
{
|
||||
w.get_painter().drawLine(x-size/2, y-size/2, x+size/2, y+size/2);
|
||||
w.get_painter().drawLine(x-size/2, y+size/2, x+size/2, y-size/2);
|
||||
break;
|
||||
}
|
||||
case PLUS:
|
||||
{
|
||||
w.get_painter().drawLine(x, y-size/2, x, y+size/2);
|
||||
w.get_painter().drawLine(x-size/2, y, x+size/2, y);
|
||||
break;
|
||||
}
|
||||
case CIRCLE:
|
||||
{
|
||||
QBrush old_brush=w.get_painter().brush();
|
||||
w.get_painter().setBrush(QBrush());
|
||||
w.get_painter().drawEllipse(x-size/2, y-size/2, size, size);
|
||||
w.get_painter().setBrush(old_brush);
|
||||
break;
|
||||
}
|
||||
case DISC:
|
||||
{
|
||||
QBrush old_brush=w.get_painter().brush();
|
||||
w.get_painter().setBrush(w.get_painter().pen().color());
|
||||
w.get_painter().drawEllipse(x-size/2, y-size/2, size, size);
|
||||
w.get_painter().setBrush(old_brush);
|
||||
break;
|
||||
}
|
||||
case RECT:
|
||||
{
|
||||
QBrush old_brush=w.get_painter().brush();
|
||||
w.get_painter().setBrush(QBrush());
|
||||
w.get_painter().drawRect(x-size/2, y-size/2, size, size);
|
||||
w.get_painter().setBrush(old_brush);
|
||||
break;
|
||||
}
|
||||
case BOX:
|
||||
{
|
||||
QBrush old_brush=w.get_painter().brush();
|
||||
w.get_painter().setBrush(w.get_painter().pen().color());
|
||||
w.get_painter().drawRect(x-size/2, y-size/2, size, size);
|
||||
w.get_painter().setBrush(old_brush);
|
||||
break;
|
||||
}
|
||||
};
|
||||
w.do_paint();
|
||||
return w;
|
||||
}
|
||||
|
||||
#ifdef CGAL_SEGMENT_2_H
|
||||
template <class R>
|
||||
Qt_widget& operator<<(Qt_widget& w, const Segment_2<R>& s)
|
||||
{
|
||||
// s.source();
|
||||
// typedef Cartesian<double> Rep;
|
||||
typedef typename R::FT FT;
|
||||
|
||||
|
||||
Iso_rectangle_2<R> rect(FT(w.x_min()),FT(w.y_min()),
|
||||
FT(w.x_max()),FT(w.y_max()));
|
||||
|
||||
bool do_they_intersect = do_intersect(s, rect);
|
||||
Object o = intersection(s, rect);
|
||||
Segment_2<R> s_2B_shown;
|
||||
|
||||
if ( do_they_intersect && assign(s_2B_shown, o) ) {
|
||||
|
||||
const int
|
||||
x1=w.x_pixel(CGAL::to_double(s.source().x())),
|
||||
y1=w.y_pixel(CGAL::to_double(s.source().y())),
|
||||
x2=w.x_pixel(CGAL::to_double(s.target().x())),
|
||||
y2=w.y_pixel(CGAL::to_double(s.target().y()));
|
||||
w.get_painter().drawLine(x1,y1,x2,y2);
|
||||
w.do_paint();
|
||||
}
|
||||
|
||||
return w;
|
||||
}
|
||||
#endif // CGAL_SEGMENT_2_H
|
||||
|
||||
#ifdef CGAL_LINE_2_H
|
||||
|
||||
template <class R>
|
||||
Qt_widget& operator<<(Qt_widget& w, const Line_2<R>& l)
|
||||
{
|
||||
typedef Cartesian<double> Rep;
|
||||
typedef Point_2<Rep> Point;
|
||||
|
||||
const Point_2<R>
|
||||
p1=l.point(),
|
||||
p2=p1+l.direction().vector();
|
||||
|
||||
const Point
|
||||
p1d=Point(CGAL::to_double(p1.x()),CGAL::to_double(p1.y())),
|
||||
p2d=Point(CGAL::to_double(p2.x()),CGAL::to_double(p2.y()));
|
||||
|
||||
double
|
||||
x1=w.x_min(),
|
||||
y1=w.y_min(),
|
||||
x2=w.x_max(),
|
||||
y2=w.y_max();
|
||||
|
||||
const double
|
||||
dx=p1d.x()-p2d.x(),
|
||||
dy=p1d.y()-p2d.y();
|
||||
|
||||
if (dx==0 && dy==0) return w;
|
||||
|
||||
if (fabs(dx)>fabs(dy))
|
||||
{
|
||||
y1=p1d.y()+(x1-p1d.x())*dy/dx;
|
||||
y2=p1d.y()+(x2-p1d.x())*dy/dx;
|
||||
}
|
||||
else
|
||||
{
|
||||
x1=p1d.x()+(y1-p1d.y())*dx/dy;
|
||||
x2=p1d.x()+(y2-p1d.y())*dx/dy;
|
||||
}
|
||||
|
||||
w.get_painter().drawLine(w.x_pixel(x1),w.y_pixel(y1),
|
||||
w.x_pixel(x2),w.y_pixel(y2));
|
||||
return w;
|
||||
}
|
||||
|
||||
#endif // CGAL_LINE_2_H
|
||||
|
||||
#ifdef CGAL_RAY_2_H
|
||||
|
||||
template <class R>
|
||||
Qt_widget& operator<<(Qt_widget& w, const Ray_2<R>& r)
|
||||
{
|
||||
// typedef Cartesian<double> Rep;
|
||||
typedef typename R::FT FT;
|
||||
typedef R Rep;
|
||||
typedef Point_2<Rep> Point;
|
||||
typedef Ray_2<Rep> Ray;
|
||||
typedef Iso_rectangle_2<Rep> Iso_rectangle;
|
||||
typedef Segment_2<Rep> Segment;
|
||||
// const Point_2<R>
|
||||
// p1=r.point(0),
|
||||
// p2=r.point(1);
|
||||
|
||||
#if 0
|
||||
const Point
|
||||
p1d=Point(to_double(p1.x()),to_double(p1.y())),
|
||||
p2d=Point(to_double(p2.x()),to_double(p2.y()));
|
||||
|
||||
Ray ray(p1d, p2d);
|
||||
Iso_rectangle rect(w.x_min(),w.y_min(), w.x_max(),w.y_max());
|
||||
|
||||
Object o = intersection(ray, rect);
|
||||
#endif
|
||||
|
||||
Iso_rectangle rect(FT(w.x_min()),FT(w.y_min()),
|
||||
FT(w.x_max()),FT(w.y_max()));
|
||||
|
||||
bool do_they_intersect = do_intersect(r, rect);
|
||||
Object o = intersection(r, rect);
|
||||
|
||||
Segment s;
|
||||
if(do_they_intersect && assign(s, o)){
|
||||
w << s;
|
||||
#if 0
|
||||
w.get_painter().drawLine(w.x_pixel(s.source().x()),w.y_pixel(s.source().y()),
|
||||
w.x_pixel(s.target().x()),w.y_pixel(s.target().y()));
|
||||
#endif
|
||||
}
|
||||
return w;
|
||||
#if 0
|
||||
const double
|
||||
dx=p1d.x()-p2d.x(),
|
||||
dy=p1d.y()-p2d.y();
|
||||
|
||||
if (dx==0 && dy==0) return w;
|
||||
|
||||
double x,y;
|
||||
|
||||
if (fabs(dx)>fabs(dy))
|
||||
{
|
||||
if (p1d.x()<p2d.x())
|
||||
x = w.x_max();
|
||||
else
|
||||
x = w.x_min();
|
||||
y=p1d.y()+(x-p1d.x())*dy/dx;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (p1d.y()<p2d.y())
|
||||
y = w.y_max();
|
||||
else
|
||||
y = w.y_min();
|
||||
x=p1d.x()+(y-p1d.y())*dx/dy;
|
||||
}
|
||||
w.get_painter().drawLine(w.x_pixel(p1d.x()),w.y_pixel(p1d.y()),
|
||||
w.x_pixel(x),w.y_pixel(y));
|
||||
return w;
|
||||
#endif
|
||||
}
|
||||
#endif //CGAL_RAY_2_H
|
||||
|
||||
#ifdef CGAL_TRIANGLE_2_H
|
||||
template< class R >
|
||||
Qt_widget&
|
||||
operator<<(Qt_widget& w, const Triangle_2<R>& t)
|
||||
{
|
||||
const int
|
||||
ax = w.x_pixel(to_double(t.vertex(0).x())),
|
||||
ay = w.y_pixel(to_double(t.vertex(0).y())),
|
||||
bx = w.x_pixel(to_double(t.vertex(1).x())),
|
||||
by = w.y_pixel(to_double(t.vertex(1).y())),
|
||||
cx = w.x_pixel(to_double(t.vertex(2).x())),
|
||||
cy = w.y_pixel(to_double(t.vertex(2).y()));
|
||||
|
||||
QPointArray array;
|
||||
|
||||
array.setPoints(3,ax,ay,bx,by,cx,cy);
|
||||
w.get_painter().drawPolygon(array);
|
||||
w.do_paint();
|
||||
return w;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CGAL_CIRCLE_2_H
|
||||
template < class R>
|
||||
Qt_widget& operator<<(Qt_widget& w, const Circle_2<R>& c)
|
||||
{
|
||||
int
|
||||
cx=w.x_pixel(CGAL::to_double(c.center().x())),
|
||||
cy=w.y_pixel(CGAL::to_double(c.center().y())),
|
||||
rx=w.x_pixel_dist((std::sqrt(CGAL::to_double(c.squared_radius())))),
|
||||
ry=w.y_pixel_dist((std::sqrt(CGAL::to_double(c.squared_radius()))));
|
||||
|
||||
w.get_painter().drawEllipse(cx-rx,cy-ry,2*rx,2*ry);
|
||||
w.do_paint();
|
||||
return w;
|
||||
}
|
||||
#endif // CGAL_CIRCLE_2_H
|
||||
|
||||
#ifdef CGAL_ISO_RECTANGLE_2_H
|
||||
template< class R >
|
||||
Qt_widget&
|
||||
operator<<(Qt_widget& w, const Iso_rectangle_2<R>& r)
|
||||
{
|
||||
int xmin = w.x_pixel(to_double(r.xmin()));
|
||||
int ymin = w.y_pixel(to_double(r.ymin()));
|
||||
int xmax = w.x_pixel(to_double(r.xmax()));
|
||||
int ymax = w.y_pixel(to_double(r.ymax()));
|
||||
w.get_painter().drawRect(xmin,ymin,xmax-xmin,ymax-ymin);
|
||||
w.do_paint();
|
||||
return w;
|
||||
}
|
||||
#endif // CGAL_ISO_RECTANGLE_2_H
|
||||
|
||||
#ifdef CGAL_BBOX_2_H
|
||||
Qt_widget& operator<<(Qt_widget& w, const Bbox_2& r);
|
||||
// see Qt_widget for the implementation of this non-template function
|
||||
#endif // CGAL_BBOX_2_H
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_QT_WIDGET_H
|
||||
|
|
@ -0,0 +1,255 @@
|
|||
// ======================================================================
|
||||
//
|
||||
// Copyright (c) 1997-2000 The CGAL Consortium
|
||||
|
||||
// Copyright (c) 2002 ENS de Paris
|
||||
//
|
||||
// This software and related documentation are part of the Computational
|
||||
// Geometry Algorithms Library (CGAL).
|
||||
// This software and documentation are provided "as-is" and without warranty
|
||||
// of any kind. In no event shall the CGAL Consortium be liable for any
|
||||
// damage of any kind.
|
||||
//
|
||||
// The Qt widget we provide for CGAL is distributed under the QPL,
|
||||
// which is Trolltech's open source license. For more information see
|
||||
// http://www.trolltech.com/developer/licensing/qpl.html
|
||||
//
|
||||
// The CGAL Consortium consists of Utrecht University (The Netherlands),
|
||||
// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany),
|
||||
// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
|
||||
// (Germany), Max-Planck-Institute Saarbrucken (Germany), RISC Linz (Austria),
|
||||
// and Tel-Aviv University (Israel).
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// file : include/CGAL/IO/Qt_widget_get_simple_polygon.h
|
||||
// package : Qt_widget (1.2.30)
|
||||
// author(s) : Laurent Rineau && Radu Ursu
|
||||
// release : CGAL-2.4
|
||||
// release_date : 2002, May 16
|
||||
//
|
||||
// coordinator : Laurent Rineau
|
||||
//
|
||||
// email : contact@cgal.org
|
||||
// www : http://www.cgal.org
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef CGAL_QT_WIDGET_GET_SIMPLE_POLYGON_H
|
||||
#define CGAL_QT_WIDGET_GET_SIMPLE_POLYGON_H
|
||||
|
||||
#include <CGAL/IO/Qt_widget_layer.h>
|
||||
#include <CGAL/Segment_2_Segment_2_intersection.h>
|
||||
#include <list>
|
||||
|
||||
#include <qcursor.h>
|
||||
|
||||
namespace CGAL {
|
||||
template <class Polygon>
|
||||
class Qt_widget_get_simple_polygon : public Qt_widget_layer
|
||||
{
|
||||
public:
|
||||
typedef typename Polygon::Point_2 Point_2;
|
||||
typedef typename Polygon::Segment_2 Segment_2;
|
||||
typedef typename Polygon::Edge_const_iterator ECI;
|
||||
typedef typename Polygon::FT FT;
|
||||
|
||||
Qt_widget_get_simple_polygon()
|
||||
: active(false), first_time(true) {}
|
||||
|
||||
void draw()
|
||||
{
|
||||
if(poly.size() > 1)
|
||||
{
|
||||
ECI it;
|
||||
widget->lock();
|
||||
RasterOp old_rasterop=widget->rasterOp();
|
||||
widget->get_painter().setRasterOp(XorROP);
|
||||
*widget << CGAL::GREEN;
|
||||
for(it = poly.edges_begin(); it != --poly.edges_end(); it++)
|
||||
*widget << *it;
|
||||
widget->setRasterOp(old_rasterop);
|
||||
widget->unlock();
|
||||
}
|
||||
return;
|
||||
};
|
||||
private:
|
||||
|
||||
bool is_pure(Qt::ButtonState s){
|
||||
if((s & Qt::ControlButton) ||
|
||||
(s & Qt::ShiftButton) ||
|
||||
(s & Qt::AltButton))
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
void mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
if(e->button() == Qt::LeftButton && is_pure(e->state()))
|
||||
{
|
||||
FT x=static_cast<FT>(widget->x_real(e->x()));
|
||||
FT y=static_cast<FT>(widget->y_real(e->y()));
|
||||
if(!active)
|
||||
{
|
||||
active=true;
|
||||
widget->setMouseTracking(TRUE);
|
||||
last_of_poly = Point_2(x, y);
|
||||
poly.push_back(Point_2(x, y));
|
||||
} else{
|
||||
if (last_of_poly == Point_2(x,y)) return;
|
||||
rubber_old = Point_2(x, y);
|
||||
if(is_simple()){
|
||||
poly.push_back(Point_2(x,y));
|
||||
//show the last rubber as edge of the polygon
|
||||
widget->lock();
|
||||
RasterOp old_rasterop=widget->rasterOp();
|
||||
widget->get_painter().setRasterOp(XorROP);
|
||||
*widget << CGAL::WHITE;
|
||||
*widget << Segment_2(rubber, last_of_poly);
|
||||
*widget << CGAL::GREEN;
|
||||
*widget << Segment_2(rubber, last_of_poly);
|
||||
widget->setRasterOp(old_rasterop);
|
||||
widget->unlock();
|
||||
last_of_poly = Point_2(x, y);
|
||||
}
|
||||
}
|
||||
return;
|
||||
};
|
||||
if(e->button() == Qt::RightButton && is_pure(e->state()))
|
||||
{
|
||||
if (active) {
|
||||
if(!poly.is_simple()) return;
|
||||
if(poly.is_clockwise_oriented())
|
||||
poly.reverse_orientation ();
|
||||
assert( ! poly.is_clockwise_oriented());
|
||||
|
||||
widget->new_object(make_object(poly));
|
||||
active = false;
|
||||
first_time = true;
|
||||
poly.erase(poly.vertices_begin(), poly.vertices_end());
|
||||
widget->redraw();
|
||||
}
|
||||
};
|
||||
};//end mousePressEvent
|
||||
|
||||
// MK:: removed because it does not compile... problem with iterator
|
||||
// of polygon...
|
||||
#if 0
|
||||
void keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
switch ( e->key() ) {
|
||||
case Key_Escape: // key_escape
|
||||
if(poly.size() > 1){
|
||||
widget->lock();
|
||||
RasterOp old_rasterop=widget->rasterOp();
|
||||
widget->get_painter().setRasterOp(XorROP);
|
||||
*widget << CGAL::GREEN;
|
||||
*widget << Segment_2(*(----poly.vertices_end()), last_of_poly);
|
||||
*widget << CGAL::WHITE;
|
||||
*widget << Segment_2(rubber, last_of_poly);
|
||||
*widget << Segment_2(rubber, *(----poly.vertices_end()));
|
||||
widget->setRasterOp(old_rasterop);
|
||||
widget->unlock();
|
||||
poly.erase(--poly.vertices_end());
|
||||
last_of_poly = *(--poly.vertices_end());
|
||||
}
|
||||
break;
|
||||
}//endswitch
|
||||
}
|
||||
#endif
|
||||
|
||||
void mouseMoveEvent(QMouseEvent *e)
|
||||
{
|
||||
if (active)
|
||||
{
|
||||
FT x=static_cast<FT>(widget->x_real(e->x()));
|
||||
FT y=static_cast<FT>(widget->y_real(e->y()));
|
||||
|
||||
rubber = Point_2(x, y);
|
||||
widget->lock();
|
||||
RasterOp old_rasterop=widget->rasterOp();
|
||||
widget->get_painter().setRasterOp(XorROP);
|
||||
// MK:: changed color...
|
||||
// *widget << CGAL::WHITE;
|
||||
*widget << CGAL::ORANGE;
|
||||
if(!first_time)
|
||||
*widget << Segment_2(rubber_old, last_of_poly);
|
||||
*widget << Segment_2(rubber, last_of_poly);
|
||||
first_time = false;
|
||||
rubber_old = rubber;
|
||||
widget->setRasterOp(old_rasterop);
|
||||
widget->unlock();
|
||||
}
|
||||
};
|
||||
void activating()
|
||||
{
|
||||
oldcursor = widget->cursor();
|
||||
widget->setCursor(crossCursor);
|
||||
oldpolicy = widget->focusPolicy();
|
||||
widget->setFocusPolicy(QWidget::StrongFocus);
|
||||
};
|
||||
|
||||
void deactivating()
|
||||
{
|
||||
poly.erase(poly.vertices_begin(), poly.vertices_end());
|
||||
active = false;
|
||||
first_time = true;
|
||||
widget->setCursor(oldcursor);
|
||||
widget->setFocusPolicy(oldpolicy);
|
||||
widget->redraw();
|
||||
};
|
||||
void leaveEvent(QEvent *e)
|
||||
{
|
||||
if (active)
|
||||
{
|
||||
widget->lock();
|
||||
RasterOp old_rasterop=widget->rasterOp();
|
||||
widget->get_painter().setRasterOp(XorROP);
|
||||
*widget << CGAL::WHITE;
|
||||
*widget << Segment_2(rubber_old, last_of_poly);
|
||||
widget->setRasterOp(old_rasterop);
|
||||
widget->unlock();
|
||||
first_time = true;
|
||||
}
|
||||
}
|
||||
private:
|
||||
bool is_simple()
|
||||
{
|
||||
Segment_2 rubber_segment(rubber, last_of_poly);
|
||||
if(poly.size() > 1)
|
||||
{
|
||||
ECI it;
|
||||
for(it = poly.edges_begin(); it != ----poly.edges_end(); it++)
|
||||
{
|
||||
if(do_intersect(*it, rubber_segment))
|
||||
return false;
|
||||
}
|
||||
//if I'm out of this means that all the edges,
|
||||
//didn't intersect the last one
|
||||
++it;
|
||||
Object o = intersection(*it, rubber_segment);
|
||||
Point_2 p;
|
||||
if(assign(p, o))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected:
|
||||
bool active, //true if the first point was inserted
|
||||
first_time; //true if it is the first time when
|
||||
//draw the rubber band
|
||||
Point_2 rubber, //the new point of the rubber band
|
||||
last_of_poly, //the last point of the polygon
|
||||
rubber_old; //the old point of the rubber band
|
||||
Polygon poly; //the polygon
|
||||
QWidget::FocusPolicy oldpolicy;
|
||||
QCursor oldcursor;
|
||||
};
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_QT_WIDGET_GET_SIMPLE_POLYGON_H
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
// ======================================================================
|
||||
//
|
||||
// Copyright (c) 1999 The CGAL Consortium
|
||||
//
|
||||
// This software and related documentation is part of an INTERNAL release
|
||||
// of the Computational Geometry Algorithms Library (CGAL). It is not
|
||||
// intended for general use.
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// release : $CGAL_Revision: CGAL-2.4-I-65 $
|
||||
// release_date : $CGAL_Date: 2002/03/19 $
|
||||
//
|
||||
// file : include/CGAL/Number_type_traits.h
|
||||
// package : Number_types (4.46)
|
||||
// maintainer : Sylvain Pion <Sylvain.Pion@sophia.inria.fr>
|
||||
// revision : $Revision$
|
||||
// revision_date : $Date$
|
||||
// author(s) : Susan Hert, Michael Hoffmann
|
||||
//
|
||||
// coordinator : MPI, Saarbruecken
|
||||
// ======================================================================
|
||||
|
||||
|
||||
#ifndef CGAL_NUMBER_TYPE_TRAITS_H
|
||||
#define CGAL_NUMBER_TYPE_TRAITS_H
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
||||
template < class NT >
|
||||
struct Number_type_traits {
|
||||
typedef typename NT::Has_gcd Has_gcd;
|
||||
typedef typename NT::Has_division Has_division;
|
||||
typedef typename NT::Has_sqrt Has_sqrt;
|
||||
};
|
||||
|
||||
template < class Rational >
|
||||
struct Rational_traits {
|
||||
typedef typename Rational::NT RT;
|
||||
|
||||
RT numerator (const Rational & r) const { return r.numerator(); }
|
||||
RT denominator (const Rational & r) const { return r.denominator(); }
|
||||
|
||||
Rational make_rational(const RT & n, const RT & d) const
|
||||
{ return Rational(n, d); }
|
||||
};
|
||||
|
||||
// number type tags
|
||||
struct Ring_tag {};
|
||||
struct Euclidean_ring_tag {};
|
||||
struct Field_tag {};
|
||||
struct Sqrt_field_tag {};
|
||||
|
||||
CGAL_END_NAMESPACE
|
||||
|
||||
#endif // CGAL_NUMBER_TYPE_TRAITS_H
|
||||
|
|
@ -0,0 +1,261 @@
|
|||
// ======================================================================
|
||||
//
|
||||
// Copyright (c) 1997 The CGAL Consortium
|
||||
|
||||
// This software and related documentation are part of the Computational
|
||||
// Geometry Algorithms Library (CGAL).
|
||||
// This software and documentation are provided "as-is" and without warranty
|
||||
// of any kind. In no event shall the CGAL Consortium be liable for any
|
||||
// damage of any kind.
|
||||
//
|
||||
// Every use of CGAL requires a license.
|
||||
//
|
||||
// Academic research and teaching license
|
||||
// - For academic research and teaching purposes, permission to use and copy
|
||||
// the software and its documentation is hereby granted free of charge,
|
||||
// provided that it is not a component of a commercial product, and this
|
||||
// notice appears in all copies of the software and related documentation.
|
||||
//
|
||||
// Commercial licenses
|
||||
// - Please check the CGAL web site http://www.cgal.org/index2.html for
|
||||
// availability.
|
||||
//
|
||||
// The CGAL Consortium consists of Utrecht University (The Netherlands),
|
||||
// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany),
|
||||
// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
|
||||
// (Germany), Max-Planck-Institute Saarbrucken (Germany), RISC Linz (Austria),
|
||||
// and Tel-Aviv University (Israel).
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// release : CGAL-2.4
|
||||
// release_date : 2002, May 16
|
||||
//
|
||||
// file : include/CGAL/Triangulation_ds_face_2.h
|
||||
// package : Triangulation_2 (7.32)
|
||||
// source : $RCSfile$
|
||||
// revision : $Revision$
|
||||
// revision_date : $Date$
|
||||
// author(s) : Mariette Yvinec
|
||||
//
|
||||
// coordinator : Mariette Yvinec
|
||||
//
|
||||
// email : contact@cgal.org
|
||||
// www : http://www.cgal.org
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef CGAL_TRIANGULATION_DS_FACE_2_H
|
||||
#define CGAL_TRIANGULATION_DS_FACE_2_H
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Triangulation_short_names_2.h>
|
||||
#include <CGAL/Triangulation_utils_2.h>
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
||||
template < class Tds >
|
||||
class Triangulation_ds_face_2
|
||||
: public Tds::Face_base
|
||||
{
|
||||
public:
|
||||
typedef typename Tds::Vertex_base Vb;
|
||||
typedef typename Tds::Face_base Fb;
|
||||
typedef typename Tds::Vertex Vertex;
|
||||
typedef typename Tds::Face Face;
|
||||
typedef typename Tds::Vertex_handle Vertex_handle;
|
||||
typedef typename Tds::Face_handle Face_handle;
|
||||
|
||||
public :
|
||||
// creators
|
||||
Triangulation_ds_face_2()
|
||||
: Fb()
|
||||
{}
|
||||
|
||||
Triangulation_ds_face_2(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2)
|
||||
: Fb(&*v0,&*v1,&*v2)
|
||||
{}
|
||||
|
||||
Triangulation_ds_face_2(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2,
|
||||
Face_handle n0, Face_handle n1, Face_handle n2)
|
||||
: Fb(&*v0,&*v1,&*v2,&*n0,&*n1,&*n2)
|
||||
{}
|
||||
|
||||
Triangulation_ds_face_2( const Face& f)
|
||||
: Fb(f)
|
||||
{}
|
||||
|
||||
static int ccw(int i) {return Triangulation_cw_ccw_2::ccw(i);}
|
||||
static int cw(int i) {return Triangulation_cw_ccw_2::cw(i);}
|
||||
|
||||
//setting
|
||||
void set_vertex(int i, Vertex_handle v) { Fb::set_vertex(i, &*v);}
|
||||
void set_neighbor(int i, Face_handle n) { Fb::set_neighbor(i, &*n);}
|
||||
void set_vertices() { Fb::set_vertices();}
|
||||
void set_neighbors() { Fb::set_neighbors();}
|
||||
void set_vertices(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2);
|
||||
void set_neighbors(Face_handle n0, Face_handle n1, Face_handle n2);
|
||||
//void reorient(); inherited from Fb
|
||||
|
||||
//Vertex Access Member Functions
|
||||
Vertex_handle vertex(int i) const;
|
||||
Vertex_handle mirror_vertex(int i) const;
|
||||
bool has_vertex(Vertex_handle v) const;
|
||||
bool has_vertex(Vertex_handle v, int& i) const;
|
||||
int index(Vertex_handle v) const;
|
||||
|
||||
// Neighbors Access Functions
|
||||
Face_handle neighbor(int i) const;
|
||||
bool has_neighbor(Face_handle n) const;
|
||||
bool has_neighbor(Face_handle n, int& i) const;
|
||||
int index(Face_handle n) const;
|
||||
int mirror_index(int i) const;
|
||||
|
||||
//Miscelleanous
|
||||
Face_handle handle() const {return const_cast<Face*>(this);}
|
||||
Face_handle handle() {return const_cast<Face*>(this);}
|
||||
bool is_valid(bool verbose = false, int level = 0) const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
template < class Tds >
|
||||
inline void
|
||||
Triangulation_ds_face_2<Tds>::
|
||||
set_vertices(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2)
|
||||
{
|
||||
Fb::set_vertices(&*v0,&*v1,&*v2);
|
||||
}
|
||||
|
||||
template < class Tds >
|
||||
inline void
|
||||
Triangulation_ds_face_2<Tds>::
|
||||
set_neighbors(Face_handle n0, Face_handle n1, Face_handle n2)
|
||||
{
|
||||
Fb::set_neighbors(&*n0,&*n1,&*n2);
|
||||
}
|
||||
|
||||
template < class Tds >
|
||||
inline
|
||||
typename Triangulation_ds_face_2<Tds>::Vertex_handle
|
||||
Triangulation_ds_face_2<Tds>::
|
||||
vertex(int i) const
|
||||
{
|
||||
return(Vertex_handle(static_cast<Vertex*>(Fb::vertex(i))));
|
||||
}
|
||||
|
||||
template < class Tds >
|
||||
inline
|
||||
typename Triangulation_ds_face_2<Tds>::Vertex_handle
|
||||
Triangulation_ds_face_2<Tds>::
|
||||
mirror_vertex(int i) const
|
||||
{
|
||||
CGAL_triangulation_precondition ( neighbor(i) != NULL);
|
||||
//return neighbor(i)->vertex(neighbor(i)->index(this->handle()));
|
||||
return neighbor(i)->vertex(mirror_index(i));
|
||||
}
|
||||
|
||||
template < class Tds >
|
||||
inline int
|
||||
Triangulation_ds_face_2<Tds>::
|
||||
mirror_index(int i) const
|
||||
{
|
||||
// return the index of opposite vertex in neighbor(i);
|
||||
CGAL_triangulation_precondition (neighbor(i) != NULL);
|
||||
//return neighbor(i)->index(this->handle());
|
||||
return ccw( neighbor(i)->index(vertex(ccw(i))));
|
||||
}
|
||||
|
||||
template < class Tds >
|
||||
inline bool
|
||||
Triangulation_ds_face_2<Tds>::
|
||||
has_vertex(Vertex_handle v) const
|
||||
{
|
||||
return (Fb::has_vertex(&*v));
|
||||
}
|
||||
|
||||
template < class Tds >
|
||||
inline bool
|
||||
Triangulation_ds_face_2<Tds>::
|
||||
has_vertex(Vertex_handle v, int& i) const
|
||||
{
|
||||
return (Fb::has_vertex(&*v,i));
|
||||
}
|
||||
|
||||
template < class Tds >
|
||||
inline int
|
||||
Triangulation_ds_face_2<Tds>::
|
||||
index(Vertex_handle v) const
|
||||
{
|
||||
return(Fb::vertex_index(&*v));
|
||||
}
|
||||
|
||||
// Neighbors Access Functions
|
||||
template < class Tds >
|
||||
inline
|
||||
typename Triangulation_ds_face_2<Tds>::Face_handle
|
||||
Triangulation_ds_face_2<Tds>::
|
||||
neighbor(int i) const
|
||||
{
|
||||
return (static_cast<Face*>(Fb::neighbor(i)));
|
||||
}
|
||||
|
||||
template < class Tds >
|
||||
inline bool
|
||||
Triangulation_ds_face_2<Tds>::
|
||||
has_neighbor(Face_handle n) const
|
||||
{
|
||||
return (Fb::has_neighbor(&*n));
|
||||
}
|
||||
|
||||
template < class Tds >
|
||||
inline bool
|
||||
Triangulation_ds_face_2<Tds>::
|
||||
has_neighbor(Face_handle n, int& i) const
|
||||
{
|
||||
return (Fb::has_neighbor(&*n,i));
|
||||
}
|
||||
|
||||
template < class Tds >
|
||||
inline int
|
||||
Triangulation_ds_face_2<Tds>::
|
||||
index(Face_handle n) const
|
||||
{
|
||||
return(Fb::face_index(&*n));
|
||||
}
|
||||
|
||||
//Miscelleanous
|
||||
template < class Tds >
|
||||
bool
|
||||
Triangulation_ds_face_2<Tds>::
|
||||
is_valid(bool verbose, int level) const
|
||||
{
|
||||
bool result = Fb::is_valid(verbose, level);
|
||||
for(int i = 0; i <= dimension(); i++) {
|
||||
Face_handle n = neighbor(i);
|
||||
// MK: this needs to be changed so that we get the correct index
|
||||
// when we have two faces with two common edges
|
||||
// int in = n->index(this->handle());
|
||||
int in = n->index(mirror_vertex(i));
|
||||
result = result && ( this->handle() == n->neighbor(in) );
|
||||
switch(dimension()) {
|
||||
case 0 :
|
||||
break;
|
||||
case 1 :
|
||||
result = result && in == 1-i;
|
||||
result = result && ( this->vertex(1-i) == n->vertex(1-in));
|
||||
break;
|
||||
case 2 :
|
||||
result = result && ( this->vertex(cw(i)) == n->vertex(ccw(in)))
|
||||
&& ( this->vertex(ccw(i)) == n->vertex(cw(in)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
CGAL_END_NAMESPACE
|
||||
|
||||
#endif //CGAL_TRIANGULATION_DS_FACE_2_H
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef CGAL_COLORS_H
|
||||
#define CGAL_COLORS_H
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
||||
const Color PINEGREEN = Color(0, 127, 0);
|
||||
const Color DARKGREEN = Color(0, 200, 0);
|
||||
const Color DARKGRAY = Color(64, 64, 64);
|
||||
const Color CYAN = Color(50, 248, 255);
|
||||
const Color LIGHTBLUE = Color(104, 144, 255);
|
||||
|
||||
CGAL_END_NAMESPACE
|
||||
|
||||
|
||||
#endif // CGAL_COLORS_H
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
# Created by the script create_makefile
|
||||
# This is the makefile for compiling a CGAL application.
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# include platform specific settings
|
||||
#---------------------------------------------------------------------#
|
||||
# Choose the right include file from the <cgalroot>/make directory.
|
||||
|
||||
# CGAL_MAKEFILE = ENTER_YOUR_INCLUDE_MAKEFILE_HERE
|
||||
include $(CGAL_MAKEFILE)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# compiler flags
|
||||
#---------------------------------------------------------------------#
|
||||
# the following directory is needed with CGAL 2.4 (public version)
|
||||
# because some patches where needed in that version to make the demo work
|
||||
#
|
||||
# CGAL 2.5 has the needed functionality and so the following directory is not
|
||||
# needed with 2.5
|
||||
CGAL_PATCHES_DIR = ./include
|
||||
AG_INC_DIR = ../../include
|
||||
MY_CXXFLAGS = -I$(CGAL_PATCHES_DIR) -I$(AG_INC_DIR)
|
||||
|
||||
CXXFLAGS = $(MY_CXXFLAGS) \
|
||||
$(CGAL_CXXFLAGS) \
|
||||
$(LONG_NAME_PROBLEM_CXXFLAGS) \
|
||||
$(DEBUG_OPT)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# linker flags
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
LIBPATH = \
|
||||
$(CGAL_LIBPATH)
|
||||
|
||||
LDFLAGS = \
|
||||
$(LONG_NAME_PROBLEM_LDFLAGS) \
|
||||
$(CGAL_QT_LDFLAGS) \
|
||||
$(CGAL_LDFLAGS)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# target entries
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
all: \
|
||||
demo$(EXE_EXT)
|
||||
|
||||
demo.moc: demo.C
|
||||
$(QT_MOC) -o demo.moc $<
|
||||
|
||||
qt_file_toolbar.moc: qt_file_toolbar.h
|
||||
$(QT_MOC) -o qt_file_toolbar.moc $<
|
||||
|
||||
qt_layers_toolbar.moc: qt_layers_toolbar.h
|
||||
$(QT_MOC) -o qt_layers_toolbar.moc $<
|
||||
|
||||
demo$(OBJ_EXT): demo.moc qt_file_toolbar.moc qt_layers_toolbar.moc
|
||||
|
||||
demo$(EXE_EXT): demo$(OBJ_EXT)
|
||||
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)demo demo$(OBJ_EXT) $(LDFLAGS)
|
||||
|
||||
clean: \
|
||||
demo.clean
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# suffix rules
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
.C$(OBJ_EXT):
|
||||
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<
|
||||
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
#ifndef QT_FILE_TOOLBAR_H
|
||||
#define QT_FILE_TOOLBAR_H
|
||||
|
||||
// include files for QT
|
||||
#include <qapp.h>
|
||||
#include <qmainwindow.h>
|
||||
#include <qaction.h>
|
||||
#include <qmenubar.h>
|
||||
#include <qpopupmenu.h>
|
||||
#include <qtoolbar.h>
|
||||
#include <qtoolbutton.h>
|
||||
#include <qstatusbar.h>
|
||||
#include <qwhatsthis.h>
|
||||
#include <qstring.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qmsgbox.h>
|
||||
#include <qfiledialog.h>
|
||||
#include <qprinter.h>
|
||||
#include <qpainter.h>
|
||||
|
||||
#include "filesave.xpm"
|
||||
#include "fileopen.xpm"
|
||||
#include "filenew.xpm"
|
||||
#include "fileprint.xpm"
|
||||
|
||||
|
||||
class File_toolbar : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
QToolBar *fileToolbar;
|
||||
QMainWindow *window;
|
||||
|
||||
QAction *fileNew;
|
||||
QAction *fileOpen;
|
||||
QAction *fileSave;
|
||||
QAction *fileSaveAs;
|
||||
QAction *fileClose;
|
||||
QAction *filePrint;
|
||||
public:
|
||||
/** construtor */
|
||||
File_toolbar(QMainWindow *mw)
|
||||
{
|
||||
window = mw;
|
||||
initActions();
|
||||
initToolBar();
|
||||
}
|
||||
|
||||
~File_toolbar()
|
||||
{
|
||||
delete fileNew;
|
||||
delete fileOpen;
|
||||
delete fileSave;
|
||||
delete fileSaveAs;
|
||||
delete fileClose;
|
||||
delete filePrint;
|
||||
|
||||
delete fileToolbar;
|
||||
}
|
||||
|
||||
|
||||
inline QToolBar* toolbar() { return fileToolbar; }
|
||||
|
||||
signals:
|
||||
void fileToRead(const QString& f);
|
||||
void clearAll();
|
||||
void printScreen();
|
||||
|
||||
private:
|
||||
void initActions()
|
||||
{
|
||||
QPixmap openIcon, saveIcon, newIcon, printIcon;
|
||||
newIcon = QPixmap(filenew);
|
||||
openIcon = QPixmap(fileopen);
|
||||
saveIcon = QPixmap(filesave);
|
||||
printIcon = QPixmap(fileprint);
|
||||
|
||||
fileNew = new QAction(tr("New File"), newIcon, tr("&New"),
|
||||
0, this);
|
||||
fileNew->setStatusTip(tr("Creates a new document"));
|
||||
fileNew->setWhatsThis(tr("New File\n\nCreates a new document"));
|
||||
connect(fileNew, SIGNAL(activated()), this, SLOT(slotFileNew()));
|
||||
|
||||
fileOpen = new QAction(tr("Open File"), openIcon,
|
||||
tr("&Open..."), 0, this);
|
||||
fileOpen->setStatusTip(tr("Opens an existing document"));
|
||||
fileOpen->setWhatsThis(tr("Open File\n\nOpens an existing document"));
|
||||
connect(fileOpen, SIGNAL(activated()), this, SLOT(slotFileOpen()));
|
||||
|
||||
fileSave = new QAction(tr("Save File"), saveIcon, tr("&Save"),
|
||||
0, this);
|
||||
fileSave->setStatusTip(tr("Saves the actual document"));
|
||||
fileSave->setWhatsThis(tr("Save File.\n\nSaves the actual document"));
|
||||
connect(fileSave, SIGNAL(activated()), this, SLOT(slotFileSave()));
|
||||
|
||||
fileSaveAs = new QAction(tr("Save File As"), saveIcon, tr("Save &as..."),
|
||||
0, this);
|
||||
fileSaveAs->setStatusTip(tr("Saves the actual document under a new filename"));
|
||||
QString _save_as =
|
||||
tr("Save As\n\nSaves the actual document under a new filename");
|
||||
fileSaveAs->setWhatsThis(_save_as);
|
||||
connect(fileSaveAs, SIGNAL(activated()), this, SLOT(slotFileSaveAs()));
|
||||
#if 0
|
||||
fileSaveAs = new QAction(tr("Save File As"), tr("Save &as..."), 0, this);
|
||||
fileSaveAs->setStatusTip(tr("Saves the actual document under a new filename"));
|
||||
fileSaveAs->setWhatsThis(tr("Save As\n\nSaves the actual document under a new filename"));
|
||||
connect(fileSaveAs, SIGNAL(activated()), this, SLOT(slotFileSave()));
|
||||
#endif
|
||||
|
||||
fileClose = new QAction(tr("Close File"), tr("&Close"),
|
||||
0, this);
|
||||
fileClose->setStatusTip(tr("Closes the actual document"));
|
||||
fileClose->setWhatsThis(tr("Close File\n\nCloses the actual document"));
|
||||
connect(fileClose, SIGNAL(activated()), this, SLOT(slotFileClose()));
|
||||
|
||||
filePrint = new QAction(tr("Print File"), printIcon, tr("&Print"),
|
||||
0, this);
|
||||
filePrint->setStatusTip(tr("Prints out the actual document"));
|
||||
filePrint->setWhatsThis(tr("Print File\n\nPrints out the actual document"));
|
||||
connect(filePrint, SIGNAL(activated()), this, SLOT(slotFilePrint()));
|
||||
}
|
||||
|
||||
void initToolBar()
|
||||
{
|
||||
fileToolbar = new QToolBar(window, "file operations");
|
||||
fileNew->addTo(fileToolbar);
|
||||
fileOpen->addTo(fileToolbar);
|
||||
fileSaveAs->addTo(fileToolbar);
|
||||
filePrint->addTo(fileToolbar);
|
||||
fileToolbar->addSeparator();
|
||||
QWhatsThis::whatsThisButton(fileToolbar);
|
||||
}
|
||||
|
||||
/** setup the statusbar */
|
||||
|
||||
public slots:
|
||||
/** generate a new document in the actual view */
|
||||
void slotFileNew()
|
||||
{
|
||||
emit clearAll();
|
||||
}
|
||||
/** open a document */
|
||||
void slotFileOpen()
|
||||
{
|
||||
QString fileName =
|
||||
QFileDialog::getOpenFileName(QString::null, QString::null,
|
||||
window, "Open file...");
|
||||
|
||||
if ( !fileName.isNull() ) {
|
||||
emit fileToRead(fileName);
|
||||
}
|
||||
}
|
||||
/** save a document */
|
||||
void slotFileSave()
|
||||
{
|
||||
|
||||
}
|
||||
/** save a document under a different filename*/
|
||||
void slotFileSaveAs()
|
||||
{
|
||||
QString fileName =
|
||||
QFileDialog::getSaveFileName(tr("data.out"), QString::null,
|
||||
window, "Save file As...");
|
||||
|
||||
if ( !fileName.isNull() ) {
|
||||
std::cout << fileName << std::endl;
|
||||
}
|
||||
}
|
||||
/** close the actual file */
|
||||
void slotFileClose() {}
|
||||
/** print the actual file */
|
||||
void slotFilePrint() {
|
||||
emit printScreen();
|
||||
}
|
||||
/** put the marked text/object into the clipboard and remove
|
||||
* it from the document */
|
||||
};
|
||||
|
||||
#endif // QT_FILE_TOOLBAR_H
|
||||
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
#ifndef QT_LAYERS_H
|
||||
#define QT_LAYERS_H
|
||||
|
||||
#include <CGAL/IO/Qt_widget_layer.h>
|
||||
|
||||
template< class T >
|
||||
class Voronoi_diagram_layer : public CGAL::Qt_widget_layer {
|
||||
private:
|
||||
T& ag;
|
||||
|
||||
public:
|
||||
Voronoi_diagram_layer(T& ag) : ag(ag) {}
|
||||
|
||||
void draw() {
|
||||
*widget << CGAL::BLUE;
|
||||
ag.draw_dual(*widget);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
template< class T >
|
||||
class Delaunay_graph_layer : public CGAL::Qt_widget_layer {
|
||||
private:
|
||||
T& ag;
|
||||
|
||||
public:
|
||||
Delaunay_graph_layer(T& ag) : ag(ag) {}
|
||||
|
||||
void draw(){
|
||||
*widget << CGAL::GREEN;
|
||||
ag.draw_primal(*widget);
|
||||
}
|
||||
};
|
||||
|
||||
template< class T >
|
||||
class Non_hidden_weighted_points_layer : public CGAL::Qt_widget_layer {
|
||||
private:
|
||||
T& ag;
|
||||
|
||||
public:
|
||||
Non_hidden_weighted_points_layer(T& ag) : ag(ag) {}
|
||||
|
||||
void draw(){
|
||||
*widget << CGAL::RED;
|
||||
ag.draw_non_hidden_weighted_points(*widget);
|
||||
}
|
||||
};
|
||||
|
||||
template< class T >
|
||||
class Hidden_weighted_points_layer : public CGAL::Qt_widget_layer {
|
||||
private:
|
||||
T& ag;
|
||||
|
||||
public:
|
||||
Hidden_weighted_points_layer(T& ag) : ag(ag) {}
|
||||
|
||||
void draw(){
|
||||
*widget << CGAL::Color(64,64,64);
|
||||
ag.draw_hidden_weighted_points(*widget);
|
||||
}
|
||||
};
|
||||
|
||||
template< class T >
|
||||
class Non_hidden_centers_layer : public CGAL::Qt_widget_layer {
|
||||
private:
|
||||
T& ag;
|
||||
|
||||
public:
|
||||
Non_hidden_centers_layer(T& ag) : ag(ag) {}
|
||||
|
||||
void draw(){
|
||||
*widget << CGAL::RED;
|
||||
ag.draw_non_hidden_weighted_point_centers(*widget);
|
||||
}
|
||||
};
|
||||
|
||||
template< class T >
|
||||
class Hidden_centers_layer : public CGAL::Qt_widget_layer {
|
||||
private:
|
||||
T& ag;
|
||||
|
||||
public:
|
||||
Hidden_centers_layer(T& ag) : ag(ag) {}
|
||||
|
||||
void draw(){
|
||||
*widget << CGAL::Color(64,64,64);
|
||||
ag.draw_hidden_weighted_point_centers(*widget);
|
||||
}
|
||||
};
|
||||
|
||||
#endif // QT_LAYERS_H
|
||||
|
|
@ -0,0 +1,251 @@
|
|||
#ifndef QT_LAYERS_TOOLBAR_H
|
||||
#define QT_LAYERS_TOOLBAR_H
|
||||
|
||||
#include <CGAL/IO/Qt_widget.h>
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qtoolbutton.h>
|
||||
#include <qtoolbar.h>
|
||||
#include <qstatusbar.h>
|
||||
#include <qstring.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
#include <CGAL/IO/Qt_layer_show_mouse_coordinates.h>
|
||||
|
||||
#include "qt_layers.h"
|
||||
|
||||
// icons
|
||||
#include <CGAL/IO/pixmaps/points.xpm>
|
||||
#include <CGAL/IO/pixmaps/point.xpm>
|
||||
#include <CGAL/IO/pixmaps/circle.xpm>
|
||||
#include <CGAL/IO/pixmaps/triangulation.xpm>
|
||||
#include <CGAL/IO/pixmaps/voronoi.xpm>
|
||||
#include <CGAL/IO/pixmaps/mouse_coord.xpm>
|
||||
#include <CGAL/IO/pixmaps/notool.xpm>
|
||||
//#include "removecircle.xpm"
|
||||
|
||||
|
||||
class Layers_toolbar : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Layers_toolbar(CGAL::Qt_widget *w, QMainWindow *mw, AG_2& ag)
|
||||
: nr_of_buttons(0) {
|
||||
|
||||
showVD = new Voronoi_diagram_layer<AG_2>(ag);
|
||||
showDG = new Delaunay_graph_layer<AG_2>(ag);
|
||||
showNT = new Non_hidden_weighted_points_layer<AG_2>(ag);
|
||||
showTR = new Hidden_weighted_points_layer<AG_2>(ag);
|
||||
showNC = new Non_hidden_centers_layer<AG_2>(ag);
|
||||
showTC = new Hidden_centers_layer<AG_2>(ag);
|
||||
showMC = new CGAL::Qt_layer_mouse_coordinates(*mw);
|
||||
|
||||
// set the widget
|
||||
widget = w;
|
||||
window = mw;
|
||||
window->statusBar();
|
||||
|
||||
widget->attach(showTC);
|
||||
widget->attach(showTR);
|
||||
widget->attach(showDG);
|
||||
widget->attach(showVD);
|
||||
widget->attach(showNT);
|
||||
widget->attach(showNC);
|
||||
widget->attach(showMC);
|
||||
|
||||
maintoolbar = new QToolBar("tools", mw, QMainWindow::Top, TRUE, "Tools");
|
||||
|
||||
but[0] = new QToolButton(QPixmap( (const char**)points_xpm ),
|
||||
"Show weighted points",
|
||||
0,
|
||||
this,
|
||||
SLOT(show_weighted_points()),
|
||||
maintoolbar,
|
||||
"Show weighted points");
|
||||
|
||||
but[1] = new QToolButton(QPixmap( (const char**)voronoi_xpm ),
|
||||
"Show Voronoi diagram",
|
||||
0,
|
||||
this,
|
||||
SLOT(show_voronoi()),
|
||||
maintoolbar,
|
||||
"Show Voronoi_diagram");
|
||||
|
||||
|
||||
but[2] = new QToolButton(QPixmap( (const char**)triangulation_xpm ),
|
||||
"Show Delaunay graph",
|
||||
0,
|
||||
this,
|
||||
SLOT(show_delaunay()),
|
||||
maintoolbar,
|
||||
"Show Delaunay graph");
|
||||
|
||||
but[3] = new QToolButton(QPixmap( (const char**)point_xpm ),
|
||||
"Insert point",
|
||||
0,
|
||||
this,
|
||||
SLOT(insert_point_mode()),
|
||||
maintoolbar,
|
||||
"Insert point");
|
||||
|
||||
but[4] = new QToolButton(QPixmap( (const char**)circle_xpm ),
|
||||
"Insert circle",
|
||||
0,
|
||||
this,
|
||||
SLOT(insert_circle_mode()),
|
||||
maintoolbar,
|
||||
"Insert circle");
|
||||
|
||||
#if 0
|
||||
but[5] = new QToolButton(QPixmap( (const char**)removecircle_xpm ),
|
||||
"Remove weighted point",
|
||||
0,
|
||||
this,
|
||||
SLOT(remove_mode()),
|
||||
maintoolbar,
|
||||
"Remove weighted point");
|
||||
#else
|
||||
but[5] = new QToolButton(QPixmap( (const char**)notool_xpm ),
|
||||
"Remove weighted point",
|
||||
0,
|
||||
this,
|
||||
SLOT(remove_mode()),
|
||||
maintoolbar,
|
||||
"Remove weighted point");
|
||||
#endif
|
||||
but[6] = new QToolButton(maintoolbar, "mouse coordinates");
|
||||
but[6]->setPixmap(QPixmap( (const char**)mouse_coord_xpm ));
|
||||
but[6]->setTextLabel("Show Mouse Coordinates");
|
||||
|
||||
connect(but[6], SIGNAL(stateChanged(int)),
|
||||
showMC, SLOT(stateChanged(int)));
|
||||
|
||||
showMC->deactivate();
|
||||
showDG->deactivate();
|
||||
|
||||
nr_of_buttons = 7;
|
||||
for(int i = 0; i < nr_of_buttons; i++){
|
||||
but[i]->setToggleButton(TRUE);
|
||||
}
|
||||
|
||||
but[0]->toggle();
|
||||
but[1]->toggle();
|
||||
// but[2]->toggle();
|
||||
// but[3]->toggle();
|
||||
but[4]->toggle();
|
||||
// but[5]->toggle();
|
||||
// but[6]->toggle();
|
||||
}
|
||||
|
||||
~Layers_toolbar() {
|
||||
delete showVD;
|
||||
delete showDG;
|
||||
delete showTR;
|
||||
delete showNT;
|
||||
delete showNC;
|
||||
delete showTC;
|
||||
delete showMC;
|
||||
}
|
||||
|
||||
inline QToolBar* toolbar() { return maintoolbar; };
|
||||
|
||||
signals:
|
||||
void new_object(CGAL::Object);
|
||||
void removeModeChanged(bool);
|
||||
void inputModeChanged(bool);
|
||||
|
||||
private slots:
|
||||
void show_centers() {
|
||||
if ( but[0]->isOn() ) {
|
||||
// widget->activate(showNC);
|
||||
// widget->activate(showTC);
|
||||
showNC->activate();
|
||||
showTC->activate();
|
||||
} else {
|
||||
// widget->deactivate(showNC);
|
||||
// widget->deactivate(showTC);
|
||||
showNC->deactivate();
|
||||
showTC->deactivate();
|
||||
}
|
||||
widget->redraw();
|
||||
}
|
||||
|
||||
void show_weighted_points() {
|
||||
if ( but[0]->isOn() ) {
|
||||
showNT->activate();
|
||||
showTR->activate();
|
||||
|
||||
showNC->activate();
|
||||
showTC->activate();
|
||||
} else {
|
||||
showNT->deactivate();
|
||||
showTR->deactivate();
|
||||
|
||||
showNC->deactivate();
|
||||
showTC->deactivate();
|
||||
}
|
||||
widget->redraw();
|
||||
}
|
||||
|
||||
void show_voronoi() {
|
||||
if ( but[1]->isOn() ) {
|
||||
showVD->activate();
|
||||
} else {
|
||||
showVD->deactivate();
|
||||
}
|
||||
widget->redraw();
|
||||
}
|
||||
|
||||
void show_delaunay() {
|
||||
if ( but[2]->isOn() ) {
|
||||
// widget->activate(showDG);
|
||||
showDG->activate();
|
||||
} else {
|
||||
// widget->deactivate(showDG);
|
||||
showDG->deactivate();
|
||||
}
|
||||
widget->redraw();
|
||||
}
|
||||
|
||||
void insert_point_mode() {
|
||||
if ( !but[3]->isOn() ) {
|
||||
but[3]->toggle();
|
||||
return;
|
||||
}
|
||||
|
||||
but[4]->toggle();
|
||||
emit inputModeChanged( true );
|
||||
}
|
||||
|
||||
void insert_circle_mode() {
|
||||
if ( !but[4]->isOn() ) {
|
||||
but[4]->toggle();
|
||||
return;
|
||||
}
|
||||
|
||||
but[3]->toggle();
|
||||
emit inputModeChanged( false );
|
||||
}
|
||||
|
||||
void remove_mode() {
|
||||
emit removeModeChanged( but[5]->isOn() );
|
||||
}
|
||||
|
||||
private:
|
||||
QToolBar *maintoolbar;
|
||||
QToolButton *but[10];
|
||||
CGAL::Qt_widget *widget;
|
||||
QMainWindow *window;
|
||||
int nr_of_buttons;
|
||||
|
||||
Voronoi_diagram_layer<AG_2> *showVD;
|
||||
Delaunay_graph_layer<AG_2> *showDG;
|
||||
Non_hidden_weighted_points_layer<AG_2> *showNT;
|
||||
Hidden_weighted_points_layer<AG_2> *showTR;
|
||||
Non_hidden_centers_layer<AG_2> *showNC;
|
||||
Hidden_centers_layer<AG_2> *showTC;
|
||||
CGAL::Qt_layer_mouse_coordinates *showMC;
|
||||
|
||||
};//end class
|
||||
|
||||
#endif // QT_LAYERS_TOOLBAR_H
|
||||
|
|
@ -0,0 +1,167 @@
|
|||
/* XPM */
|
||||
static char *magick[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"131 130 31 1",
|
||||
" c black",
|
||||
". c #110000",
|
||||
"X c #111111",
|
||||
"o c #222222",
|
||||
"O c gray20",
|
||||
"+ c #403030",
|
||||
"@ c #444444",
|
||||
"# c #504040",
|
||||
"$ c #555555",
|
||||
"% c gray40",
|
||||
"& c #777777",
|
||||
"* c #cc0000",
|
||||
"= c #e01515",
|
||||
"- c red",
|
||||
"; c #ff0b0b",
|
||||
": c #ff1111",
|
||||
"> c #f42929",
|
||||
", c #ff3232",
|
||||
"< c #ff4444",
|
||||
"1 c #888888",
|
||||
"2 c gray60",
|
||||
"3 c #aaaaaa",
|
||||
"4 c #bbbbbb",
|
||||
"5 c gray80",
|
||||
"6 c #dddddd",
|
||||
"7 c #efdfdf",
|
||||
"8 c #ffcccc",
|
||||
"9 c #ffdddd",
|
||||
"0 c #eeeeee",
|
||||
"q c #ffeeee",
|
||||
"w c white",
|
||||
/* pixels */
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwww9qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq9wwwwwwwww",
|
||||
"wwwwwwww8:,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,:8wwwwwwww",
|
||||
"wwwwwww8:--,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,--:8wwwwwww",
|
||||
"wwwwww8:----,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----:8wwwwww",
|
||||
"wwwww8:------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,------:8wwwww",
|
||||
"wwww8:--------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,--------:8wwww",
|
||||
"wwww<----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------<wwww",
|
||||
"wwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwww",
|
||||
"wwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwww",
|
||||
"wwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwww",
|
||||
"wwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwww",
|
||||
"wwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwww",
|
||||
"wwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwww",
|
||||
"wwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww444&444wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwww",
|
||||
"wwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwww61&@@o o@@&16wwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwww5&O O&5wwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwww3&o o&4wwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwww6%X X%6wwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwww0&X X&0wwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwww&X X&wwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwq,----------,qwwwwwwwww2o o2wwwwwwwwwq,----------,qwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwq,----------,qwwwwww4O X@X O4wwwwwwq,----------,qwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwq,----------,qwwww& o%&1440wwwww0441&%o &wwwwq,----------,qwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwq,----------,qw0% O&5wwwwwwwwwwwwwwwwwww5&O %0wq,----------,qwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwq,----------,7O O16wwwwwwwwwwwwwwwwwwwwwwwww61O O7,----------,qwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwq,----------*. @6wwwwwwwwwwwwwwwwwwwwwwwwwwwwwww6@ .*----------,qwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwq,----------*. @4wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww4@ .*----------,qwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwq,----------*. o2wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww2o .*----------,qwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwwq,----------*. X1wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww1X .*----------,qwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwwwq,----------*. o5wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww5o .*----------,qwwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwwwwq>----------*+0wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww0+*---------->qwwwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwwww0O*----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------*O0wwwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwwww@ .*---------;,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------*. @wwwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwww% .*----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------*. %wwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwww2 .*----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------*. 2wwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwww0X .*----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------*. X0wwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwww% .=----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------=. %wwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwww6 O7,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,7O 6wwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwww$ X6wq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qw6X $wwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwww4 4wwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwww4 4wwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwww@ %wwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwww% @wwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwww4 6wwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwww6 4wwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwo &wwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwww& owwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwww3 X0wwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwww0X 3wwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwww% &wwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwww& %wwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwX o0wwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwww0o owwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwww5 1wwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwww1 5wwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwww& 6wwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwww6 &wwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwo Owwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwO owwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwww6 1wwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwww1 6wwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwww1 5wwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwww5 1wwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwO owwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwo Owwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwww &wwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwww& wwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww6 4wwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwww4 6wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww4 wwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwww 4wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww4 wwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,9,----------,qwwwwwwwwwwwwwwwwwwwwwwwwww 4wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww& Owwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------;----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwO &wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww& @wwwwwwwwwwwwwwwwwwwwwwwwwwwwq,-------------------,qwwwwwwwwwwwwwwwwwwwwwwwwwwww@ &wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww% $wwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,-----------------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwww$ %wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww@ &wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,---------------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwww& @wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww@ &wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,-------------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww& @wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww 3wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,-----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww3 wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww 3wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,-----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww3 wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww@ &wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,-------------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww& @wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww@ &wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,---------------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwww& @wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww% $wwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,-----------------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwww$ %wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww& @wwwwwwwwwwwwwwwwwwwwwwwwwwwwq,-------------------,qwwwwwwwwwwwwwwwwwwwwwwwwwwww@ &wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww& Owwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------;----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwO &wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww4 wwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,9,----------,qwwwwwwwwwwwwwwwwwwwwwwwwww 4wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww4 wwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwww 4wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwww6 4wwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwww4 6wwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwww &wwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwww& wwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwO owwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwo Owwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwww1 5wwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwww5 1wwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwww6 1wwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwww1 6wwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwo Owwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwO owwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwww& 6wwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwww6 &wwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwww5 1wwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwww1 5wwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwX o0wwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwww0o owwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwww% &wwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwww& %wwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwww3 X0wwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwww0X 3wwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwo &wwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwww& owwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwww4 6wwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwww6 4wwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwww@ %wwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwww% @wwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwww4 4wwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwww4 4wwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwww$ X6wq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qw6X $wwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwww6 O7,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,7O 6wwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwww% .=----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------=. %wwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwww0X .*----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------*. X0wwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwww2 .*----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------*. 2wwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwww% .*----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------*. %wwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwwww@ .*----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------*. @wwwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwwww0O*----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------*O0wwwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwwwwq>----------*#0wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww0+*---------->qwwwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwwwq,----------*. o5wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww5o .*----------,qwwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwwq,----------*. X1wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww1X .*----------,qwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwq,----------*. o2wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww2o .*----------,qwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwq,----------*. @4wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww4@ .*----------,qwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwq,----------*. @6wwwwwwwwwwwwwwwwwwwwwwwwwwwwwww6@ .*----------,qwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwq,----------,7O O16wwwwwwwwwwwwwwwwwwwwwwwww61O O7,----------,qwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwq,----------,qw0% O&5wwwwwwwwwwwwwwwwwww5&O %0wq,----------,qwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwq,----------,qwwww& o%&1440wwwww0441&%o &wwwwq,----------,qwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwq,----------,qwwwwww4O X@X O4wwwwwwq,----------,qwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwq,----------,qwwwwwwwww2o o2wwwwwwwwwq,----------,qwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwww&X X&wwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwww0&X X&0wwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwww6%X X%6wwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwww4&o o&4wwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwww5&O O&5wwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwww61&@@o o@@&16wwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwwww",
|
||||
"wwwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww444&444wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwwww",
|
||||
"wwwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwwww",
|
||||
"wwwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwwww",
|
||||
"wwwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwwww",
|
||||
"wwwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwwww",
|
||||
"wwwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwwww",
|
||||
"wwwwq,----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------,qwwww",
|
||||
"wwww<----------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----------<wwww",
|
||||
"wwww8:--------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,--------:8wwww",
|
||||
"wwwww8:------,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,------:8wwwww",
|
||||
"wwwwww8:----,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,----:8wwwwww",
|
||||
"wwwwwww8:--,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,--:8wwwwwww",
|
||||
"wwwwwwww8:,qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq,:8wwwwwwww",
|
||||
"wwwwwwwww9qwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwq9wwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww",
|
||||
"wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww"
|
||||
};
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
/* XPM */
|
||||
static char *removecircle_xpm[] = {
|
||||
/* width height num_colors chars_per_pixel */
|
||||
" 32 32 31 1",
|
||||
/* colors */
|
||||
". c #000000",
|
||||
"# c #110000",
|
||||
"a c #111111",
|
||||
"b c #222222",
|
||||
"c c #333333",
|
||||
"d c #403030",
|
||||
"e c #444444",
|
||||
"f c #504040",
|
||||
"g c #555555",
|
||||
"h c #666666",
|
||||
"i c #777777",
|
||||
"j c #cc0000",
|
||||
"k c #e01515",
|
||||
"l c #ff0000",
|
||||
"m c #ff0b0b",
|
||||
"n c #ff1111",
|
||||
"o c #f42929",
|
||||
"p c #ff3232",
|
||||
"q c #ff4444",
|
||||
"r c #888888",
|
||||
"s c #999999",
|
||||
"t c #aaaaaa",
|
||||
"u c #bbbbbb",
|
||||
"v c #cccccc",
|
||||
"w c #dddddd",
|
||||
"x c #efdfdf",
|
||||
"y c #ffcccc",
|
||||
"z c #ffdddd",
|
||||
"A c #eeeeee",
|
||||
"B c #ffeeee",
|
||||
"C c #ffffff",
|
||||
/* pixels */
|
||||
"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC",
|
||||
"CCyCCCCCCCCCCCCCCCCCCCCCCCCCCCyC",
|
||||
"CyllCCCCCCCCCCCCCCCCCCCCCCCCClly",
|
||||
"CClllCCCCCCCCCCCCCCCCCCCCCCClllC",
|
||||
"CCClllCCCCCCCCCCiCCCCCCCCCClllCC",
|
||||
"CCCClllCCCCw.........wCCCClllCCC",
|
||||
"CCCCClllCC......e......CClllCCCC",
|
||||
"CCCCCClll...wCCCCCCCw...lllCCCCC",
|
||||
"CCCCCCClll.CCCCCCCCCCC.lllCCCCCC",
|
||||
"CCCCCCC.lllCCCCCCCCCCClll.CCCCCC",
|
||||
"CCCCCC...lllCCCCCCCCClll...CCCCC",
|
||||
"CCCCCC..CClllCCCCCCClllCC..CCCCC",
|
||||
"CCCCCa.bCCClllCCCCClllCCCb.bCCCC",
|
||||
"CCCCC..CCCCClllCCClllCCCCC..CCCC",
|
||||
"CCCCC..CCCCCClllClllCCCCCC..CCCC",
|
||||
"CCCCC..CCCCCCClllllCCCCCCC..CCCC",
|
||||
"CCCCC..CCCCCCCClllCCCCCCCC..CCCC",
|
||||
"CCCCC..CCCCCCClllllCCCCCCC..CCCC",
|
||||
"CCCCC..CCCCCClllClllCCCCCC..CCCC",
|
||||
"CCCCC..CCCCClllCCClllCCCCC..CCCC",
|
||||
"CCCCCa.bCCClllCCCCClllCCCb.bCCCC",
|
||||
"CCCCCC..CClllCCCCCCClllCC..CCCCC",
|
||||
"CCCCCC...lllCCCCCCCCClll...CCCCC",
|
||||
"CCCCCCC.lllCCCCCCCCCCClll.CCCCCC",
|
||||
"CCCCCCClll.CCCCCCCCCCC.lllCCCCCC",
|
||||
"CCCCCClll...wCCCCCCCw...lllCCCCC",
|
||||
"CCCCClllCC......e......CClllCCCC",
|
||||
"CCCClllCCCCw.........wCCCClllCCC",
|
||||
"CCClllCCCCCCCCCCiCCCCCCCCCClllCC",
|
||||
"CClllCCCCCCCCCCCCCCCCCCCCCCClllC",
|
||||
"CyllCCCCCCCCCCCCCCCCCCCCCCCCClly",
|
||||
"CCyCCCCCCCCCCCCCCCCCCCCCCCCCCCyC"
|
||||
};
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
#ifndef _MK___TYPEDEFS_H
|
||||
#define _MK___TYPEDEFS_H
|
||||
|
||||
#if 0
|
||||
|
||||
//-------- choosing number type --- start ---------
|
||||
#include <CGAL/MP_Float.h>
|
||||
typedef CGAL::MP_Float exact_type;
|
||||
//#include <CGAL/leda_real.h>
|
||||
//typedef leda_real exact_type;
|
||||
|
||||
#include <CGAL/Filtered_exact.h>
|
||||
typedef double inexact_type;
|
||||
typedef CGAL::Filtered_exact< inexact_type, exact_type > number_type;
|
||||
|
||||
//-------- choosing number type --- end ---------
|
||||
|
||||
//#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
|
||||
typedef CGAL::Simple_cartesian< number_type > Rep;
|
||||
|
||||
|
||||
#else
|
||||
|
||||
#include <CGAL/Filtered_kernel.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/MP_Float.h>
|
||||
//#include <CGAL/leda_real.h>
|
||||
|
||||
|
||||
typedef CGAL::Simple_cartesian<double> CK;
|
||||
typedef CGAL::Simple_cartesian<CGAL::MP_Float> EK;
|
||||
//typedef CGAL::Simple_cartesian<leda_real> EK;
|
||||
|
||||
typedef CGAL::Filtered_kernel<CK,EK> Rep;
|
||||
// non-filtered kernel
|
||||
//typedef CK Rep;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include <CGAL/Apollonius_graph_2.h>
|
||||
#include <CGAL/Apollonius_graph_hierarchy_2.h>
|
||||
#include <CGAL/Apollonius_graph_euclidean_traits_2.h>
|
||||
|
||||
|
||||
typedef
|
||||
CGAL::Apollonius_graph_euclidean_traits_2<Rep,CGAL::Ring_tag> Gt;
|
||||
|
||||
typedef Gt::Bare_point Point;
|
||||
typedef Rep::Circle_2 Circle;
|
||||
typedef Gt::Weight Weight;
|
||||
typedef Gt::Weighted_point Weighted_point;
|
||||
|
||||
|
||||
//typedef CGAL::Apollonius_graph_2<Gt> AG_2;
|
||||
typedef CGAL::Apollonius_graph_hierarchy_2<Gt> AG_2;
|
||||
|
||||
|
||||
typedef AG_2::Vertex_handle Vertex_handle;
|
||||
|
||||
|
||||
|
||||
#endif // _MK___TYPEDEFS_H
|
||||
Loading…
Reference in New Issue