home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.graphics:13101 comp.os.msdos.programmer:11561 comp.msdos.programmer:109
- 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
- From: tcobbs@zeus.calpoly.edu (Travis Cobbs)
- Newsgroups: comp.graphics,comp.os.msdos.programmer,comp.msdos.programmer
- Subject: Re: bitmap
- Message-ID: <1992Dec21.210513.126592@zeus.calpoly.edu>
- Date: 21 Dec 92 21:05:13 GMT
- References: <1992Dec12.051026.29524@mnemosyne.cs.du.edu> <1992Dec12.143219.1@camins.camosun.bc.ca>
- Distribution: na
- Organization: California Polytechnic State University, San Luis Obispo
- Lines: 32
-
- In article <1992Dec12.143219.1@camins.camosun.bc.ca> comptec91046@camins.camosun.bc.ca writes:
- >In article <1992Dec12.051026.29524@mnemosyne.cs.du.edu>, slindsay@nyx.cs.du.edu (Steve Lindsay) writes:
- >>
- >> I am working with Borland C++ 3.1 and VGA trying to use the
- >> Graphics.h library. When I change my setbkcolor to BLUE and
- >> then change setcolor to BLACK (current drawing color) and try
- >> to draw it is not in black it is in blue. Or at least I think it is
- >> blue because I cannot see the lines.
- >>
- >> What is the deal? Does Graphics.h change the background color
- >> by changing color number 0 (BLACK) to what ever color I tell it
- >> and then when I try to draw with number 0 (BLACK) it is not black
- >> but the same as my background color.
- >
- >I'm pretty sure that 0 isn't Black but is transparent) I think Black is 4 or
- >something like that.
- >
- >Chris
- >
-
- Nope. 0 is whatever you tell it to be (setrgbpalette()). I would assume that
- setbkcolor() just changes the palette entries for color 0, causing the screen
- background, which is in color 0, to become the specified color. ie:
- setbkcolor(BLUE) is equivilant to: setrgbpalette(0,0,0,31). Or whatever.
- I'm not sure what the RGB values are for BLUE, but that's pretty close. So
- yes, the original poster was pretty much correct.
- +-----------------------------------+------------------------------------------+
- | Travis Cobbs | When you have to kill a man, it costs |
- | tcobbs@nike.calpoly.edu | nothing to be polite. |
- | tcobbs@morpheus.calpoly.edu | --Winston Churchill, On formal |
- | tcobbs@polyslo.csc.calpoly.edu | declarations of war |
- +-----------------------------------+------------------------------------------+
-