home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 14166 < prev    next >
Encoding:
Text File  |  1992-08-18  |  2.4 KB  |  57 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!gumby!kzoo!k044477
  3. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  4. Subject: Re: Weird Quickdraw Bug w/ Geneva
  5. Message-ID: <1992Aug18.202015.13117@hobbes.kzoo.edu>
  6. Organization: Kalamazoo College
  7. References: <cshotton-180892101517@oac2.hsc.uth.tmc.edu> <1992Aug18.165219.3514@hobbes.kzoo.edu> <cshotton-180892123434@oac2.hsc.uth.tmc.edu>
  8. Date: Tue, 18 Aug 1992 20:20:15 GMT
  9. Lines: 46
  10.  
  11. cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton) writes:
  12. >k044477@hobbes.kzoo.edu (Jamie R. McCarthy) wrote:
  13. >> 
  14. >> cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton) writes:
  15. >> >
  16. >> >When 9 pt. Geneva is used, the text comes out as a
  17. >> >VERY pale yellow (instead of the expected black).
  18. >>
  19. >> Sounds like you're messing with the screen's color table, and not
  20. >> letting the system know that you're doing it.
  21. >> Theoretically, there's no way you can do this :-) if you're using the
  22. >> Palette Manager exclusively...
  23. >
  24. >OK, that makes sense. I am certainly NOT doing it on purpose. The only
  25. >color environment changes I THINK I'm making involve getting the palette
  26. >associated with a window and using SetPalette to assign the same palette to
  27. >several other windows (but not the one with the problem).
  28.  
  29. Hmmm.  This may be bad;  I've never seen a prohibition against having
  30. the same palette accessed by more than one window, but I've never seen
  31. anything allowing it either.  Try copying the palette before you
  32. re-assign it:
  33.  
  34. PaletteHandle myPlttHndl;
  35. myPlttHndl = GetPalette(window1);
  36. HandToHand( (Handle*) &myPlttHndl );
  37. SetPalette(window2, myPlttHndl, TRUE);
  38.  
  39. >you're saying that something is happening to the entire display (gdevice),
  40. >and not just individual windows, correct?
  41.  
  42. Yes;  the distinction's kind of artificial though...
  43.  
  44. >Do you have any suggestions as to how this color corruption might be
  45. >happening? Maybe calling SetPalette on a window that isn't open?
  46.  
  47. I don't believe I've ever had any problems with assigning a palette to a
  48. hidden window.
  49.  
  50. If the HandToHand trick fixes it, let me know--as I say, I don't know of
  51. any prohibitions against doing what you're doing.
  52. -- 
  53.  Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
  54.  "Merlin said, 'This is he.'  Then the Archbishop looked upon Arthur and he
  55.   beheld that the youth was very comely of face, wherefore his heart went out
  56.   unto Arthur and he loved him a very great deal."        (NEA grant denied.)
  57.