GGFromImagerImpl.mesa
Copyright c 1985 by Xerox Corporation. All rights reserved.
Michael Plass, October 19, 1985 3:55:31 pm PDT
Pier, April 21, 1987 6:24:06 pm PDT
Bier, February 18, 1987 11:10:03 pm PST
DIRECTORY
Basics, Convert, FileNames, GGBasicTypes, GGFont, GGFromImager, GGModelTypes, GGScene, GGOutline, GGParseIn, GGSegment, GGSegmentTypes, GGSlice, GGTraj, Vectors2d, Imager, ImagerBackdoor, ImagerColor, ImagerFont, ImagerInterpress, ImagerPath, ImagerPrivate, ImagerState, ImagerTransformation, ImagerTypeface, Interpress, IO, RefText, Rope, SF, ViewerClasses;
GGFromImagerImpl: CEDAR PROGRAM
IMPORTS Convert, FileNames, GGFont, GGParseIn, GGScene, GGOutline, GGSegment, GGSlice, GGTraj, Vectors2d, Imager, ImagerBackdoor, ImagerFont, ImagerInterpress, ImagerPath, ImagerState, ImagerTransformation, Interpress, IO, RefText, Rope
EXPORTS GGFromImager, Imager, ImagerFont = BEGIN
ROPE: TYPE ~ Rope.ROPE;
Class: TYPE ~ REF ClassRep;
ClassRep: PUBLIC TYPE ~ ImagerPrivate.ClassRep; -- export to Imager.ClassRep
Context: TYPE ~ Imager.Context;
Color: TYPE ~ Imager.Color;
ColorOperator: TYPE ~ Imager.ColorOperator;
CoordSys: TYPE ~ ImagerBackdoor.CoordSys;
Clipper: TYPE ~ ImagerBackdoor.Clipper;
Font: TYPE ~ ImagerFont.Font;
Object: TYPE ~ Imager.Object;
PathProc: TYPE ~ ImagerPath.PathProc;
PixelArray: TYPE ~ Imager.PixelArray;
PixelMap: TYPE ~ Imager.PixelMap;
Point: TYPE ~ GGBasicTypes.Point;
Rectangle: TYPE ~ Imager.Rectangle;
SampleMap: TYPE ~ Imager.SampleMap;
ScanMode: TYPE ~ ImagerTransformation.ScanMode;
SequenceOfReal: TYPE ~ GGBasicTypes.SequenceOfReal;
SequenceOfRealObj: TYPE ~ GGBasicTypes.SequenceOfRealObj;
Slice: TYPE ~ GGModelTypes.Slice;
SliceParts: TYPE ~ GGModelTypes.SliceParts;
State: TYPE ~ REF StateRep;
StrokeEnd: TYPE ~ Imager.StrokeEnd;
StrokeJoint: TYPE ~ Imager.StrokeJoint;
StateRep: PUBLIC TYPE ~ ImagerState.StateRep;
Transformation: TYPE ~ ImagerTransformation.Transformation;
VEC: TYPE ~ Imager.VEC;
Viewer: TYPE ~ ViewerClasses.Viewer;
Visibility: TYPE ~ ImagerBackdoor.Visibility;
XChar: TYPE ~ ImagerFont.XChar;
XStringProc: TYPE ~ ImagerFont.XStringProc;
Data: TYPE ~ REF DataRep;
DataRep: TYPE ~ RECORD [
scene: GGModelTypes.Scene,
feedback: Viewer
];
Typeface: TYPE ~ REF TypefaceRep;
TypefaceRep: PUBLIC TYPE = ImagerTypeface.TypefaceRep; -- export to ImagerFont
WarningMessage: PUBLIC SIGNAL [context: Context, code: ATOM, message: ROPE] ~ CODE;
Create: PROC [feedback: Viewer] RETURNS [Context] ~ {
data: Data ~ NEW[DataRep ← [scene: GGScene.CreateScene[], feedback: feedback]];
state: State ~ NEW[StateRep ← []];
state.T ← ImagerTransformation.Scale[1.0]; -- allocate storage for a transformation and initialize to the identity
state.T ← ImagerTransformation.Scale[72/0.0254];
state.color ← Imager.black;
RETURN[NEW[Imager.ContextRep ← [class: gargoyleClass, state: state, data: data]]];
};
Capture: PUBLIC PROC [action: PROC [Context], feedback: Viewer ← NIL] RETURNS [GGModelTypes.Scene] ~ {
context: Context ~ Create[feedback];
action[context];
WITH context.data SELECT FROM data: Data => RETURN [data.scene]; ENDCASE => ERROR;
};
ProcessStateChanges: PUBLIC PROC [context: Context] ~ {
state: State ~ context.state;
changed: ImagerState.ChangeFlags ~ state.changed;
state.changed ← ImagerState.notChanged;
IF changed.clipper AND state.clipper # NIL THEN SIGNAL WarningMessage[context, $Clipping, "NotImplemented: Clipping"];
};
RopeFromXStringProc: PROC [string: XStringProc] RETURNS [rope: ROPENIL] ~ {
text: REF TEXT ← RefText.ObtainScratch[256];
set: BYTE ← 0;
action: PROC [char: XChar] ~ {
IF char.set#set THEN {
text ← RefText.AppendChar[to: text, from: VAL[255]];
text ← RefText.AppendChar[to: text, from: VAL[set ← char.set]];
};
text ← RefText.AppendChar[to: text, from: VAL[char.code]];
};
text.length ← 0;
string[action];
rope ← Rope.FromRefText[text];
RefText.ReleaseScratch[text];
RETURN [rope];
};
UnpackComplexFontName: PROC [fontName: Rope.ROPE] RETURNS [prefix, family, face: Rope.ROPE, fontSize: REAL] = {
Takes a complex name like "xerox/pressfonts/Helvetica-MIR" and a font size and returns components.
May already have a simple name like xerox/tiogafonts/Helvetica10I. KAP August 8, 1986
DigitProc: IO.BreakProc = {
SELECT char FROM
IO.TAB, IO.CR, IO.SP => RETURN [break];
'0, '1, '2, '3, '4, '5, '6, '7, '8, '9 => RETURN [break];
ENDCASE => RETURN [other];
};
AlphaProc: IO.BreakProc = {
SELECT char FROM
IO.TAB, IO.CR, IO.SP => RETURN [break];
IN ['a .. 'z], IN ['A .. 'Z] => RETURN [break];
ENDCASE => RETURN [other];
};
new, sizeRope: Rope.ROPE;
prefix ← FileNames.Directory[path: fontName]; -- "xerox/*fonts/"
new ← FileNames.GetShortName[fontName]; -- get family "name"
face ← FileNames.Tail[new, '-]; -- get face component (MIR, BRR, ...)
IF Rope.Equal[face, new] THEN { -- have a name like Helvetica10I OR TERMINAL
endOfName: BOOL;
nameStream: IO.STREAMIO.RIS[new];
family ← IO.GetTokenRope[nameStream, DigitProc].token; -- get the leading alpha characters
sizeRope ← IO.GetTokenRope[nameStream, AlphaProc ! IO.EndOfStream, IO.Error => {endOfName ← TRUE; CONTINUE;};].token; -- get any digit characters
fontSize ← Convert.RealFromRope[sizeRope];
IF endOfName THEN face ← "" -- because face = new
ELSE face ← Rope.Concat["-", GGParseIn.ReadBlankAndWord[nameStream]];
}
ELSE { -- have a name like Helvetica-MIR
family ← Rope.Substr[base: new, start: 0, len: Rope.SkipTo[s: new, pos: 0, skip: "-"]]; -- throw away "-XXX"
face ← SELECT TRUE FROM
Rope.Equal[face, "MRR", FALSE] => "",
Rope.Equal[face, "BRR", FALSE] => "-B",
Rope.Equal[face, "Bold", FALSE] => "-B",
Rope.Equal[face, "MIR", FALSE] => "-I",
Rope.Equal[face, "Italic", FALSE] => "-I",
Rope.Equal[face, "BIR", FALSE] => "-BI",
ENDCASE => ERROR;
fontSize ← 1.0;
};
};
SetSegProperties: PROC [context: Context, m: Transformation, outlined: BOOL, seg: GGSegmentTypes.Segment] = {
A kludge for the moment to avoid segments with sampled colors
strokeEnd: StrokeEnd;
strokeEnd ← VAL[NAT[context.state.np.strokeEnd]];
IF outlined THEN {
seg.strokeWidth ← Vectors2d.Magnitude[ImagerTransformation.TransformVec[m, [context.state.np.strokeWidth, 0.0] ] ];
seg.color ← IF ISTYPE[context.state.color, ImagerColor.ConstantColor] THEN context.state.color ELSE Imager.black;
seg.strokeEnd ← strokeEnd;
}
ELSE {
seg.strokeWidth ← 0.0;
seg.color ← NIL;
seg.strokeEnd ← round;
};
};
OutlineFromPath: PROC[context: Context, path: PathProc, m: Transformation, closed: BOOL, outlined: BOOLTRUE] RETURNS [GGModelTypes.Outline] ~ {
curOutline: GGModelTypes.Outline ← NIL;
curTraj: GGModelTypes.Traj ← NIL;
curSeg: GGSegmentTypes.Segment ← NIL;
lp: VEC ← [0,0];
firstPoint: VEC ← [0,0];
Finish: PROC ~ {
IF curTraj # NIL THEN {
IF curSeg # NIL THEN {
IF closed THEN {
IF curSeg.hi = firstPoint THEN {
[] ← GGTraj.AddSegment[curTraj, hi, curSeg, lo];
GGTraj.CloseByDistorting[curTraj, hi];
}
ELSE {
[] ← GGTraj.AddSegment[curTraj, hi, curSeg, lo];
curSeg ← GGSegment.MakeLine[curSeg.hi, firstPoint, NIL];
SetSegProperties[context, m, outlined, curSeg];
GGTraj.CloseWithSegment[curTraj, curSeg, lo];
};
}
ELSE [] ← GGTraj.AddSegment[curTraj, hi, curSeg, lo];
}
ELSE { -- unlikely but legal case: Traj with a single point, no segment
[] ← GGTraj.AddSegment[curTraj, lo, GGSegment.MakeLine[[lp.x, lp.y], [lp.x, lp.y], NIL], lo];
};
curSeg ← NIL;
IF curOutline = NIL THEN curOutline ← GGOutline.CreateOutline[curTraj, NIL]
ELSE curOutline ← GGOutline.AddHole[curOutline, curTraj];
curTraj ← NIL;
};
};
Move: PROC [p: VEC] ~ {
Finish[];
curTraj ← GGTraj.CreateTraj[[p.x, p.y]];
firstPoint ← lp ← p;
};
Line: PROC [p1: VEC] ~ {
IF curSeg # NIL THEN [] ← GGTraj.AddSegment[curTraj, hi, curSeg, lo];
curSeg ← GGSegment.MakeLine[[lp.x, lp.y], [p1.x, p1.y], NIL];
SetSegProperties[context, m, outlined, curSeg];
lp ← p1;
};
Curve: PROC [p1, p2, p3: VEC] ~ {
IF curSeg # NIL THEN [] ← GGTraj.AddSegment[curTraj, hi, curSeg, lo];
curSeg ← GGSegment.MakeBezier[[lp.x, lp.y], [p1.x, p1.y], [p2.x, p2.y], [p3.x, p3.y], NIL];
SetSegProperties[context, m, outlined, curSeg];
lp ← p3;
};
Conic: PROC [p1, p2: VEC, r: REAL] ~ {
IF curSeg # NIL THEN [] ← GGTraj.AddSegment[curTraj, hi, curSeg, lo];
curSeg ← GGSegment.MakeConic[[lp.x, lp.y], [p1.x, p1.y], [p2.x, p2.y], r, NIL];
SetSegProperties[context, m, outlined, curSeg];
lp ← p2;
};
Arc: PROC [p1, p2: VEC] ~ {
IF curSeg # NIL THEN [] ← GGTraj.AddSegment[curTraj, hi, curSeg, lo];
curSeg ← GGSegment.MakeArc[[lp.x, lp.y], [p1.x, p1.y], [p2.x, p2.y], NIL];
SetSegProperties[context, m, outlined, curSeg];
lp ← p2;
};
ImagerPath.Transform[path, m, Move, Line, Curve, Conic, Arc];
Finish[];
RETURN [curOutline];
};
MyShow: PROC[context: Context, string: XStringProc, xrel: BOOL] = {
MyShowAux[context, RopeFromXStringProc[string], xrel];
};
MyShowText: PROC [context: Context, text: REF READONLY TEXT, start, len: NAT, xrel: BOOL] = {
MyShowAux[context, Rope.FromRefText[s: text, start: start, len: len], xrel];
};
MyShowAux: PROC[context: Context, rope: Rope.ROPE, xrel: BOOL] = {
OPEN ImagerTransformation;
font: ImagerFont.Font ← context.class.GetFont[context];
escapement: VEC ← ImagerFont.RopeEscapement[font, rope];
IF context.state.np.noImage=0 THEN {
textSlice: GGModelTypes.Slice;
data: Data ← NARROW[context.data];
amplifySpace: REAL ← ImagerBackdoor.GetReal[context, $amplifySpace];
correctMeasureX: REAL ← ImagerBackdoor.GetReal[context, $correctMX];
color: Imager.Color ← context.class.GetColor[context];
currentT: Transformation ← context.class.GetT[context];
currentPoint: Point ← context.class.GetCP[context, FALSE];
fontData: GGFont.FontData ← GGFont.ParseFontData[data: NIL, inStream: IO.RIS[ImagerFont.Name[font]], literalP: TRUE];
fontData.transform ← Cat[Scale[fontData.storedSize], font.charToClient, Translate[currentPoint], currentT];
fontData.substituteOK ← TRUE; -- allow font substitution on file reads
textSlice ← GGSlice.MakeTextSlice[rope, amplifySpace];
[] ← GGSlice.SetTextFontAndTransform[textSlice, fontData, NIL];
textSlice.class.setFillColor[textSlice, color];
GGScene.AddSlice[data.scene, textSlice, -1];
};
ImagerState.StateSetXYRel[context, escapement];
};
MyShowBackward: PROC[context: Context, string: XStringProc] = {
SIGNAL WarningMessage[context, $MyShowBackward, "NotImplemented: ShowBackward"];
};
MyMaskFill: PROC[context: Context, path: PathProc, oddWrap: BOOL] = {
data: Data ~ NARROW[context.data];
state: State ~ context.state;
IF state.changed#ImagerState.notChanged THEN ProcessStateChanges[context];
IF oddWrap THEN SIGNAL WarningMessage[context, $ParityFill, "NotImplemented: ParityFill"];
IF context.state.np.noImage=0 THEN {
outline: GGModelTypes.Outline ← OutlineFromPath[context, path, state.T, TRUE, FALSE];
outline.class.setFillColor[outline, state.color];
GGScene.AddOutline[data.scene, outline, -1];
};
};
MyMaskStroke: PROC[context: Context, path: PathProc, closed: BOOL] ~ {
outline: GGModelTypes.Outline;
strokeJoint: StrokeJoint;
data: Data ~ NARROW[context.data];
state: State ~ context.state;
IF state.changed#ImagerState.notChanged THEN ProcessStateChanges[context];
IF context.state.np.noImage=0 THEN {
outline ← OutlineFromPath[context, path, state.T, closed];
outline.class.setFillColor[outline, NIL]; -- no fill color
strokeJoint ← VAL[NAT[context.state.np.strokeJoint]];
outline.class.setStrokeJoint[outline, outline.class.newParts[outline, NIL, slice].parts, strokeJoint];
GGScene.AddOutline[data.scene, outline, -1];
};
};
MyMaskDashedStroke: PROC[context: Context, path: PathProc, patternLen: NAT, pattern: PROC [NAT] RETURNS [REAL], offset, length: REAL] ~ {
outline: GGModelTypes.Outline;
strokeJoint: StrokeJoint;
data: Data ~ NARROW[context.data];
state: State ~ context.state;
patternSeq: SequenceOfReal ← NEW[SequenceOfRealObj[patternLen]];
IF state.changed#ImagerState.notChanged THEN ProcessStateChanges[context];
IF context.state.np.noImage=0 THEN {
completeParts: SliceParts;
outline ← OutlineFromPath[context, path, state.T, FALSE];
completeParts ← outline.class.newParts[outline, NIL, slice].parts;
outline.class.setFillColor[outline, NIL]; -- no fill color
strokeJoint ← VAL[NAT[context.state.np.strokeJoint]];
outline.class.setStrokeJoint[outline, completeParts, strokeJoint];
FOR i: NAT IN [0..patternLen) DO
patternSeq[i] ← pattern[i];
ENDLOOP;
outline.class.setDashed[outline, completeParts, TRUE, patternSeq, offset, length];
GGScene.AddOutline[data.scene, outline, -1];
};
};
MyShowAndFixedXRel: PROC [context: Context, string: XStringProc, x: REAL] ~ {
SIGNAL WarningMessage[context, $ShowAndFixedXRel, "Not implemented: ShowAndFixedXRel"];
};
MyMaskRectangle: PROC[context: Context, r: Rectangle] ~ {
path: PathProc ~ {
moveTo[[r.x, r.y]]; lineTo[[r.x+r.w, r.y]];
lineTo[[r.x+r.w, r.y+r.h]]; lineTo[[r.x, r.y+r.h]]
};
MyMaskFill[context, path, FALSE];
};
MyMaskRectangleI: PROC[context: Context, x, y, w, h: INTEGER] ~ {
MyMaskRectangle[context, [x, y, w, h]];
};
MyMaskVector: PROC[context: Context, p1, p2: VEC] ~ {
path: PathProc ~ {moveTo[p1]; lineTo[p2]};
MyMaskStroke[context, path, FALSE];
};
MyMaskPixel: PROC[context: Context, pa: PixelArray] ~ {
DoMyMaskPixel: PROC [dc: Imager.Context] = {
Imager.MaskPixel[dc, pa];
};
data: Data ← NARROW[context.data];
ipSlice: Slice;
currentColor: Color;
currentT: ImagerTransformation.Transformation;
currentColor ← context.state.color;
currentT ← ImagerTransformation.Copy[context.state.T];
ipSlice ← GGSlice.MakeIPSliceFromMaskPixel[pa, currentColor, NIL, currentT];
GGScene.AddSlice[data.scene, ipSlice, -1];
};
MyMaskBitmap: PROC[context: Context, bitmap: SampleMap, referencePoint: SF.Vec,
scanMode: ScanMode, position: VEC] ~ {
DoMyMaskBits: PROC [dc: Imager.Context] = {
Imager.MaskBitmap[dc, bitmap, referencePoint, scanMode, position];
};
masterStream, outStream: IO.STREAM;
masterRope: Rope.ROPE;
data: Data ← NARROW[context.data];
ipRef: ImagerInterpress.Ref;
ipMaster: Interpress.Master;
ipSlice: Slice;
SIGNAL WarningMessage[context, $MaskBitmap, "NotImplemented: MaskBitmap"];
outStream ← IO.ROS[];
ipRef ← ImagerInterpress.CreateFromStream[outStream, "Interpress/Xerox/3.0 "];
ImagerInterpress.DoPage[ipRef, DoMyMaskBits];
ImagerInterpress.Finish[ipRef];
masterRope ← IO.RopeFromROS[outStream];
masterStream ← IO.RIS[masterRope];
ipMaster ← Interpress.FromStream[masterStream, NIL];
ipSlice ← GGSlice.MakeIPSliceFromMaster[ipMaster, NIL, NIL, NIL, TRUE];
GGScene.AddSlice[data.scene, ipSlice, -1];
};
MyDrawBitmap: PROC [context: Context, bitmap: SampleMap, referencePoint: SF.Vec,
scanMode: ScanMode, position: VEC] ~ {
DoMyDrawBits: PROC [dc: Imager.Context] = {
Imager.MaskBitmap[dc, bitmap, referencePoint, scanMode, position];
};
masterStream, outStream: IO.STREAM;
masterRope: Rope.ROPE;
data: Data ← NARROW[context.data];
ipRef: ImagerInterpress.Ref;
ipMaster: Interpress.Master;
ipSlice: Slice;
SIGNAL WarningMessage[context, $DrawBits, "NotImplemented: DrawBits"];
outStream ← IO.ROS[];
ipRef ← ImagerInterpress.CreateFromStream[outStream, "Interpress/Xerox/3.0 "];
ImagerInterpress.DoPage[ipRef, DoMyDrawBits];
ImagerInterpress.Finish[ipRef];
masterRope ← IO.RopeFromROS[outStream];
masterStream ← IO.RIS[masterRope];
ipMaster ← Interpress.FromStream[masterStream, NIL];
ipSlice ← GGSlice.MakeIPSliceFromMaster[ipMaster, NIL, NIL, NIL, TRUE];
GGScene.AddSlice[data.scene, ipSlice, -1];
};
MyDrawPixels: PROC[context: Context, pixelMap: PixelMap, colorOperator: ColorOperator, referencePoint: SF.Vec, scanMode: ScanMode, position: VEC] ~ {
SIGNAL WarningMessage[context, $MyDrawPixels, "NotImplemented: DrawPixels"];
};
MyDoIfVisible: PROC[context: Context, r: Rectangle, action: PROC] ~ {
SIGNAL WarningMessage[context, $MyDoIfVisible, "NotImplemented: DoIfVisible"];
};
MyDoWithBuffer: PROC[context: Context, action: PROC, x, y, w, h: INTEGER, backgroundColor: Color] ~ {
SIGNAL WarningMessage[context, $MyDoWithBuffer, "NotImplemented: DoWithBuffer"];
};
MyDrawObject: PROC[context: Context, object: Object, position: VEC, interactive: BOOL] ~ {
SIGNAL WarningMessage[context, $MyDrawObject, "NotImplemented: DrawObject:"];
};
MyGetBounds: PROC [context: Context] RETURNS [Rectangle] ~ {
ERROR Imager.Error[[$NotImplemented, "NotImplemented: GetBounds"]]
};
MyViewReset: PROC[context: Context] ~ {
SIGNAL WarningMessage[context, $MyViewReset, "NotImplemented: ViewReset"];
};
MyViewTranslateI: PROC[context: Context, x, y: INTEGER] ~ {
SIGNAL WarningMessage[context, $MyViewTranslateI, "NotImplemented: ViewTranslateI"];
};
MyViewClip: PROC[context: Context, path: PathProc, oddWrap: BOOL, exclude: BOOL] ~ {
SIGNAL WarningMessage[context, $MyViewClip, "NotImplemented: ViewClip"];
};
MyViewClipRectangleI: PROC[context: Context, x, y, w, h: INTEGER, exclude: BOOL] ~ {
SIGNAL WarningMessage[context, $MyViewClipRectangleI, "NotImplemented: ViewClipRectangleI"];
};
MyGetTransformation: PROC[context: Context, from, to: CoordSys] RETURNS [Transformation] ~ {
SIGNAL WarningMessage[context, $MyGetTransformation, "NotImplemented: GetTransformation"];
RETURN[ImagerTransformation.Scale[1.0]];
};
MyTransform: PROC[context: Context, v: VEC, from, to: CoordSys, vec: BOOL] RETURNS [VEC] ~ {
SIGNAL WarningMessage[context, $MyTransform, "NotImplemented: Transform"];
RETURN[[0,0]];
};
MyMoveViewRectangle: PROC[context: Context, width, height, fromX, fromY, toX, toY: INTEGER] ~ {
SIGNAL WarningMessage[context, $MyMoveViewRectangle, "NotImplemented: MoveViewRectangle"];
};
MyTestViewRectangle: PROC[context: Context, x, y, w, h: INTEGER] RETURNS [Visibility] ~ {
SIGNAL WarningMessage[context, $MyTestViewRectangle, "NotImplemented: TestViewRectangle"];
RETURN[all]
};
gargoyleClass: Class ~ NEW[ClassRep ← [
type: $Gargoyle,
DoSave: ImagerState.StateDoSave,
SetInt: ImagerState.StateSetInt,
SetReal: ImagerState.StateSetReal,
SetT: ImagerState.StateSetT,
SetFont: ImagerState.StateSetFont,
SetColor: ImagerState.StateSetColor,
SetClipper: ImagerState.StateSetClipper,
GetInt: ImagerState.StateGetInt,
GetReal: ImagerState.StateGetReal,
GetT: ImagerState.StateGetT,
GetFont: ImagerState.StateGetFont,
GetColor: ImagerState.StateGetColor,
GetClipper: ImagerState.StateGetClipper,
ConcatT: ImagerState.StateConcatT,
Scale2T: ImagerState.StateScale2T,
RotateT: ImagerState.StateRotateT,
TranslateT: ImagerState.StateTranslateT,
Move: ImagerState.StateMove,
SetXY: ImagerState.StateSetXY,
SetXYRel: ImagerState.StateSetXYRel,
Show: MyShow,
ShowText: ImagerRasterPrivate.RasterShowText,
ShowText: MyShowText,
StartUnderline: ImagerState.StateStartUnderline,
MaskUnderline: ImagerState.StateMaskUnderline,
CorrectMask: ImagerState.StateCorrectMask,
CorrectSpace: ImagerState.StateCorrectSpace,
Space: ImagerState.StateSpace,
SetCorrectMeasure: ImagerState.StateSetCorrectMeasure,
SetCorrectTolerance: ImagerState.StateSetCorrectTolerance,
Correct: ImagerState.StateCorrect,
DontCorrect: ImagerState.StateDontCorrect,
SetGray: ImagerState.StateSetGray,
SetSampledColor: ImagerState.StateSetSampledColor,
SetSampledBlack: ImagerState.StateSetSampledBlack,
ShowBackward: MyShowBackward,
MaskFill: MyMaskFill,
MaskStroke: MyMaskStroke,
ShowAndFixedXRel: MyShowAndFixedXRel,
MaskDashedStroke: MyMaskDashedStroke,
MaskRectangle: MyMaskRectangle,
MaskRectangleI: MyMaskRectangleI,
MaskVector: MyMaskVector,
MaskPixel: MyMaskPixel,
MaskBitmap: MyMaskBitmap,
DrawBitmap: MyDrawBitmap,
DrawPixels: MyDrawPixels,
DoIfVisible: MyDoIfVisible,
DoWithBuffer: MyDoWithBuffer,
DrawObject: MyDrawObject,
Clip: ImagerState.StateClip,
ClipRectangle: ImagerState.StateClipRectangle,
ClipRectangleI: ImagerState.StateClipRectangleI,
GetCP: ImagerState.StateGetCP,
GetBounds: MyGetBounds,
ViewReset: MyViewReset,
ViewTranslateI: MyViewTranslateI,
ViewClip: MyViewClip,
ViewClipRectangleI: MyViewClipRectangleI,
GetTransformation: MyGetTransformation,
Transform: MyTransform,
MoveViewRectangle: MyMoveViewRectangle,
TestViewRectangle: MyTestViewRectangle,
propList: NIL
]];
END.