Rules.mesa; Written by Bill Paxton
Edited by McGregor on July 21, 1983 10:57 am
Last Edited by: Maxwell, December 17, 1982 10:07 am
DIRECTORY
Imager USING [Color, black],
ViewerOps USING [DestroyViewer],
ViewerClasses USING [Viewer, ViewerRec];
Rules: CEDAR DEFINITIONS IMPORTS Imager, ViewerOps = BEGIN OPEN ViewerClasses;
Rule: TYPE = Viewer;
A rule is a rectangle (viewer) of uniform color, good for simple graphics when creating tools.
Create:
PROC [info: ViewerRec, color: Imager.Color ← Imager.black, paint:
BOOL ←
TRUE]
RETURNS [rule: Rule] ;
Destroy: PROC [rule: Rule] = INLINE {ViewerOps.DestroyViewer[rule]};
Set:
PROC [rule: Rule, data:
REF Imager.Color, paint:
BOOL ←
TRUE] =
INLINE
{rule.class.set[rule, data, paint]};
END.