Page 117 Table of Contents Index Page 119
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

If k is supplied, it must be an integer between 0 and n + 1 (inclusive), in which case make-
contrasting-inks
returns the k'th design rather than returning a vector of designs.

If the implementation does not have n different contrasting inks, make-contrasting-inks signals
an error. This will not happen unless n is greater than eight.

The rendering of the design may be a color or a stippled pattern, depending on whether the
output medium supports color.

=> contrasting-inks-limit port [Generic Function]
Returns the number of contrasting colors (or stipple patterns if port is monochrome or grayscale)
that can be rendered on any medium on the port port. Implementations are encouraged to make
this as large as possible, but it must be at least 8. All classes that obey the medium protocol
must implement a method for this generic function.

13.4 Opacity

=> opacity [Protocol Class]
A member of the class opacity is a completely colorless design that is typically used as the
second argument to compose-in to adjust the opacity of another design. See Chapter 14 for the
details of compose-in. The opacity class is the protocol class for an opacity, and is a subclass
of design. If you want to create a new class that behaves like an opacity, it should be a subclass
of opacity. Subclasses of opacity must obey the opacity protocol.

All of the standard instantiable opacity classes provided by CLIM are immutable.

Opacity controls how graphical output covers previous output. Opacity can vary from totally
opaque to totally transparent. Intermediate opacity values result in color blending so that the
earlier picture shows through what is drawn on top of it.

An opacity may be specified by a real number between 0 and 1 (inclusive). 0 is completely
transparent, 1 is completely opaque, fractions are translucent. The opacity of a design is the
degree to which it hides the previous contents of the drawing plane when it is drawn.

The fully transparent and fully opaque opacity levels (that is, opacities 0 and 1) must always be
supported, but a valid CLIM implementation might only support a handful of opacity levels in
between (including none). A valid CLIM implementation might implement color blending and
unsaturated colors by stippling, although it is preferred, when possible, for a viewport to display
a uniform color as a uniform color rather than as a perceptible stipple.

=> opacityp object [Function]
Returns true if object is an opacity, otherwise returns false.

The following function returns an opacity:


Page 117 Table of Contents Index Page 119
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