IF _tag='CELL' THEN BEGIN col := value * 65535; negcol:= (1-value) * 65535; {**************make more bar codes for dark values*****************************} IF value<.3 THEN BEGIN FOR n:=1 TO 80 DO BEGIN PenFore(col,col,col); P1X:= x+0.2+random*5*0.99; P1Y:=y-0.1; P2X:=P1X; P2Y:= y-4.9; IF P1X> x+4.5 THEN BEGIN P1X:=x+4.5; P1Y:=y-0.1; P2X:=P1X; P2Y:= y-4.9; END; moveto (P1X,P1Y); lineto (P2X,P2Y); END; END ELSE BEGIN {**************make more bar codes for dark values*****************************} {**************or else make 30 lines*******************************************} FOR n:=1 TO 30 DO BEGIN PenFore(col,col,col); P1X:= x+0.2+random*5*0.99; P1Y:=y-0.1; P2X:=P1X; P2Y:= y-4.9; IF P1X> x+4.5 THEN BEGIN P1X:=x+4.5; P1Y:=y-0.1; P2X:=P1X; P2Y:= y-4.9; END; moveto (P1X,P1Y); lineto (P2X,P2Y); {**************get color index for each cell***********************************} RGBToColorIndex(col, col, col, colorIndex); Message(colorIndex); str:= concat(str, ' cell=',id,': ', colorIndex); message(str); PenFore(negcol,negcol,negcol); {**************get color index for each cell***********************************}