Page 14 Table of Contents Index Page 16
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

protocol.

Note that constructing an area object with no area (such as calling make-rectangle with two
coincident points), for example) canonicalizes it to +nowhere+.

=> areap object [Function]
Returns true if object is an area, otherwise returns false.

=> coordinate [Type]
The type that represents a coordinate. This must be a subtype of real, but CLIM implemen-
tations may use a more specific subtype (such as single-float) for reasons of efficiency.

All of the specific region classes and subclasses of bounding-rectangle will use this type to store
their coordinates. However, the constructor functions for the region classes and for bounding
rectangles must accept numbers of any type and coerce them to coordinate.

=> +everywhere+ [Constant]
=> +nowhere+ [Constant]
+everywhere+ is the region that includes all the points on the two-dimensional infinite drawing
plane. +nowhere+ is the empty region, the opposite of +everywhere+.

3.1.1 The Region Predicate Protocol

The following generic functions comprise the region predicate protocol. All classes that are
subclasses of region must either inherit or implement methods for these generic functions.

The methods for region-equal, region-contains-region-p, and region-intersects-region-
p
will typically specialize both the region1 and region2 arguments.

=> region-equal region1 region2 [Generic Function]
Returns true if the two regions region1 and region2 contain exactly the same set of points,
otherwise returns false.

=> region-contains-region-p region1 region2 [Generic Function]
Returns true if all points in the region region2 are members of the region region1, otherwise
returns false.

=> region-contains-position-p region x y [Generic Function]
Returns true if the point at (x;y) is contained in the region region, otherwise returns false.
Since regions in CLIM are closed, this must return true if the point at (x;y) is on the region's
boundary. CLIM implementations are permitted to return different non-nil values depending
on whether the point is completely inside the region or is on the border.


Page 14 Table of Contents Index Page 16
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