Article View: comp.os.os2.programmer
Article #120Re: How do I iterate through Physical Screen Colors?
From: David Charlap
Date: Mon, 02 Nov 1992 18:22
Date: Mon, 02 Nov 1992 18:22
22 lines
1908 bytes
1908 bytes
In article <Bx3H05.L0s@usenet.ucs.indiana.edu> sthiagar@bronze.ucs.indiana.edu (sivasailam thiagarajan) writes: > >Now that we have a working Palette Manager, we need a utility program >that'll display the physical colors that are currently available >onscreen. That is, I want to write a PM program that will draw filled >rectangles showing all the physical screen colors currently available. >(If you've seen COLORS.EXE for Windows, I want to do a PM version). My >problem is, the only way I know to select colors is by doing >GpiSetColor (hps, CLR_FOO), where CLR_FOO is a constant denoting an >"abstract" color (e.g., CLR_RED). But how do I simply iterate through >the physical colors from #0 to #255? Just do a GpiSetColor(hps, colorIndex); The GpiSetColor function sets drawing to the color specified at the given palette index. The constants like CLR_BLACK, CLR_RED, etc simply map to the numbers 0 through 15, which are the colors that you shouldn't remap unless you run out of spare palette entries. -- David Charlap |"there aren't 50,000 things for which it's worth writing dic5340@hertz.njit.edu| software; and the computer industry doesn't have enough ----------------------+ programmers to create that much good software. Therefore, most of it must be worthless" -- Boris Beizer "The Frozen Keyboard"
Technical Details
Message-ID:
<1992Nov2.182223.9326@njitgw.njit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!ogicse!decwrl!sun-barr!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340References:
<Bx3H05.L0s@usenet.ucs.indiana.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!decwrl!sun-barr!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340 From: dic5340@hertz.njit.edu (David Charlap) Newsgroups: comp.os.os2.programmer Subject: Re: How do I iterate through Physical Screen Colors? Message-ID: <1992Nov2.182223.9326@njitgw.njit.edu> Date: 2 Nov 92 18:22:23 GMT Article-I.D.: njitgw.1992Nov2.182223.9326 References: <Bx3H05.L0s@usenet.ucs.indiana.edu> Sender: news@njit.edu Distribution: na Organization: New Jersey Institute of Technology, Newark, N.J. Lines: 22 Nntp-Posting-Host: hertz.njit.edu