ViewerBLTImpl.mesa;
Last Edited by McGregor, August 2, 1982 4:09 pm
Last Edited by: Maxwell, January 3, 1983 12:30 pm
DIRECTORY
Graphics USING [Context, SetCP],
GraphicsOps USING [DrawBitmap, ScreenBitmap],
ViewerBLT,
ViewerClasses USING [Viewer],
ViewerOps USING [AcquireContext, ReleaseContext, UserToScreenCoords],
ViewerSpecs USING [screenH];
ViewerBLTImpl:
CEDAR PROGRAM
IMPORTS Graphics, GraphicsOps, ViewerOps
EXPORTS ViewerBLT
SHARES ViewerOps =
BEGIN OPEN ViewerBLT, ViewerClasses;
Glitch:
PUBLIC
PROC [viewer: Viewer, nLines:
INTEGER] =
BEGIN
dY, sY, vY, vX: INTEGER;
w: INTEGER ← viewer.cw;
h: INTEGER ← viewer.ch-ABS[nLines];
dc: Graphics.Context ← ViewerOps.AcquireContext[NIL];
[vX, vY] ← ViewerOps.UserToScreenCoords[viewer, 0,
IF viewer.class.coordSys=top THEN 0 ELSE viewer.ch];
dY ← IF nLines>0 THEN vY ELSE vY-nLines;
sY ← IF nLines>0 THEN vY-nLines ELSE vY;
Graphics.SetCP[dc, vX, dY];
GraphicsOps.DrawBitmap[
self: dc,
bitmap: GraphicsOps.ScreenBitmap[],
w: w,
h: h,
x: vX,
y: ViewerSpecs.screenH-sY,
xorigin: vX,
yorigin: ViewerSpecs.screenH-sY
];
ViewerOps.ReleaseContext[dc];
END;
VBLT:
PUBLIC
PROC [src: VPlace, dest: VPlace, srcw, srch:
INTEGER] =
BEGIN
ERROR; -- not yet implemented
END;
END.