milne@ICS.UCI.EDU (Alastair Milne) (01/04/88)
I have just started exploring the graphics abilities of Turbo Pascal 4.0, and while there is a number of powerful features there, there appears to be a particular lack that could cause my group real difficulties. The problem is that the parameters one can set to affect drawing don't seem to include drawing logic: that is, the operation(s) by which each pixel comprising the line receives its new value -- whether simple replacement (screen[y,x] := Black), inversion (screen[y,x] := not screen[y,x]), or exclusive or with another value (screen[y,x] := screen[y,x] xor newpixel). For a couple of our graphics needs, the abilities to invert and xor are crucial. PutPixel and GetPixel from the Graph unit don't appear to be the answer: they are much too slow. Running a FOR-loop on them one can actually watch the line growing across the screen. Has anybody else has already dealt with this problem? Although I could probably work out a solution or two myself, I'd prefer first to rely on existing experience. Thanks for any assistance, Alastair Milne