Page 22 Table of Contents Index Page 24
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

arguments, the x and y coordinates of the start of the segment, and the x and y coordinates of
the end of the segment; it has dynamic extent. When map-over-polygon-segments is called on
a closed polyline, it will call function on the segment that connects the last point back to the
first point.

=> polyline-closed polyline [Generic Function]
Returns true if the polyline polyline is closed, otherwise returns false. This function need be
implemented only for polylines, not for polygons.

3.2.3 Lines

A line is a polyline consisting of a single segment.

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

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

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

=> make-line* start-x start-y end-x end-y [Function]
Returns an object of class standard-line that connects the two points start-point and end-point
(or the positions (start-x,start-y) and (end-x,end-y)).

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

The Line Protocol

The following generic functions comprise the line API. Only line-start-point* and line-end-
point*
are in the line protocol, that is, all classes that are subclasses of line must implement
methods for line-start-point* and line-end-point*, but need not implement methods for
line-start-point and line-end-point.

=> line-start-point* line [Generic Function]
=> line-end-point* line [Generic Function]


Page 22 Table of Contents Index Page 24
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