TrcViewers.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Eric Nickell, April 9, 1986 2:40:48 pm PST
DIRECTORY
Imager USING [Rectangle],
TIPUser USING [TIPScreenCoords],
Trc USING [TRC],
Vector2 USING [VEC],
ViewerClasses USING [Viewer, ViewerRec];
~
BEGIN
TRC: TYPE ~ Trc.TRC;
Rectangle: TYPE ~ Imager.Rectangle;
Viewer: TYPE ~ ViewerClasses.Viewer;
ViewerRec: TYPE ~ ViewerClasses.ViewerRec;
CreateTRCViewer:
PROC [trc:
TRC, rectangle: Rectangle, dx:
REAL, info: ViewerRec, paint:
BOOL ←
TRUE]
RETURNS [viewer: Viewer];
Calling NotifyListeners on the trc will cause the viewer to repaint.
rectangle is the Cartesian region of the trc which will be displayed.
dx is the sampling frequency in the x direction.
InfoFromTRCViewer: PROC [viewer: Viewer] RETURNS [trc: TRC, rectangle: Rectangle, dx: REAL, clientData: REF];
NewTrc:
PROC [viewer: Viewer, trc:
TRC, paint:
BOOL ←
TRUE];
Plunks a new TRC into the Viewer.
ResetTRCViewer: PROC [viewer: Viewer, rectangle: Rectangle, dx: REAL, clientData: REF];
VecFromTIPCoords:
PROC [viewer: Viewer, coords: TIPUser.TIPScreenCoords]
RETURNS [vec: Vector2.
VEC];
Convenience procedure which maps tip coords to [x,y] pairs.