DIRECTORY Atom USING [PropList], Imager USING [Context, ClassRep], ImagerCache USING [Ref], ImagerDevice USING [Device, DeviceBox], ImagerPixelMap USING [PixelMap], Terminal USING [Virtual]; ImagerRaster: CEDAR DEFINITIONS ~ BEGIN Context: TYPE ~ Imager.Context; Device: TYPE ~ ImagerDevice.Device; DeviceBox: TYPE ~ ImagerDevice.DeviceBox; Create: PROC [device: Device, pixelUnits: BOOL _ FALSE, fontCache: ImagerCache.Ref _ NIL, rastWeight: REAL _ 1.0, fontTuner: FontTuner _ NIL, class: REF Imager.ClassRep _ NIL ] RETURNS [Context]; NewBitmapDevice: PROC [frame: ImagerPixelMap.PixelMap, pixelsPerInch: REAL _ 72] RETURNS [Device]; NewGrayDevice: PROC [terminal: Terminal.Virtual] RETURNS [Device]; NewColorMapDevice: PROC [terminal: Terminal.Virtual, bpp: NAT _ 8] RETURNS [Device]; NewColor24Device: PROC [terminal: Terminal.Virtual] RETURNS [Device]; AmbushDevice: PROC [ambusher: Ambusher] RETURNS [Device]; Ambusher: TYPE ~ REF AmbusherRep; AmbusherRep: TYPE ~ RECORD [ maskProc: PROC [self: Ambusher, box: DeviceBox, action: PROC], device: Device, data: REF ]; FontTuner: TYPE ~ REF FontTunerRep; FontTunerRep: TYPE ~ RECORD [ proc: FontTunerProc, data: REF, propList: Atom.PropList ]; FontTunerProc: TYPE ~ PROC [self: FontTuner, charProc: PROC[Context], context: Context]; CreateClass: PROC [type: ATOM] RETURNS [REF Imager.ClassRep]; END. nImagerRaster.mesa Copyright c 1984, 1985 by Xerox Corporation. All rights reserved. Michael Plass, June 11, 1985 12:49:37 pm PDT Doug Wyatt, May 30, 1985 11:21:34 pm PDT Context creation If fontCache=NIL, no caching will be done. If fontTuner=NIL, no font tuning will be done. Raster devices Ambushing a raster device Provides a mechanism for software cursors, interesting demos. Called for each masking operation; should call action Font tuning hook Should call charProc to get the character, and should draw it into context. Subclassing For clients that want to do some simple subclassing of the raster class. Κw˜codešœ™Kšœ Οmœ7™BK™,Kšœ(™(—K™šΟk ˜ Kšœžœ ˜Kšœžœ˜!Kšœ žœ˜Kšœ žœ˜'Kšœžœ ˜ Kšœ žœ ˜K˜—K˜KšΠbl œžœž ˜šœž˜K˜Kšœ žœ˜Kšœžœ˜#Kšœ žœ˜)—head™šΟnœžœžœžœžœžœžœ žœžœžœ ˜ΓKšœ*™*Kšœ.™.——™š œžœ1žœžœ ˜cK˜—š  œžœžœ ˜BK˜—š œžœ#žœžœ ˜TK˜—š œžœžœ ˜EK˜——š œ™š  œžœžœ ˜9K™=K˜—Kšœ žœžœ ˜!šœ žœžœ˜šœ žœ*žœ˜>Kšœ5™5—Kšœ˜Kšœž˜ Kšœ˜——™Kšœ žœžœ˜#šœžœžœ˜Jšœ˜Jšœžœ˜ J˜Jšœ˜J˜—š  œžœžœžœ˜XKšœK™KK™——™ š   œžœžœžœžœ˜=K™HK˜——K˜Kšžœ˜—…—V ;