IIRasterPrivate.mesa
Copyright © 1984, 1985, 1986 by Xerox Corporation. All rights reserved.
Michael Plass, September 12, 1986 9:44:56 am PDT
Doug Wyatt, February 17, 1986 3:31:23 pm PST
Private definitions used by IIRasterImpl.
DIRECTORY
Basics USING [BITAND, BITNOT, BITOR],
II USING [Context],
IIDevice USING [CharMask, DeviceParm, DeviceClass, FontTuner],
IIFont USING [Font, XChar, XStringProc],
IIFontPrivate USING [FontAtom],
IIManhattan USING [Polygon],
IIRaster USING [Interceptor],
IIScanConverter USING [DevicePath],
IITransformation USING [Transformation],
SF USING [Box];
IIRasterPrivate: CEDAR DEFINITIONS
IMPORTS Basics
~ BEGIN
Context: TYPE ~ II.Context;
CharMask: TYPE ~ IIDevice.CharMask;
DeviceParm: TYPE ~ IIDevice.DeviceParm;
DeviceClass: TYPE ~ IIDevice.DeviceClass;
FontTuner: TYPE ~ IIDevice.FontTuner;
Box: TYPE ~ SF.Box;
nullBox: Box ~ [min: [0, 0], max: [0, 0]];
DevicePath: TYPE ~ IIScanConverter.DevicePath;
FontAtom: TYPE ~ IIFontPrivate.FontAtom;
Transformation: TYPE ~ IITransformation.Transformation;
ManhattanPolygon: TYPE ~ IIManhattan.Polygon;
Font: TYPE ~ IIFont.Font;
XChar: TYPE ~ IIFont.XChar;
XStringProc: TYPE ~ IIFont.XStringProc;
Flags:
TYPE ~
RECORD [
clientToDevice: BOOL ← FALSE, -- clientToDevice is valid
compositeClipper: BOOL ← FALSE, -- compositeClip and compositeBox are valid
fontInfo: BOOL ← FALSE, -- charToDevice and fontAtom are valid
deviceColor: BOOL ← FALSE, -- color last set by SetColor[device, ...] is valid
devicePriority: BOOL ← FALSE, -- priority last set by SetPriority[device, ...] is valid
unused: [0..3777B] ← 0
];
OrFlags:
PROC [f1, f2: Flags]
RETURNS [Flags] ~
INLINE {
RETURN[LOOPHOLE[Basics.BITOR[LOOPHOLE[f1], LOOPHOLE[f2]]]];
};
AndFlags:
PROC [f1, f2: Flags]
RETURNS [Flags] ~
INLINE {
RETURN[LOOPHOLE[Basics.BITAND[LOOPHOLE[f1], LOOPHOLE[f2]]]];
};
NotFlags:
PROC [f: Flags]
RETURNS [Flags] ~
INLINE {
RETURN[LOOPHOLE[Basics.BITNOT[LOOPHOLE[f]]]];
};
RasterData: TYPE ~ REF RasterDataRep;
RasterDataRep:
TYPE ~
RECORD [
deviceParm: DeviceParm ← NIL, -- parameters for the particular raster device
deviceClass: DeviceClass ← NIL, -- the device class, perhaps layered to call modify proc
interceptor: IIRaster.Interceptor ← NIL,
devicePath: DevicePath ← NIL, -- scratch storage for scan converter
valid: Flags ← [],
deviceClipBox: Box ← nullBox, -- always valid
surfaceToDevice: Transformation ← NIL, -- always valid
viewToDevice: Transformation ← NIL, -- always valid
viewClip: ManhattanPolygon ← NIL, -- deviceClipBox device coords; always valid
viewBox: Box ← nullBox, -- bb of viewClip; device coords; always valid
clientToDevice: Transformation ← NIL, -- valid iff valid.clientToDevice
compositeClip: ManhattanPolygon ← NIL, -- device coords; valid iff valid.compositeClipper
compositeBox: Box ← nullBox, -- device coords; valid iff valid.compositeClipper
fontAtom: FontAtom ← NIL, -- valid iff valid.fontInfo
charToDevice: Transformation ← NIL, -- valid iff valid.fontInfo
maskToDevice: Transformation ← NIL -- scratch storage for MaskBitmap and MaskPixel
];
NoteStateChanges:
PROC [context: Context];
ValidateIfNeeded:
PROC [context: Context, needs: Flags];
ClipBoxToMask:
PROC [box: Box, mask: ManhattanPolygon, action:
PROC [Box]];
RasterShow:
PROC [context: Context, string: XStringProc, xrel:
BOOL];
BasicShowChar:
PROC [context: Context, font: Font, char: XChar, checkBB:
BOOL, imaging:
BOOL];
ShowCharacterMask:
PROC [context: Context, mask: CharMask, s:
INTEGER, f:
INTEGER];
RasterShowText:
PROC [context: Context, text:
REF
READONLY
TEXT, start, len:
NAT, xrel:
BOOL];
END.