Page 113 Table of Contents Index Page 115
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 13. DRAWING IN COLOR

The drawing functions work by selecting a region of the drawing plane and painting it with color.
The region to be painted is the intersection of the shape specified by the drawing function and the
:clipping-region drawing option, which is then transformed by the :transformation drawing
option. The :ink drawing option is a design that specifies a new arrangement of colors (and
opacities) in this region of the medium's drawing plane. Any viewports or dataports attached
to this drawing plane are updated accordingly. The :ink drawing option is never affected by
the :transformation drawing option nor by the sheet transformation; this ensures that stipple
patterns on adjacent sheets join seamlessly.

Minor issue: The description of how the clipping region and transformations contribute isn't
good enough. It is true if there are no other transformations and clipping regions present, and
both are specified in the current drawing operation. But it doesn't say what happens if things
are nested. I'm not sure it needs to. Rather, I think it should just say that the the region is
clipped by the current clipping region in effect, then transformed by the current transform in
effect, and that the rules for these are discussed in the drawing options section. | DCPL

Drawing consists conceptually of the following sequence of operations, performed in parallel at
every point in the drawing plane. Of course, the actual implementation does not involve an
infinite (or large parallel) computation.

  1. The design specifies a color and an opacity at the point. These can depend on the drawing
    plane's current color and opacity, on the medium's foreground color, and on the medium's
    background color.

  2. The color blending function is applied to the design's color and opacity and the drawing
    plane's color and opacity, returning a new color and opacity for the point.

  3. The drawing plane's color and opacity at that point are set to the new color and opacity.

13.2 Basic Designs

=> design [Protocol Class]
A design is an object that represents a way of arranging colors and opacities in the drawing
plane. The design class is the protocol class for designs. If you want to create a new class that
behaves like a design, it should be a subclass of design. Subclasses of design must obey the
design protocol.

The fundamental operation of the CLIM graphic drawing model is to draw a design onto a
drawing plane, thus drawing is always controlled by designs. The designs discussed in this
chapter do the same thing at each point in the drawing plane. Chapter 14 discusses more
general designs and reveals that regions are also designs.

A design can be characterized in several different ways:

All designs are either bounded or unbounded. Bounded designs are transparent everywhere
beyond a certain distance from a certain point. Drawing a bounded design has no effect on


Page 113 Table of Contents Index Page 115
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