Page 62 Table of Contents Index Page 64
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 8. SHEET PROTOCOLS


8.3.1 Output Properties

Each sheet retains some output state that logically describes how output is to be rendered
on its window. Such information as the foreground and background ink, line thickness, and
transformation to be used during drawing are provided by this state. This state may be stored
in a medium associated with the sheet itself, be derived from a parent, or may have some global
default, depending on the sheet itself.

If a sheet is mute for output, it is an error to set any of these values.

=> medium [Protocol Class]
The protocol class that corresponds to the output state for some kind of sheet. There is no single
advertised standard medium class. If you want to create a new class that behaves like a medium,
it should be a subclass of medium. Subclasses of medium must obey the medium protocol.

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

The following generic functions comprise the basic medium protocol. All mediums must imple-
ment methods for these generic functions. Often, a sheet class that supports the output protocol
will implement a "trampoline" method that passes the operation on to sheet-medium of the
sheet.

=> medium-foreground medium [Generic Function]
=> (setf medium-foreground) design medium [Generic Function]
Returns (and, with setf, sets) the current foreground ink for the medium medium. This is
described in detail in Chapter 10.

=> medium-background medium [Generic Function]
=> (setf medium-background) design medium [Generic Function]
Returns (and, with setf, sets) the current background ink for the medium medium. This is
described in detail in Chapter 10.

=> medium-ink medium [Generic Function]
=> (setf medium-ink) design medium [Generic Function]
Returns (and, with setf, sets) the current drawing ink for the medium medium. This is described
in detail in Chapter 10.

=> medium-transformation medium [Generic Function]
=> (setf medium-transformation) transformation medium [Generic Function]
Returns (and, with setf, sets) the "user" transformation that converts the coordinates presented
to the drawing functions by the programmer to the medium medium's coordinate system. By
default, it is the identity transformation. This is described in detail in Chapter 10.


Page 62 Table of Contents Index Page 64
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