IF vTicks>6
AND vTicks<1000
THEN
TRUSTED {
x, xStop, xMod: INT;
yStart, yStop, yTem, yInc: LONG CARDINAL;
ticks: CARDINAL = vTicks;
dr: CD.DesignRect = CDBasics.Intersection[me.deviceDrawRef.interestClip, paintRef.rect]; -- design coords
vr:
CD.Rect ← CDVScale.DesignToViewerRect[me.scale,
CD.Rect[
-- viewer coords
x1: ModDown[dr.x1, dTicks],
y1: ModDown[dr.y1, dTicks],
x2: ModUp[dr.x2, dTicks],
y2: ModUp[dr.y2, dTicks]
]];
vx1: INTEGER ← vr.x1;
vy1: INTEGER ← vr.y1;
vx2: INTEGER ← vr.x2;
vy2: INTEGER ← vr.y2;
IF vx1<0 THEN vx1 ← vr.x1 + ModUp[-vr.x1, vTicks];
IF vy1<0 THEN vy1 ← vr.y1 + ModUp[-vr.y1, vTicks];
IF vx2>
LOOPHOLE[me.viewer.cw]
THEN
vx2 ← vr.x2-ModUp[vr.x2-me.viewer.cw, vTicks];
IF vy2>
LOOPHOLE[me.viewer.ch]
THEN
vy2 ← vr.y2-ModUp[vr.y2-me.viewer.ch, vTicks];
-- Now v.. denotes area for ticks; vTicks denote increment; in viewer coordinates
me.xBBptr.width ← me.bpp;
me.xBBptr.height ← 1;
me.xBBptr.src ← [LOOPHOLE[black],,0];
me.xBBptr.srcDesc ← PrincOps.SrcDesc[gray[PrincOps.GrayParm[
yOffset: 0,
widthMinusOne: 0, --words
heightMinusOne: 0 --lines
]]];
yStart ← LOOPHOLE[me.screen+Basics.LongMult[(me.vy-vy2), me.scWidthWords]];
yStop ← LOOPHOLE[me.screen+Basics.LongMult[(me.vy-vy1), me.scWidthWords]];
yInc ← Basics.LongMult[ticks, me.scWidthWords];
x ← Basics.LongMult[vx1+me.vx, me.bpp];
xStop ← Basics.LongMult[vx2+me.vx, me.bpp];
IF me.bpp#1 THEN TerminalExtras.LockColorFrame[virtual];
WHILE x<=xStop
DO
yTem ← yStart+LOOPHOLE[(x/Basics.bitsPerWord), LONG CARDINAL];
xMod ← x MOD Basics.bitsPerWord;
WHILE yTem<=yStop
DO
me.xBBptr.dst ← [LOOPHOLE[yTem],,xMod];
PrincOpsUtils.BITBLT[me.xBBptr];
yTem ← yTem+yInc
ENDLOOP;
x ← x+Basics.LongMult[ticks, me.bpp]
ENDLOOP;
IF me.bpp#1 THEN TerminalExtras.UnlockColorFrame[virtual];
};