home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.graphics
- Path: sparky!uunet!munnari.oz.au!uniwa!cujo!martin
- From: martin@cs.curtin.edu.au (Martin Dougiamas)
- Subject: Re: Drawing in the background.
- Message-ID: <martin.721395535@marsh>
- Sender: news@cujo.curtin.edu.au (News Manager)
- Organization: Curtin University of Technology
- References: <BxF4t6.AuF@CAM.ORG>
- Date: Tue, 10 Nov 1992 11:38:55 GMT
- Lines: 29
-
- gelinas@CAM.ORG (Daniel Gelinas) writes:
-
- >I was wondering if any of guys guys could help me out with something
- >that I would like to try. The goal of my program( in C) is to draw
- >4 laser beams(one from each corner of the screen) shooting out and
- >spelling a word. My only problem is when I try to do this normally
- >I have to use 1 function to draw a line in green, and then I use the
- >same function to draw another line in black. This way the laser beam
- >s can move around. That's all fine and dandy but it won't work with
- >4 laser beams because when I write over them in black it also writes
- >of everything else on the screen.
-
- A better way to do it would be to write the lines both times using
- some sort of "Exclusive Or" mode... where it adds the line's pixels
- to the screen using XOr logic. Then, just do exactly the same thing
- again (ie call your same line-drawing routine) to REMOVE the line.
-
- On a Macintosh at least, it was very easy to to specify the drawing
- mode and the system would do the logic for you. I'm sure there must
- be something equivalent on most other systems.
-
- Martin
- --
- ,--------------------------------------------------------------. _ .
- | All the deserts I could irrigate Martin Dougiamas. | _r| Ll\
- | All the poor I could emancipate martin@cs.curtin.edu.au | | | \
- | But that's not what interests me Curtin University | \ |_ /
- | I'm interested in apathy Perth, Western Australia -+-> x~ `-'
- `=== This Is Serious, Mum =====================================' V
-