include	"draw.m";
draw := load Draw Draw->PATH;
Rect: adt
{
  min:      Point;
  max:      Point;
  canon:    fn(r: self Rect):             Rect;
  dx:       fn(r: self Rect):             int;
  dy:       fn(r: self Rect):             int;
  eq:       fn(r: self Rect, s: Rect):    int;
  Xrect:    fn(r: self Rect, s: Rect):    int;
  inrect:   fn(r: self Rect, s: Rect):    int;
  clip:     fn(r: self Rect, s: Rect):    (Rect, int);
  combine:  fn(r: self Rect, s: Rect):    Rect;
  contains: fn(r: self Rect, p: Point):   int;
  addpt:    fn(r: self Rect, p: Point):   Rect;
  subpt:    fn(r: self Rect, p: Point):   Rect;
  inset:    fn(r: self Rect; n: int):     Rect;
};