home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / graphics / 11679 < prev    next >
Encoding:
Text File  |  1992-11-10  |  1.9 KB  |  41 lines

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