ImagerInteractiveImpl.mesa
Last Edited by: Crow, June 18, 1983 10:58 am
DIRECTORY
ImagerBasic USING [Path, IntRectangle, IntVec, PixelArray],
Imager   USING [Context];
ImagerInteractiveImpl: CEDAR PROGRAM
IMPORTS
EXPORTS Imager
= BEGIN OPEN ImagerBasic;
Client-called Procedures
These operations may not work on all devices, will no-op on noninteractive devices.
General Track
HiliteArea: PUBLIC PROC [context: Context, area: Path] = {};  -- Invert on LF, device dependent
Fast Track
HiliteIntRectangle: PUBLIC PROC [context: Context, area: IntRectangle] = {};
MoveIntRectangle: PUBLIC PROC [context: Context, source: IntRectangle, destination: IntVec] = {};
Client's way to use BitBlt
GetPixelArray: PUBLIC PROC [context: Context, source: IntRectangle, image: PixelArray ← NIL] RETURNS [PixelArray] = {
RETURN [ context.deviceProcs.getPxls[source] ];
};
PutPixelArray: PUBLIC PROC [context: Context, destination: IntRectangle, image: PixelArray] = {};
These use uninterpreted Pixel Arrays, clip to rectangle. Handy for rubber-stamping, etc.)
StartDoubleBuffering: PUBLIC PROC [context: Context] = {
Maintain shadow pixel array on the side for building images, use with "NewFrame".
pxls: PixelArray;
pxls ← context.deviceProcs.openPixelBuffer[];
};
StopDoubleBuffering: PUBLIC PROC [context: Context] = {
context.deviceProcs.closePixelBuffer[];
};
END.