CRBitMap.mesa
Last edited by Barth, January 30, 1985 12:23:42 pm PST
DIRECTORY
BitmapViewer,
ImagerPixelMaps,
ImagerPixelMapsExtras;
CRBitMap: CEDAR PROGRAM
IMPORTS BitmapViewer, ImagerPixelMaps, ImagerPixelMapsExtras =
BEGIN
Row: TYPE = [0..256);
Column: TYPE = [0..8);
Address: TYPE = [0..2048);
DataBit: TYPE = [0..33);
rectangle: BitmapViewer.DeviceRectangle = [0, 0, LAST[Row], ((LAST[Column]+1)*(LAST[DataBit]+1)-1)];
viewer: BitmapViewer.Viewer ← BitmapViewer.Create[info: [name: "CrossRAM Data Bit Map"]];
bitmap: ImagerPixelMaps.PixelMap ← ImagerPixelMaps.Create[0, rectangle];
Refresh: PROC = {BitmapViewer.TouchUp[viewer, rectangle]};
PutBit: PROC[address: Address, bit: DataBit, data: BOOL] = {
the low order bits address left to right
the high order bits address from top to bottom
the data bits are in order from left to right
ImagerPixelMapsExtras.SetBit[bitmap, address/8, bit*8 + (address MOD 8), LOOPHOLE[data, CARDINAL]];
};
BitmapViewer.SetBitmap[viewer, bitmap];
FOR a: Address IN Address DO
FOR db: DataBit IN DataBit DO
PutBit[a, db, db<=a];
ENDLOOP;
ENDLOOP;
Refresh[];
END.