irectangle


This class defines an upright rectangle.

struct irectangle
{
  ipoint a;
  ipoint b;

  irectangle(int xA=0,
             int yA=0,
             int xB=0,
             int yB=0);

  irectangle(const ipoint& A,
             const ipoint& B);

  irectangle(const irectangle& copy);

  irectangle& operator=(const irectangle& assign);

  ipoint& operator[](int);

  const ipoint& operator()(int) const;

  int& operator()(int, int);

  int width() const;
  int height() const;

  bool is_point_inside(const ipoint& test,
                     bool include_boundary=true);
};