⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hellosegment.c

📁 CGAL is a collaborative effort of several sites in Europe and Israel. The goal is to make the most i
💻 C
字号:
//demo/Qt_widget/Examples/hellosegment.C#ifndef CGAL_USE_QT#include <iostream>int main(int, char*){  std::cout << "Sorry, this demo needs QT..." << std::endl; return 0;}#else#include <CGAL/Cartesian.h>#include <CGAL/IO/Qt_widget.h>#include <qapplication.h>typedef CGAL::Cartesian<int> Rep;typedef CGAL::Point_2<Rep> Point_2;typedef CGAL::Segment_2<Rep> Segment;int main( int argc, char **argv ){  QApplication app( argc, argv );  CGAL::Qt_widget *w = new CGAL::Qt_widget();  app.setMainWidget( w );  w->resize(600, 600);  w->set_window(0, 600, 0, 600);  w->show();  w->lock();  *w << CGAL::BackgroundColor(CGAL::ORANGE) << CGAL::RED;  *w << Segment(Point_2(100,100), Point_2(400,400));  w->unlock();  return app.exec();}#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -