DIRECTORY II USING [Context], IIDevice USING [AllowedMasks, DeviceClass, DeviceParm], IIManhattan USING [Polygon], SF USING [Box, BoxGenerator, Vec], IIPrivate USING [Class]; IIRaster: CEDAR DEFINITIONS ~ BEGIN OPEN II; Class: TYPE ~ IIPrivate.Class; DeviceParm: TYPE ~ IIDevice.DeviceParm; DeviceClass: TYPE ~ IIDevice.DeviceClass; ManhattanPolygon: TYPE ~ IIManhattan.Polygon; CreateClass: PROC [type: ATOM, deviceClass: DeviceClass] RETURNS [Class]; Create: PROC [class: Class, deviceParm: DeviceParm, data: REF, pixelUnits: BOOL _ FALSE] RETURNS [Context]; GetDeviceParm: PROC [context: Context] RETURNS [DeviceParm]; ValidateState: PROC [context: Context] RETURNS [IIDevice.AllowedMasks]; GetContainingBox: PROC [context: Context, p: SF.Vec] RETURNS [SF.Box]; GetDeviceClipBox: PROC [context: Context] RETURNS [SF.Box]; SetDeviceClipBox: PROC [context: Context, clipBox: SF.Box]; MaskDeviceBoxes: PROC [context: Context, bounds: SF.Box, boxes: SF.BoxGenerator]; Interceptor: TYPE ~ REF InterceptorRep; InterceptorRep: TYPE ~ RECORD [intercept: InterceptProc, data: REF]; InterceptProc: TYPE ~ PROC [self: Interceptor, box: SF.Box, action: PROC, context: Context]; SetInterceptor: PROC [context: Context, interceptor: Interceptor] RETURNS [Interceptor]; InterceptorInEffect: PROC [context: Context] RETURNS [BOOL]; ModifyRaster: PROC [context: Context, box: SF.Box, action: PROC]; END. ώIIRaster.mesa Copyright c 1984, 1985, 1986 by Xerox Corporation. All rights reserved. Michael Plass, December 10, 1986 11:14:45 am PST Doug Wyatt, May 30, 1985 11:21:34 pm PDT This private interface provides the II class operations that are common to all of the raster Context implementations. Context Class Creation Creates a class record initialized with appropriate defaults for all of the class procedures; the raster subclass may redefine these procedures as required, to implement fast cases, detect special situations, etc. The deviceClass is required so that the appropriate collection of context class procs may be supplied. Context Creation If pixelUnits=TRUE, coordinate system is in pixels; otherwise it is in meters Device Access Returns the device record, or NIL if not a raster device. Makes sure the device knows the current color and priorityImportant (this happens automatically before the masking procs in the device class are called). Clipping Regions in Device Coordinates Gets a box that is either empty or contains p and lies within the clipping region. Sets the lowest-level clipping box. Masking Boxes in Device Coordinates This provides low-level access to the context's masking facilities; the boxes must all lie within bounds (or a fault may occur), and will be clipped to the current clipping region. Intercepting Raster Accesses The active InterceptProc is called whenever a change to the raster is called for; it should call back action, which will in turn call back one or more of the other class procs. The intercept proc may be used for raster implementations that need to know a bounding box for the operations before they happen (for software cursors, etc). An attempt is made to avoid recursive calls on the intercept proc. Sets a new interceptor and returns the previous one. So client knows whether ModifyRaster must be called. Should be used by raster implementations that access the raster without going through the normal DeviceClass procedures, to ensure that interceptions can happen. Κ•˜codešœ ™ Kšœ Οmœ=™HK™0šœ(™(K™—K™u—K™šΟk ˜ Kšœžœ ˜Kšœ žœ)˜7Kšœ žœ ˜Kšžœžœ˜"Kšœ žœ ˜K˜—K˜KšΠblœžœž ˜šœžœžœ˜K˜Kšœžœ˜Kšœ žœ˜'Kšœ žœ˜)Kšœžœ˜-—head™šΟn œžœžœžœ ˜IKšœbΟcœΜ™½——™š  œžœ.žœžœžœžœ ˜kKšœM™M——™ š  œžœžœ ˜