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::FilledRectangle Navigation: Up, Table of Contents, Index,

Filled Rectangles (ifm::FilledRectangle)

ifm::FilledRectangle r ( int x1, int y1, int x2, int y2);
Creates a filled rectangle with diagonal (x1, y1) (x2, y2).

int r.x1 () Returns x-coordinate of the diagonal's first endpoint.
int r.y1 () Returns y-coordinate of the diagonal's first endpoint.
int r.x2 () Returns x-coordinate of the diagonal's second endpoint.
int r.y2 () Returns y-coordinate of the diagonal's second endpoint.

Example

The following code draws a filled rectangle with lower left corner (100, 100) and upper right corner (200, 200) and waits for a mouseclick to finish.

#include <IFM/window>

int main()
{
    ifm::wio << ifm::FilledRectangle(100, 100, 200, 200) 
             << ifm::flush;
    ifm::wio.wait_for_mouse_click();
    return 0;
}

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