IF viewer#
NIL
AND viewer.data#
NIL
AND ISTYPE[viewer.data, CDVPrivate.MyGraphicRef] THEN {
viewerCenterOffset: CD.Position ← [viewer.cw/2, viewer.ch/2];
designCenterOffset: CD.Position;
me: CDVPrivate.MyGraphicRef = NARROW[viewer.data];
dscale: CDVScale.ScaleRec ← CDVScale.MakeScale[nscale: me.scale.nscale, grid: me.scale.grid];
IF CDBasics.InsidePos[pos, me.deviceDrawRef.worldClip] THEN RETURN;
designCenterOffset ← CDVScale.ViewerToDesignPosition[dscale, viewerCenterOffset];
dscale ← CDVScale.MakeScale[nscale: me.scale.nscale, grid: me.scale.grid, off: CDBasics.SubPoints[pos, designCenterOffset]];
me.scale ← dscale;
ViewerOps.PaintViewer[viewer, client, FALSE, NIL];
};