ImagerBasic.mesa
This interface provides the public data structures shared by clients and the Imager.
Last Edited by:
Crow, June 18, 1983 11:41 am
DIRECTORY;
ImagerBasic: CEDAR DEFINITIONS
= BEGIN
Basic Definitions (Numbers and Shapes)
Vec: TYPE = RECORD [x, y: REAL];
IntVec: TYPE = RECORD [x, y: INTEGER];
Edge: TYPE = RECORD [a, b: Vec];
IntEdge: TYPE = RECORD [a, b: IntVec];
Rectangle: TYPE = RECORD [x, y, w, h: REAL];
IntRectangle: TYPE = RECORD [x, y, w, h: INTEGER];
Context
Devices
ImagingDevice: TYPE = ATOM; -- i.e. $LF, $CRT8, $CRT24, $PD, $IP, etc.
InteractiveImagingDevice: TYPE = ATOM; -- i.e. $LF, $CRT8, $CRT24
Transformations
Clipping
Visibility: TYPE = {visible, partlyVisible, invisible};
Sources
SourceType: TYPE = { black, white, constant, pixelarray, sampled, functional };
Paths
A client of the Imager may keep a path representation in a form appropriate for its own use; it only needs to unravel it into a series of MoveTo, LineTo and CurveTo operations when it is asked.
Path: TYPE = REF PathRep;
PathRep:
TYPE =
RECORD [
generateProc:
PROC [
path: Path,
move: PROC [Vec],
line: PROC [Vec],
curve: PROC [Vec, Vec, Vec]
],
data: REF ANY
];
Masks
StrokeEnds: TYPE = {butt, square, round};
END.