ImagerSourceImpl.mesa
Last Edited by: Crow, May 31, 1983 3:17 pm
DIRECTORY
ImagerBasic USING [Context, SourceRecord, RGBValue, AISFile, DeviceProcs],
Imager;
ImagerSourceImpl: CEDAR PROGRAM
IMPORTS
EXPORTS Imager
= BEGIN OPEN ImagerBasic;
Client-called Procedures
SetSource: PUBLIC PROC [context: Context, source: SourceRecord] = {
context.currentSource ← source;
};
GetSource: PUBLIC PROC [context: Context] RETURNS [SourceRecord] = {
RETURN [ context.currentSource];
};
SourceFromColor: PUBLIC PROC [context: Context, color: RGBValue] RETURNS [SourceRecord] = {
source: SourceRecord;
source.type ← constant;
source.color ← color;
source.pxlValue ← context.deviceProcs.RGBtoPixel[color];
source.samples ← NIL;
RETURN [ source ];
};
SourceFromImage: PUBLIC PROC [context: Context] RETURNS [SourceRecord] = {
source: SourceRecord;
source.type ← pixelarray;
source.samples ← NIL;   -- to be continued...
RETURN [ source ];
};
SourceFromAIS: PUBLIC PROC [file: AISFile] RETURNS [SourceRecord] = {
source: SourceRecord;
source.type ← sampled;
source.samples ← NIL;   -- to be continued...
RETURN [ source ];
};
Unpublicized Procedures
Internal Procedures
END.