-- ColorWorld.mesa
-- Public interfaces to the wonderful world of color
-- Maureen Stone, August 31, 1982 4:18 pm
-- Doug Wyatt, August 31, 1982 2:18 pm
DIRECTORY
Graphics USING [Context];
ColorWorld: CEDAR DEFINITIONS = {
HasMode: PROCEDURE[bpp: INT] RETURNS[BOOLEAN];
--valid values for bpp (bits per pixel) are:
--Dolphins: 1, 2 or 4
--Dorados: 1, 4, 8 and 24
TurnOnColor: PROC[bpp: INT, onLeft: BOOLEAN ← TRUE] RETURNS[BOOLEAN];
--TurnOnColor returns TRUE if successful
--Turn on color is expensive. It will take about 10 seconds worse case
--If you call it more than once it will automatically do a TurnOffColor
TurnOffColor: PROC;
--TurnOffColor jumps the cursor back to the bi-level display and deallocates the
--color framebuffer. All color contexts will be invalid after doing a TurnOffColor
NewContext: PROC RETURNS[Graphics.Context];
--NOTE: All color contexts will be invalid after doing a TurnOffColor
-- the default colormap is a gray wedge with 0=black and 255=white
-- this corresponds to the conventions for AIS files
-- Those who want to mess with the colormap use SetColor
}.