The class CGAL_Window_stream is derived from the LEDA class window and inherits its rich functionality.
#include <CGAL/IO/Window_stream.h>
| |
creates a window W of width
height pixels.
|
|
| |
Defines the part of the object space that is mapped to the physical window. | ||
|
| |
Defines the part of the object space that is mapped to the physical window. |
The output operator is defined for all geometric classes in the CGAL kernel.
| ||
| ||
inserts object c in the stream W. | ||
| ||
| ||
changes the foreground color for the next objects that will be inserted in W. |
The input operator is defined for all geometric classes in the CGAL kernel. The coordinates of the geometric objects are in object space. Data are entered with the left mouse button.
| ||
| ||
extracts object c from the stream W. |
#include <CGAL/Cartesian.h> #include <CGAL/Segment_2.h> #include <CGAL/IO/Window_stream.h> typedef CGAL_Point_2< CGAL_Cartesian<double> > Point; typedef CGAL_Segment_2< CGAL_Cartesian<double> > Segment; int main() { Point p(0,1), q(2,2); Segment s(p,q); CGAL_Window_stream W(100,100); W.init(0,10,10); W << CGAL_RED << s << CGAL_BLACK << p << q ; W >> s >> p; return 1; }