PaintLines: ViewerClasses.PaintProc ~ {
p, q: ARRAY [0..100) OF Imager.VEC;
time0, time1, timeLine, timeImager: REAL;
Label: PROC [vec: Draw2d.VEC, rope: Rope.ROPE] ~ {Draw2d.Label[context, vec, rope]};
FOR i:
NAT
IN[0..100)
DO
t: REAL ← REAL[i]*2.0*3.1415926535/100.0;
p[i] ← [150.0+130.0*RealFns.Cos[t], 150.0+130.0*RealFns.Sin[t]];
q[i] ← [p[i].x+300.0, p[i].y];
ENDLOOP;
time0 ← BasicTime.PulsesToSeconds[BasicTime.GetClockPulses[]];
FOR i: NAT IN [0..100) DO Draw2d.Line[context, p[i], [150.0, 150.0]]; ENDLOOP;
time1 ← BasicTime.PulsesToSeconds[BasicTime.GetClockPulses[]];
timeLine ← time1-time0;
Label[[65, 290], IO.PutFR["Draw2d.Line: %6.4f seconds", IO.real[timeLine]]];
time0 ← BasicTime.PulsesToSeconds[BasicTime.GetClockPulses[]];
FOR i: NAT IN [0..100) DO Imager.MaskVector[context, q[i], [450.0, 150.0]]; ENDLOOP;
time1 ← BasicTime.PulsesToSeconds[BasicTime.GetClockPulses[]];
timeImager ← time1-time0;
Label[[345, 290], IO.PutFR["Imager.MaskVector: %6.4f seconds", IO.real[timeImager]]];
Label[[200, 320], IO.PutFR["Line/MaskVector Factor: %6.4f", IO.real[timeImager/timeLine]]];
};