Input and Output Operators
For the input and output of basic
two-dimensional geometric objects of the floating point kernel
point, segment, ray, line, circle, polygon) the operators
<< and >> can be used.
Remarks: Graphical input and output of for
can be extended to user-defined types by overloading << and >>.
window class also provides a large number of additional
drawing operations that give more flexibility.
The following program uses the operator >> to read points
defined by mouse clicks and draws each point using the operator
<< until input is terminated by clicking the right mouse button.
On the right there is a screenshot of the program. Clicking on
the picture shows the
window in original
while (W >> p) W << p;
Basic Data Types for 2D Geometry
Windows and Panels