3 addpt, subpt, mulpt, divpt, rectaddpt, rectsubpt, insetrect, canonrect, eqpt, eqrect, ptinrect, rectinrect, rectXrect, rectclip, combinerect, badrect, Dx, Dy, Pt, Rect, Rpt \- arithmetic on points and rectangles
12 Point addpt(Point p, Point q)
15 Point subpt(Point p, Point q)
18 Point mulpt(Point p, int a)
21 Point divpt(Point p, int a)
24 Rectangle rectaddpt(Rectangle r, Point p)
27 Rectangle rectsubpt(Rectangle r, Point p)
30 Rectangle insetrect(Rectangle r, int n)
33 Rectangle canonrect(Rectangle r)
36 int eqpt(Point p, Point q)
39 int eqrect(Rectangle r, Rectangle s)
42 int ptinrect(Point p, Rectangle r)
45 int rectinrect(Rectangle r, Rectangle s)
48 int rectXrect(Rectangle r, Rectangle s)
51 int rectclip(Rectangle *rp, Rectangle b)
54 void combinerect(Rectangle *rp, Rectangle b)
57 int badrect(Rectangle r)
66 Point Pt(int x, int y)
69 Rectangle Rect(int x0, int y0, int x1, int y1)
72 Rectangle Rpt(Point p, Point q)
79 construct geometrical data types from their components.
88 difference of its arguments:
101 returns the Rectangle
102 .BI Rect(add( r .min,
107 returns the Rectangle
114 returns the Rectangle
115 .BI Rect( r .min.x+ n \f1,
118 .IB r .max.y- n ) \f1.
121 returns a rectangle with the same extent as
123 canonicalized so that
133 compares its argument Points and returns
137 does the same for its argument Rectangles.
147 returns 1 if all the pixels in
158 share any point, and 0 otherwise.
162 the Rectangle pointed to by
164 so that it is completely contained within
166 The return value is 1 if any part of
170 Otherwise, the return value is 0 and
177 with the smallest rectangle sufficient to cover all the pixels of
185 is zero, negative size or insanely huge rectangle.
186 It returns 0 otherwise.
192 give the width (Δx) and height (Δy) of a Rectangle.
193 They are implemented as macros.