Navigation: Up, Table of Contents, Index,

Ellipses (Ellipse)

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 <ifmwindow>

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

Next: Class declaration of FilledEllipse
Navigation: Up, Table of Contents, Index,
Michael Hoffmann. Mon, October 7, 2002.