Page 32 Table of Contents Index Page 34
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 4. BOUNDING RECTANGLES

It is unspecified whether bounding-rectangle will or will not create a new object each time it
is called. Many CLIM implementations will cache the bounding rectangle for sheets and output
records. The implication of this is that, since bounding rectangles are volatile, programmers
should depend on the object returned by bounding-rectangle remaining constant.

bounding-rectangle is part of the bounding rectangle API, but not part of the bounding
rectangle protocol. CLIM will supply a default method for bounding-rectangle on the protocol
class bounding-rectangle that is implemented by calling bounding-rectangle*.

4.1.2 Bounding Rectangle Convenience Functions

The functions described below are part of the bounding rectangle API, but are not part of the
bounding rectangle protocol. They are provided as a convenience to programmers who wish to
specialize classes that participate in the bounding rectangle protocol, but do not complicate the
task of those programmers who define their own types (such as sheet classes) that participate in
this protocol.

CLIM will supply default methods for all of these generic functions on the protocol class
bounding-rectangle that are implemented by calling bounding-rectangle*.

=> with-bounding-rectangle* (min-x min-y max-x max-y) region &body body [Macro]
Binds min-x, min-y, max-x, and max-y to the edges of the bounding rectangle of region, and
then executes body in that context. The argument region must be either a bounded region (such
as a line or an ellipse) or some other object that obeys the bounding rectangle protocol, such as
a sheet or an output record.

The arguments min-x, min-y, max-x, and max-y are not evaluated. body may have zero or more
declarations as its first forms.

with-bounding-rectangle* must be implemented by calling bounding-rectangle*.

=> bounding-rectangle-position region [Generic Function]
Returns the position of the bounding rectangle of region. The position of a bounding rectangle
is specified by its min point.

=> bounding-rectangle-min-x region [Generic Function]
=> bounding-rectangle-min-y region [Generic Function]
=> bounding-rectangle-max-x region [Generic Function]
=> bounding-rectangle-max-y region [Generic Function]
Returns (respectively) the x and y coordinates of the min point and the x and y coordinate
of the max point of the bounding rectangle of region. The argument region must be either a
bounded region or some other object that obeys the bounding rectangle protocol.

=> bounding-rectangle-width region [Generic Function]
=> bounding-rectangle-height region [Generic Function]


Page 32 Table of Contents Index Page 34
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