NextPrevUpTopContentsIndex

5.4 Indirect Inks

Drawing with an indirect ink is the same as drawing another design named directly. For example, +foreground-ink+ is a design that draws the medium's foreground design and is the default value of the :ink drawing option.

Indirect ink is a useful abstraction that enables your code to ignore the issue of what specific ink to use. It is also useful for output recording. For example, you can draw with +foreground-ink+ , change to a different medium-foreground , and replay the output record; the replayed output will come out in the new color.

You can change the foreground or background design of a medium at any time. This changes the contents of the medium's drawing plane. The effect is as if everything on the drawing plane is erased, the background design is drawn onto the drawing plane, and then everything that was ever drawn (provided it was saved in the output history) is drawn over again, using the medium's new foreground and background.

If an infinite recursion is created using an indirect ink, an error is signaled when the recursion is created, when the design is used for drawing, or both. Two indirect inks have been defined:

+foreground-ink+

Summary: An indirect ink that uses the medium's foreground design.

+background-ink+

Summary: An indirect ink that uses the medium's background design.


Common Lisp Interface Manager 2.0 User's Guide - 27 Feb 2008

NextPrevUpTopContentsIndex