DIRECTORY G3dRender, Imager, ImagerPixel, Rope, Terminal; G3dColorDisplaySupport: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; Context: TYPE ~ G3dRender.Context; ContextProc: TYPE ~ G3dRender.ContextProc; Pair: TYPE ~ G3dRender.Pair; Pixel: TYPE ~ G3dRender.Pixel; RGB: TYPE ~ G3dRender.RGB; RopeProc: TYPE ~ G3dRender.RopeProc; Triple: TYPE ~ G3dRender.Triple; Virtual: TYPE ~ Terminal.Virtual; PixelMap: TYPE ~ ImagerPixel.PixelMap; MappedRGB: PROC [context: Context, clr: Pixel] RETURNS [Pixel]; LoadStd8BitClrMap: PROC [vt: Terminal.Virtual]; LoadColorRamp: PROC [ vt: Virtual, clr1: RGB _ [0,0,0], clr2: RGB _ [255,255,255], exponent: RGB _ [.43,.43,.43]]; Draw2DRope: RopeProc; GetPixelsFromViewer: PROC[ context: Context, dstMap: PixelMap ]; GetAIS: PROC[ context: Context, fileRoot: ROPE, xOffset, yOffset: INTEGER _ 0, center: BOOLEAN _ TRUE, labeled: BOOLEAN _ FALSE ] RETURNS[ xSize, ySize: INTEGER]; PutAIS: PROC[ context: Context, fileRoot: ROPE, doEverything: BOOLEAN _ FALSE ]; GetRGB: PROC[ context: Context, fileRoot: ROPE, xOffset, yOffset: INTEGER _ 0, center: BOOLEAN _ TRUE, labeled: BOOLEAN _ FALSE ] RETURNS[ xSize, ySize: INTEGER]; PutRGB: PROC[ context: Context, fileRoot: ROPE ]; GetInterpress: PROC[ context: Context, fileRoot: ROPE, xOffset, yOffset: INTEGER _ 0, center: BOOLEAN _ TRUE ] RETURNS[ xSize, ySize: INTEGER]; PutInterpress: PROC[ context: Context, fileRoot: ROPE ]; MakeFrame: ContextProc; StuffBuf: G3dRender.ImagerProc; MakeHiResFrame: PROC [context: Context, width, height: NAT, name: Rope.ROPE]; DitherImage: PROC [dstContext, rgbContext: Context]; END. ΆG3dColorDisplaySupport.mesa Last Edited by: Crow, August 8, 1989 1:05:36 pm PDT Types Colors Calculates pseudocolor value from RGB and leaves in red field Sets up custom 6x6x6 color cube map for dithering Load ramp running between two colors and bent by exponent, defaults give std grey map Low-level drawing Put a string of characters on the screen. Image File Storage and Retrieval Transfers pixels from viewer into supplied Pixel Map Reads AIS file(s) to match context.display. Searches for appropriate file names, eg. file-red.ais, file-grn.ais, file-alpha.ais, file-depth.ais, etc. See AISAnimationImpl.standardNames. If labeled, puts file name at bottom of screen. Writes current image in context.display out to ais file(s). IF doEverything THEN alpha and depth channels will be written out if they exist . Reads a file in Abekas RGB format, 486 x 720 x RGB bytes Writes a file in Abekas RGB format, 486 x 720 x RGB bytes Read image directly from interpress file(s). Unimplemented. Write directly to interpress file alpha and depth channels ignored. Unimpelmented Frame Generation and Animation Compute image described by context Transfer buffered image to viewer or imager context Load context.viewPort from viewer specification Compute image described by context at supplied size, write out to named AIS file, keeps log, Image is full color and antialiased. Take rgb image in rgbContext and dither into dstContext Κ˜™Jšœ3™3J™IdefaultšΟk œ0˜9—head2šΠlnΟlΠklŸ  ˜)Jšœ˜—headšŸ™Jšœœœ˜Kšœ œ˜#Kšœ œ˜*Kšœœ˜Kšœ œ˜ Jšœœ œ˜Jšœ œ˜%Kšœ œ˜!Kšœ œ˜"Kšœ œ˜'—šŸ™ašΠbnΟnœœ œ ˜?Nšœ"œ™>—š’œœ˜/N™3—š’ œœ˜Nšœ ˜ Nšœœ ˜Nšœœ˜Nšœ œ˜N™V——šŸ™š’ œ ˜J™)——šŸ ™ š’œœ'˜@N™4N˜—š’œœœœœœ œœœœ˜­Jšœœ΄™½Jšœ9™9—š ’œœœœœ˜VNšœ=œœ?™—š’œœœœœœ œœœœ˜­Jšœœœ™9—š’œœœ˜1Jšœœœ™:—Kš’ œœœ˜7š œœœœ œœ˜iJ™=—š’ œœœ˜8JšœT™T——šŸ™š’ œ˜J™#—š’œ˜N™3J™/—š’œœ#œ œ˜MJšœHœ6™—š’ œœ#˜4Jšœ8™8—Ihead3™—Jšœ˜—…—‚F