Department of Computer Science | Institute of Theoretical Computer Science | CADMO
Prof. Emo Welzl and Prof. Bernd Gärtner
|
| |
|
Creates a line
from (x1, y1) to (x2, y2).
| |
|
|
| Returns x-coordinate of the first endpoint. |
|
|
| Returns y-coordinate of the first endpoint. |
|
|
| Returns x-coordinate of the second endpoint. |
|
|
| Returns y-coordinate of the second endpoint. |
#include <IFM/window>
int main()
{
ifm::wio << ifm::Line(100, 100, 200, 200) << ifm::flush;
ifm::wio.wait_for_mouse_click();
return 0;
}
ifm::wio << ifm::Line(100, 100, 200, 100)
<< ifm::Line(201, 100, 300, 100)
<< ifm::flush;
there does not appear a continuous line segment (100,
100) (300, 100), it will have a one-pixel gap in
the middle.