home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / graphics / 13101 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  2.4 KB

  1. Xref: sparky comp.graphics:13101 comp.os.msdos.programmer:11561 comp.msdos.programmer:109
  2. Path: sparky!uunet!gatech!europa.asd.contel.com!howland.reston.ans.net!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!olivea!charnel!rat!zeus!tcobbs
  3. From: tcobbs@zeus.calpoly.edu (Travis Cobbs)
  4. Newsgroups: comp.graphics,comp.os.msdos.programmer,comp.msdos.programmer
  5. Subject: Re: bitmap
  6. Message-ID: <1992Dec21.210513.126592@zeus.calpoly.edu>
  7. Date: 21 Dec 92 21:05:13 GMT
  8. References: <1992Dec12.051026.29524@mnemosyne.cs.du.edu> <1992Dec12.143219.1@camins.camosun.bc.ca>
  9. Distribution: na
  10. Organization: California Polytechnic State University, San Luis Obispo
  11. Lines: 32
  12.  
  13. In article <1992Dec12.143219.1@camins.camosun.bc.ca> comptec91046@camins.camosun.bc.ca writes:
  14. >In article <1992Dec12.051026.29524@mnemosyne.cs.du.edu>, slindsay@nyx.cs.du.edu (Steve Lindsay) writes:
  15. >> 
  16. >> I am working with Borland C++ 3.1 and VGA trying to use the 
  17. >> Graphics.h library.  When I change my setbkcolor to BLUE and
  18. >> then change setcolor to BLACK (current drawing color) and try
  19. >> to draw it is not in black it is in blue.  Or at least I think it is
  20. >> blue because I cannot see the lines.  
  21. >> 
  22. >> What is the deal?  Does Graphics.h change the background color
  23. >> by changing color number 0 (BLACK) to what ever color I tell it 
  24. >> and then when I try to draw with number 0 (BLACK) it is not black
  25. >> but the same as my background color.
  26. >
  27. >I'm pretty sure that 0 isn't Black but is transparent)  I think Black is 4 or
  28. >something like that.
  29. >
  30. >Chris
  31. >
  32.  
  33. Nope.  0 is whatever you tell it to be (setrgbpalette()).  I would assume that
  34. setbkcolor() just changes the palette entries for color 0, causing the screen
  35. background, which is in color 0, to become the specified color.  ie:
  36. setbkcolor(BLUE) is equivilant to:  setrgbpalette(0,0,0,31).  Or whatever.
  37. I'm not sure what the RGB values are for BLUE, but that's pretty close.  So
  38. yes, the original poster was pretty much correct.
  39. +-----------------------------------+------------------------------------------+
  40. |                      Travis Cobbs | When you have to kill a man, it costs    |
  41. |           tcobbs@nike.calpoly.edu | nothing to be polite.                    |
  42. |       tcobbs@morpheus.calpoly.edu |   --Winston Churchill, On formal         |
  43. |    tcobbs@polyslo.csc.calpoly.edu |     declarations of war                  |
  44. +-----------------------------------+------------------------------------------+
  45.