Page 81 Table of Contents Index Page 83
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 10. DRAWING OPTIONS

Chapter 11 for a complete description of text styles, including the text style suboptions.

The :text-style ts drawing option temporarily changes the value of (medium-text-style
medium) to (merge-text-styles ts (medium-text-style medium)).

If text style suboptions are supplied, they temporarily change the value of (medium-text-style
medium) to a text style constructed from the specified suboptions, merged with the :text-
style
drawing option if it is specified, and then merged with the previous value of (medium-
text-style
medium). That is, if both the :text-style option and text style suboptions are
supplied, the suboptions take precedence over the components of the :text-style option.

10.2.1 Transformation "Convenience" Forms

The following three functions are no different than using with-drawing-options with the
:transformation keyword argument supplied. However, they are sufficiently useful that they
are provided as a convenience to programmers.

In order to preserve referential transparency, these three forms apply the translation, rotation, or
scaling transformation first, then the rest of the transformation from (medium-transformation
medium). That is, the following two forms would return the same transformation (assuming
that the medium's transformation in the second example is the identity transformation):
 
 (compose-transformations
   (make-translation-transformation dx dy)
   (make-rotation-transformation angle))

 (with-translation (medium dx dy)
   (with-rotation (medium angle)
     (medium-transformation medium)))
=> with-translation (medium dx dy) &body body [Macro]
Establishes a translation on the medium designated by medium that translates by dx in the x
direction and dy in the y direction, and then executes body with that transformation in effect.

dx and dy are as for make-translation-transformation.

The medium argument is not evaluated, and must be a symbol that is bound to a sheet or
medium. If medium is t, *standard-output* is used. body may have zero or more declarations
as its first forms.

=> with-scaling (medium sx &optional sy origin) &body body [Macro]
Establishes a scaling transformation on the medium designated by medium that scales by sx in
the x direction and sy in the y direction, and then executes body with that transformation in
effect. If sy is not supplied, it defaults to sx. If origin is supplied, the scaling is about that point;
if it is not supplied, it defaults to (0;0).


Page 81 Table of Contents Index Page 83
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