Department of Computer Science | Institute of Theoretical Computer Science | CADMO

Theory of Combinatorial Algorithms

Prof. Emo Welzl and Prof. Bernd Gärtner

Reference Manual: ifm::Ellipse Navigation: Up, Table of Contents, Index,

Ellipses (ifm::Ellipse)

ifm::Ellipse e ( int x, int y, int w, int h);
Creates an ellipse with center (x, y), width 2 · w and height 2 · h.

int e.x () Returns center's x-coordinate.
int e.y () Returns center's y-coordinate.
int e.w () Returns half the width of e.
int e.h () Returns half the height of e.

Example

The following code draws an ellipse with center (100, 100), width 80 and height 50. Then it waits for a mouseclick to finish.

#include <IFM/window>

int main()
{
    ifm::wio << ifm::Ellipse(100, 100, 80, 50) << ifm::flush;
    ifm::wio.wait_for_mouse_click();
    return 0;
}

Next: Class declaration of ifm::FilledEllipse
Navigation: Up, Table of Contents, Index,
Michael Hoffmann. Wed, November 17, 2004.