DIRECTORY Atom USING [PropList], II USING [Color, Context, SampleMap, ScanMode, Transformation, VEC], IISample USING [EdgeAction, RawArray, rawArraySize], IIMaskCache USING [CharMask, MaskCache], SF USING [Box, BoxGenerator, Vec]; IIDevice: CEDAR DEFINITIONS ~ BEGIN OPEN II; Box: TYPE ~ SF.Box; BoxGenerator: TYPE ~ SF.BoxGenerator; Vec: TYPE ~ SF.Vec; CharMask: TYPE ~ IIMaskCache.CharMask; SampleMap: TYPE ~ II.SampleMap; ScanMode: TYPE ~ II.ScanMode; RawArray: TYPE ~ IISample.RawArray; rawArraySize: NAT ~ IISample.rawArraySize; FontTuner: TYPE ~ REF FontTunerRep; FontTunerRep: TYPE ~ RECORD [proc: FontTunerProc, data: REF, propList: Atom.PropList]; FontTunerProc: TYPE ~ PROC [self: FontTuner, charProc: PROC [Context], context: Context]; AllowedMasks: TYPE ~ RECORD [ unorderedBoxes: BOOL, regionFill: BOOL, bitmap: BOOL, rawBitmaps: BOOL, runGroupChar: BOOL, rasterChar: BOOL ]; DeviceClass: TYPE ~ REF DeviceClassRep; DeviceClassRep: TYPE ~ RECORD [ SetColor: PROC [context: Context, color: Color, viewToDevice: Transformation] RETURNS [AllowedMasks] _, SetPriority: PROC [context: Context, priorityImportant: BOOL] _ NIL, MaskBoxes: PROC [context: Context, bounds: Box, boxes: BoxGenerator] _ , MaskRegion: PROC [context: Context, bounds: Box, edgeGenerator: PROC [IISample.EdgeAction]] _ NIL, MaskBitmap: PROC [context: Context, bitmap: SampleMap, delta: Vec, bounds: Box, boxes: BoxGenerator] _ NIL, MaskRawBitmaps: PROC [context: Context, n: [0..rawArraySize], a: POINTER TO RawArray] _ NIL, DrawBitmap: PROC [context: Context, bitmap: SampleMap, delta: Vec, bounds: Box, boxes: BoxGenerator] _ NIL, MaskChar: PROC [context: Context, delta: Vec, mask: CharMask] _ NIL, MoveBox: PROC [context: Context, dstMin, srcMin, size: Vec] _ NIL, DoBuffered: PROC [context: Context, bounds: Box, copy: BOOL, action: PROC] _ NIL ]; DeviceParm: TYPE ~ REF DeviceParmRep; DeviceParmRep: TYPE ~ RECORD [ class: DeviceClass, -- class operations sSize, fSize: NAT, -- size of device coordinate system scanMode: ScanMode, -- orientation of device coordinate system surfaceUnitsPerInch: VEC, -- x and y scale factors surfaceUnitsPerPixel: NAT, -- surface resolution may be a multiple of pixel resolution fontTuner: FontTuner _ NIL, -- hook for doing font-tuning fontCache: IIMaskCache.MaskCache _ NIL, -- cache for device-dependent character masks rastWeight: REAL _ 1.0, -- larger numbers favor bitmaps in the cache propList: Atom.PropList _ NIL ]; END. :IIDevice.mesa Copyright c 1984, 1985, 1986 by Xerox Corporation. All rights reserved. Michael Plass, November 21, 1986 12:44:22 pm PST Doug Wyatt, May 19, 1985 4:00:08 pm PDT Font Tuning Provisions Should call charProc to get the character, and should draw it into context. Device Class The common raster implementation calls these to do the device-dependent work; the instance data for the device is found in context.data. If TRUE, boxes sent to MaskBoxes may come in any order; otherwise the boxes will be disjoint, nonempty, and for any two consecutive boxes a and b, b.min.s >= a.max.s-1. This invariant is needed, for instance, by the anti-aliasing implementation. If TRUE, may use MaskRegion If TRUE, MaskBitmap may be called; otherwise runs are generated. If TRUE, MaskRawBitmaps may be called. If TRUE, MaskChar may be called with a run-group character; otherwise runs are generated. If TRUE, MaskChar may be called with a raster character; otherwise MaskBitmap is called, or runs are generated. Notifies device of a color change. The return value indicates the kinds of masks that the device is willing to accept. Notifies device of a change to priorityImportant. The basic means of communicating masks; this is the only mask proc that is required. No guarantees about order. All boxes will fall within bounds. Masks a monotone region designated by the edges. The edgeGenerator must specify the edges in nondecreasing sMin order. Optional proc for masking a bitmap. Optional proc for masking multiple bitmaps Optional proc for drawing a bitmap. Optional proc for masking a character from a font cache. Optional proc for moving a rectangular region of the raster. If not supplied, IIBackdoor.MoveViewRectangle will raise an error when called. If supplied, allows full implementation of DoWithBuffer. If copy=TRUE, device should copy from the main buffer to the temporary buffer; otherwise garbage in the buffer is OK, since the first thing that will happen is to fill it with a color. Device Parameter Record Static instance data that the common raster implementation needs to know. สา˜codešœ ™ Kšœ ฯmœ=™HK™0šœ'™'K™——šฯk ˜ Kšœžœ ˜Kšœžœ7žœ˜DKšœ žœ&˜4Kšœ žœ˜(Kšžœžœ˜"—K˜Kšะblœžœž ˜šœžœžœ˜K˜Kšœžœžœ˜Kšœžœžœ˜%Kšœžœžœ˜Kšœ žœ˜&Kšœ žœ˜Kšœ žœ˜Kšœ žœ˜#Kšœžœ˜*—head™Kšœ žœžœ˜#šœžœžœžœ˜VJ˜—šœžœžœžœ˜YKšœK™K——™ ™ˆK™—šœžœžœ˜šœžœ˜K™๖—šœ žœ˜K™—šœžœ˜ Kšœ@™@—šœ žœ˜Kšœ&™&—šœžœ˜KšœY™Y—šœ ž˜Kšœžœh™o—Kšœ˜K˜—Kšœ žœžœ˜'šœžœžœ˜šฯnœžœ@žœ˜gK™w—š  œžœ'žœžœ˜DK™1—š  œžœ9˜HK™TK™>—š  œžœ0žœžœ˜bKšœw™w—š  œžœWžœ˜kKšœ#™#—š  œžœ-žœžœ žœ˜\Kšœ*™*—š  œžœWžœ˜kKšœ#™#—š œžœ2žœ˜DKšœ8™8—š œžœ1žœ˜BKšœŒ™Œ—š   œžœ'žœ žœž˜PKšœ8™8Kšœธ™ธ—K˜——™™IK™—Kšœ žœžœ˜%šœžœžœ˜Kšœฯc˜'Kšœžœก#˜6Kšœก*˜>Kšœžœก˜2Kšœžœก;˜VKšœžœก˜9Kšœ#žœก-˜UKšœ žœก,˜DKšœž˜Kšœ˜K˜—K˜—Kšžœ˜J˜J˜J˜—…— žช