-- File: BitMap3d.mesa
-- Last edited by Bier on December 18, 1982 1:26 am
-- Author: Eric Bier on June 14, 1982 4:21 pm
-- Contents: calls to GraphicsExtra.mesa to double buffer graphics

DIRECTORY
 Graphics,
 GraphicsOps,
 ViewerClasses;

BitMap3d: DEFINITIONS =
BEGIN

-- We draw into the unseen bitmap and then draw that map onto our screen when we want to see the picture.

BitmapRef: TYPE = REF READONLY BitmapRep;
BitmapRep: TYPE = GraphicsOps.BitmapRep;

AlternateDisplayContext: TYPE = REF AlternateDisplayContextObj;
AlternateDisplayContextObj: TYPE = RECORD [
 dc: Graphics.Context,
 bitMap: BitmapRef];
Viewer: TYPE = ViewerClasses.Viewer;

DrawAltDisplayContext: PROC [dc: Graphics.Context, altDC: AlternateDisplayContext];
GetAltDisplayContext: PROC RETURNS [altDC: AlternateDisplayContext];
ResizeBitMap: PROC [viewer: Viewer, altDC: AlternateDisplayContext]; -- must resize each time viewer changes size.
Erase: PROC [altDC: AlternateDisplayContext];

END.