Page 13 Table of Contents Index Page 15
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E



CHAPTER 3. REGIONS

A bounded region is a region that contains at least one point and for which there exists a
number, d, called the region's diameter, such that if p1 and p2 are points in the region, the
distance between p1 and p2 is always less than or equal to d.

An unbounded region either contains no points or contains points arbitrarily far apart.

Another way to describe a region is that it maps every (x;y) pair into either true or false (meaning
member or not a member, respectively, of the region). Later, in Chapter 14, we will generalize
a region to something called a design that maps every point (x;y) into color and opacity values.

=> region [Protocol Class]
The protocol class that corresponds to a set of points. This includes both bounded and un-
bounded regions. This is a subclass of design (see Chapter 13).

If you want to create a new class that behaves like a region, it should be a subclass of region.
Subclasses of region must obey the region protocol.

There is no general constructor called make-region because of the impossibility of a uniform
way to specify the arguments to such a function.

=> regionp object [Function]
Returns true if object is a region, otherwise returns false.

=> path [Protocol Class]
The protocol class path denotes bounded regions that have dimensionality 1 (that is, have
length). It is a subclass of region and bounding-rectangle. If you want to create a new class
that behaves like a path, it should be a subclass of path. Subclasses of path must obey the path
protocol.

Constructing a path object with no length (via make-line*, for example) canonicalizes it to
+nowhere+.

Some rendering models support the constructing of areas by filling a closed path. In this case, the
path needs a direction associated with it. Since CLIM does not currently support the path-filling
model, paths are directionless.

=> pathp object [Function]
Returns true if object is a path, otherwise returns false.

Note that constructing a path object with no length (such as calling make-line with two coin-
cident points), for example) canonicalizes it to +nowhere+.

=> area [Protocol Class]
The protocol class area denotes bounded regions that have dimensionality 2 (that is, have area).
It is a subclass of region and bounding-rectangle. If you want to create a new class that
behaves like an area, it should be a subclass of area. Subclasses of area must obey the area


Page 13 Table of Contents Index Page 15
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E