-*- Mode:Text -*- COLOR ENHANCEMENTS ------------------ NOTE: These enhancements are for use only on an Explorer II. BLINKING COLORS --------------- This file contains code to enable use of tv:blinking-colors-mixin, which gives a window a second color map. When the window is exposed, the system alternates the window's color maps at a specified rate. WARNING: Do not expose the color map editor at the same time a window with blinking colors is exposed. COLOR OVERLAY MACROS -------------------- COLOR OVERLAY BANDING is a technique used to divide a color display frame buffer into layers, such that images in one layer may be drawn and erased without disturbing overlapping images in other layers. Each layer is called a BAND. Each band has a plane-mask and a set of colors which may be used when drawing in that band. There is also a color which may be used in any band. This color is called the CLEAR COLOR, because when an area in one layer is painted with the clear color, then images in underlying layers show through. Using color overlay banding requires special setup of a window's color map and bit-twiddling of its plane mask. The number of colors available is reduced from the usual 256, because multiple locations in the color map are set with the same red, green, and blue intensity values. The macros and functions in COLOR-OVERLAY-MACROS handle all of this special setup and bit-twiddling for you. They also support blinking colors. Use MAKE-BANDING-SCHEME to define which bands (layers) you want and what colors you want in them. This macro creates color variables which may be used wherever a color parameter is required, and band variables which may be used wherever a plane-mask is required. It also creates a variable which contains the defined banding scheme. If you want to handle switching between bands yourself, then use INSTALL-BANDED-COLORS on a window to install the color map defined in MAKE-BANDING-SCHEME. Otherwise, use the USING-BANDING-SCHEME macro. Within the dynamic scope of this macro, REASSIGN-COLOR-WITHIN-BAND, ADD-A-COLOR-TO-A-BAND, REMOVE-A-COLOR-FROM-ITS-BAND, CHANGE-CLEAR-COLOR, and USING-BANDS may be used. USING-BANDS may also be called outside of USING-BANDING-SCHEME if you tell it which window(s) to affect. When a band is in effect, any drawing or erasing that is done only affects images in that band. Also, only colors which belong to the band (and the clear color) should be used when the band is in effect. Other subroutines which may be generally useful are DUAL-MONITOR-COLOR-SHEET-P, WRITE-SHEET-COLOR-MAP, SET-SHEET-PLANE-MASK, WITH-BACKGROUND-COLOR, and PAINT-WINDOW. EXAMPLES -------- This file contains examples of how to define and use windows with blinking colors, and how to define, use, and modify a banding scheme. LOADING INSTRUCTIONS -------------------- For blinking colors, load the blinking colors file before loading any of your files which reference the tv:blinking-colors-mixin. This file redefines tv:install-color-map. When the file is loaded, a message will appear to tell you this. Tell it to proceed. For color overlay macros, load the color overlay macros file before loading any of your files which reference these macros. Also be sure that any of your calls to MAKE-BANDING-SCHEME are loaded before compiling any of the other macros which reference the defined banding scheme. Both the blinking colors and color overlay macros files must be loaded before the examples file may be loaded.