XEROX Lisp Library Packages 2 4 1 1 COLOR 1 4 4 4 INTRODUCTION This document describes the Interlisp-D facilities for using the color display. You are encouraged to make comments and suggestions. The machine-independent color graphics code is stored on the library files LLCOLOR.DCOM and COLOR.DCOM; COLOR loads LLCOLOR. In order to run it, you need a Dorado (Xerox 1132) with attached color display. The Dorado color driver resides in the file DORADOCOLOR.DCOM, which you should load after COLOR.DCOM. The Dorado color board supports four or eight bits per pixel (bpp) at 640 by 480 resolution. (Actually the board supports 24 bpp also, but Interlisp-D doesn't yet.) A color display's image can be thought of as a paint-by-number painting where the number of a pixel is its value. The number of bits per pixel determines the number of different colors that can be displayed at one time. When there are 4 bpp, 16 colors can be displayed at once. When there are 8 bpp, 256 colors can be displayed at once. A mapping table called a color map determines what color actually appears for each pixel value. A color map gives the color in terms of how much of the three primary colors (red, green, and blue) is displayed on the screen for each possible pixel value. In the following sections, the notions of "color map" and "color" are described. COLOR BIT MAPS A color bit map is actually a bit map that allows more than one bit per pixel. To test whether a bit map is a color bit map, the function BITSPERPIXEL can be used. (BITSPERPIXEL BitMap) [Function] returns the bits per pixel of BitMap; if this does not equal one, BitMap is a color bit map. In multiple-bit-per-pixel bit maps, the bits that represent a pixel are stored contiguously. BITMAPCREATE was extended to create multiple-bit-per-pixel bit maps. (LIST ((PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE BOO) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE BOO) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE BOO) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))È ÈÈ ŠŠ8ŠŠ8 4ŠŠ8ŠŠ8ÈÈÈ PAGEHEADINGBOO HELVETICA  HELVETICA  HELVETICA HELVETICA HELVETICA LOGO HELVETICA HELVETICA HRULE.GETFN HELVETICA HRULE.GETFN HELVETICA HRULE.GETFN HRULE.GETFN HELVETICA HRULE.GETFN HELVETICA HRULE.GETFN HRULE.GETFN HRULE.GETFN HELVETICA†àn /¥  £0>z¹