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. All instantiable subclasses of opacity must obey the opacity protocol. [annotate]

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

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. [annotate]

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. [annotate]

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. [annotate]


opacityp  object [Protocol Predicate]

Returns true if object is an opacity, otherwise returns false. [annotate]

The following function returns an opacity: [annotate]


make-opacity  value [Function]

Returns a member of class opacity whose opacity is value, which is a real number in the range from 0 to 1 (inclusive), where 0 is fully transparent and 1 is fully opaque. [annotate]


+transparent-ink+   [Constant]

An fully transparent ink, that is, an opacity whose value is 0. This is typically used as the "background" ink in a call to make-pattern. [annotate]

The following function returns the sole component of an opacity. This is the only function in the opacity protocol. All subclasses of opacity must implement methods for this generic function. [annotate]


opacity-value  opacity [Generic Function]

Returns the opacity value of the opacity opacity, which is a real number in the range from 0 to 1 (inclusive). [annotate]