DIRECTORY Atom USING [PropList], Imager USING [Context, ClassRep], ImagerCache USING [Ref], ImagerDevice USING [Device], ImagerSample USING [Box, SampleMap], Terminal USING [Virtual]; ImagerRaster: CEDAR DEFINITIONS ~ BEGIN Context: TYPE ~ Imager.Context; Device: TYPE ~ ImagerDevice.Device; Box: TYPE ~ ImagerSample.Box; SampleMap: TYPE ~ ImagerSample.SampleMap; 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: SampleMap, 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: Box, 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. xImagerRaster.mesa Copyright c 1984, 1985, 1986 by Xerox Corporation. All rights reserved. Michael Plass, June 11, 1985 12:49:37 pm PDT Doug Wyatt, February 17, 1986 3:28:39 pm PST 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. Κ‚˜codešœ™Kšœ Οmœ=™HK™,Kšœ,™,—K™šΟk ˜ Kšœžœ ˜Kšœžœ˜!Kšœ žœ˜Kšœ žœ ˜Kšœ žœ˜$Kšœ žœ ˜K˜—K˜KšΠbl œžœž ˜šœž˜K˜Kšœ žœ˜Kšœžœ˜#Kšœžœ˜Kšœ žœ˜)—head™šΟnœžœžœžœžœžœžœ žœžœžœ ˜ΓKšœ*™*Kšœ.™.——™š œžœ#žœžœ ˜TK˜—š  œžœžœ ˜BK˜—š œžœ#žœžœ ˜TK˜—š œžœžœ ˜EK˜——š œ™š  œžœžœ ˜9K™=K˜—Kšœ žœžœ ˜!šœ žœžœ˜šœ žœ$žœ˜8Kšœ5™5—Kšœ˜Kšœž˜ Kšœ˜——™Kšœ žœžœ˜#šœžœžœ˜Jšœ˜Jšœžœ˜ J˜Jšœ˜J˜—š  œžœžœžœ˜XKšœK™KK™——™ š   œžœžœžœžœ˜=K™HK˜——K˜Kšžœ˜—…—X R