BufferedRefreshPortImpl.mesa
Copyright Ó 1988, 1992 by Xerox Corporation. All rights reserved.
Bier, May 15, 1990 3:54 pm PDT
Contents: Routines that BufferedRefresh needs that are different in DCedar and PCedar.
DIRECTORY
BufferedRefreshPort, Imager, ImagerCG6Context, ImagerDither, ImagerDitherContext, ImagerSample, SF;
BufferedRefreshPortImpl: CEDAR PROGRAM
IMPORTS ImagerCG6Context, ImagerDitherContext
EXPORTS BufferedRefreshPort = BEGIN
Context: TYPE ~ Imager.Context;
CreateCG6Context: PUBLIC PROC [deviceSpaceSize: SF.Vec, pixelUnits: BOOL ¬ FALSE, fontCacheName: ATOM ¬ NIL] RETURNS [Context] = {
RETURN[ImagerCG6Context.Create[deviceSpaceSize, pixelUnits, fontCacheName, NIL]];
};
SetCG6SampleMap: PUBLIC PROC [context: Context, sampleMap: Imager.SampleMap] = {
ImagerCG6Context.SetSampleMap[context, sampleMap, FALSE];
};
SetDitherMapFromScreen: PUBLIC PROC [context: Context, screen: Context] = {
This is not portable because MapEntries are defined in ImagerDither in PCedar but in ImagerDitherContext in DCedar.
mapEntries: ImagerDither.MapEntries ¬ ImagerDitherContext.GetDitherMap[screen];
ImagerDitherContext.SetDitherMap[context, mapEntries];
};
SetCG6DitherMapFromScreen: PUBLIC PROC [context: Context, screen: Context] = {
mapEntries: ImagerDither.MapEntries ¬ ImagerCG6Context.GetDitherMap[screen];
ImagerCG6Context.SetDitherMap[context, mapEntries];
};
END.