Page 21 Table of Contents Index Page 23
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

objects are unspecified.

=> polygon [Protocol Class]
The protocol class that corresponds to a mathematical polygon. This is a subclass of area. If
you want to create a new class that behaves like a polygon, it should be a subclass of polygon.
Subclasses of polygon must obey the polygon protocol.

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

=> standard-polygon [Class]
An instantiable class that implements a polygon. This is a subclass of polygon. This is the class
that make-polygon and make-polygon* instantiate. Members of this class are immutable.

=> make-polygon point-seq [Function]
=> make-polygon* coord-seq [Function]
Returns an object of class standard-polygon consisting of the area contained in the boundary
that is specified by the segments connecting each of the points in point-seq (or the points rep-
resented by the coordinate pairs in coord-seq). point-seq is a sequence of points; coord-seq is a
sequence of coordinate pairs, which are real numbers. It is an error if coord-seq does not contain
an even number of elements.

This function is permitted to capture its mutable inputs; the consequences of modifying those
objects are unspecified.

The Polygon and Polyline Protocol

The following generic functions comprise the polygon and polyline protocol. All classes that are
subclasses of either polygon or polyline must implement methods for these generic functions.
Some of the functions below take an argument named polygon-or-polyline; this argument may
be either a polygon or a polyline.

=> polygon-points polygon-or-polyline [Generic Function]
Returns a sequence of points that specify the segments in polygon-or-polyline. This function
returns objects that reveal CLIM's internal state; do not modify those objects.

=> map-over-polygon-coordinates function polygon-or-polyline [Generic Function]
Applies function to all of the coordinates of the vertices of polygon-or-polyline. function is a
function of two arguments, the x and y coordinates of the vertex; it has dynamic extent.

=> map-over-polygon-segments function polygon-or-polyline [Generic Function]
Applies function to the segments that compose polygon-or-polyline. function is a function of four


Page 21 Table of Contents Index Page 23
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