Path: utzoo!attcan!uunet!husc6!rutgers!dayton!joe From: joe@dayton.UUCP (Joseph P. Larson) Newsgroups: comp.sys.amiga Subject: Non-distruction graphics Message-ID: <6287@dayton.UUCP> Date: 25 Nov 88 20:37:12 GMT Reply-To: joe@dayton.UUCP (Joseph P. Larson) Organization: Dayton-Hudson Dept. Store Co. Lines: 31 Well, in my never-ending search for Amiga Knowledge, I'm working on a little draw program. I've implemented the ever-famous rubber-band line (hold down mouse, move around and line follows, let go and line solidifies). However, as I move around, I'm destroying what was on the screen before. My algorithm works something like this: a. Set startX and startY b. While mousebuttondown at every IntuitionTick erase old line drawn on last iteration draw new line between startX,startY and currX,currY What I need instead of draw and erase (erase is basically redraw old line with background color) is draw and recover old. The best method I have discovered for this would be to write a DrawXOR routine to replace my use of Draw(). It would XOR the bits in the line with what they are now instead. Then to erase I can XOR them again. But this sounds rather slow. So -- anyone got a better solution? Maybe I should add another bit plane and just fiddle with the bits in that plane? Ick. Maybe I have to manipulate everything myself instead of calling Intuition text and draw routines? -Joe -- When you fall on your head do you land on your feet? UUCP: rutgers!dayton!joe (Feed my Dayton Hudson Department Store Company ATT : (612) 375-3537 picture Joe Larson/MIS 1060 (standard disclaimer...) collection) 700 on the Mall Mpls, Mn. 55402