home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3368 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: andrew.cmu.edu!bo24+
  2. From: Berend Ozceri <bo24+@andrew.cmu.edu>
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: SetRGB32() doesn't do what it should...
  5. Date: Fri,  9 Feb 1996 02:16:37 -0500
  6. Organization: Masters student, Electrical and Computer Engineering, Carnegie Mellon, Pittsburgh, PA
  7. Message-ID: <gl6jHJ600iWZ0E=WYT@andrew.cmu.edu>
  8. References: <425.6611T1194T2896@ulysses.sax.de>
  9. NNTP-Posting-Host: po9.andrew.cmu.edu
  10. In-Reply-To: <425.6611T1194T2896@ulysses.sax.de>
  11.  
  12. Excerpts from netnews.comp.sys.amiga.programmer: 7-Feb-96 SetRGB32()
  13. doesn't do what .. by Robby Paehlig@ulysses.sa 
  14. > if(GfxBase = (struct GfxBase *)(OpenLibrary("graphics.library", 39L))) {
  15. >     if(wb = LockPubScreen("Workbench")) {
  16. >         SetRGB32(&(wb->ViewPort), 8, 0x0ul, 0x0ul, 0xFFul);
  17. > [...]
  18. >  
  19. > Well, the color changes -- not to blue, but to black! What I'm doing wrong?
  20.  
  21. As stated in the graphics.library auutodocs, SetRGB32() takes a 32-bit
  22. values per color channel so that it can be targetted to any graphics
  23. device. So, you need to change your call to:
  24.  
  25.          SetRGB32(&(wb->ViewPort), 8, 0x0ul, 0x0ul, 0xFFFFFFFFul);
  26.  
  27. Good luck,
  28.  
  29. Berend Ozceri
  30. Carnegie Mellon University
  31.  
  32.