ImagerBetween.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Michael Plass, February 7, 1986 4:27:28 pm PST
Provides a way of interpolating between several similar page images. The input consists of four key frames, numbered 0 through 3; key frames 0 and 3 provide context to allow an attempt at smooth motion.
DIRECTORY Imager;
ImagerBetween: CEDAR DEFINITIONS
~ BEGIN
Ref: TYPE ~ Imager.Context;
Create: PROC RETURNS [Ref];
GetContextSize: PROC [self: Ref] RETURNS [INT];
SetPass: PROC [self: Ref, pass: [0..4)];
Says which key frame is about to be played.
Inconsistent: ERROR;
Raised if the key frames are structually different.
Roll: PROC [self: Ref];
keyFrame ← [keyFrame[1], keyFrame[2], keyFrame[3], keyFrame[0]]
TimeSpec: TYPE ~ RECORD [d0, d1, d2, n1: NAT];
di is the total number of ticks between key frames i and image i+1.
n1 is the number of ticks from key frames 1.
Replay: PROC [self: Ref, into: Imager.Context, t: TimeSpec];
END.