# Points and Rectangles

The Co-ordinate System:

- Specify points with `pt(x,y)`
- Specify rectangles with `rect(x,y,width,height)`
- The co-ordinate (0,0) is at the top left of the window or drawing area:

Using Points and Rectangles:

- Find the rectangle of a control with `r = get_control_area(c)`
- Find the rectangle of a window with `r = get_window_area(w)`
- Inset a rectangle with `r2 = inset_rect(r,1)`
- Center a rectangle on another with `r3 = center_rect(r1,r2)`
- Are two rectangles equal? `rects_equal(r1,r2)`
- Are two points equal? `points_equal(p1,p2)`
- Is a point inside a rect? `point_in_rect(p,r)`