InitPointFns:
PUBLIC
PROC = {
HardcopyController: TYPE = RECORD [hxcenter, hycenter, hwidth, hheight: REAL, pressxcenter, pressycenter: CARDINAL, hscale: REAL];
DisplayController: TYPE = RECORD [dxcenter, dycenter, dwidth, dheight: CARDINAL, dxscale, dyscale, dxorigin, dyorigin: REAL, dgridsize: CARDINAL];
hController: HardcopyController = [hxcenter: (586/2)*PixelsToMicas, hycenter: ((694/2)+68)*PixelsToMicas, hwidth: 586*PixelsToMicas, hheight: 674*PixelsToMicas, pressxcenter: Real.RoundC[(586/2)*PixelsToMicas], pressycenter: Real.RoundC[((694/2)+68)*PixelsToMicas], hscale: 1];
dController: DisplayController = [dxcenter: 586/2, dycenter: (694/2)+68, dwidth: 586, dheight: 674, dxscale: 1.0/PixelsToMicas, dyscale: 1.0/PixelsToMicas, dxorigin: 0, dyorigin: 0, dgridsize: 8];
realpt, dcenterobj: GriffinPoint.ObjPt;
hcenterscr: GriffinPoint.ScrPt;
PixelsToMicas: REAL = 32.0;
MicasToPixels: REAL = 1.0/PixelsToMicas;
dxCenterGuess: REAL = 586/2; --586 ~= width of default viewer, LF display, left column
dyCenterGuess: REAL = (694/2)+68; --694 ~= height of default viewer, LF display, left column
GriffinTransform.InitXForms[ObjToScrMatrix];
GriffinTransform.Scale[[MicasToPixels, MicasToPixels], ObjToScrMatrix];
ValScale ← MicasToPixels; --arbitrary choice
GriffinTransform.InitXForms[ScrToObjMatrix];
GriffinTransform.Scale[[PixelsToMicas, PixelsToMicas], ScrToObjMatrix];
dcenterobj ← GriffinTransform.XFormPt[[dxCenterGuess, dyCenterGuess], ScrToObjMatrix];
realpt ← [dxCenterGuess*PixelsToMicas, dyCenterGuess*PixelsToMicas];
hcenterscr ← ObjToScr[realpt];
GriffinTransform.Translate[[dcenterobj[X]-hController.hxcenter, dcenterobj[Y]-hController.hycenter], ObjToScrMatrix];
GriffinTransform.Translate[[hcenterscr[X]-INTEGER[dController.dxcenter], hcenterscr[Y]-INTEGER[dController.dycenter]], ScrToObjMatrix];
};