home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 14149 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  2.0 KB

  1. Path: sparky!uunet!gumby!wupost!bcm!lib!oac2
  2. From: cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Weird Quickdraw Bug w/ Geneva
  5. Message-ID: <cshotton-180892101517@oac2.hsc.uth.tmc.edu>
  6. Date: 18 Aug 1992 15:31:25 GMT
  7. Sender: usenet@lib.tmc.edu
  8. Followup-To: comp.sys.mac.programmer
  9. Organization: Academic Computing
  10. Lines: 48
  11. Nntp-Posting-Host: oac2.hsc.uth.tmc.edu
  12.  
  13. I've run into a VERY odd "feature" with a relatively simple piece of code.
  14. In the following code, InitWin is called to build a small window on the fly
  15. and set up the defaults for drawing later. At some point, the window is
  16. made visible and the event loop calls the UpdateWin routine to redraw the
  17. new window.
  18.  
  19. Here's the problem.  When 9 pt. Geneva is used, the text comes out as a
  20. VERY pale yellow (instead of the expected black). If any font besides
  21. Geneva is used, or any any size of Geneva BESIDES 9 pt, there is no
  22. problem.
  23.  
  24. This problem occurs on a Quadra 700 and IIci, both running Sys 7.01. The
  25. color aliasing happens in both 4 and 8 bit video modes on both machines.
  26. There are other windows in the program with custom palettes, but this
  27. window is left alone. None of the other windows has this problem. Anyone
  28. have any clues?
  29.  
  30. ------------------------------------------------------
  31.  
  32. WindowPtr buttonWin;
  33.  
  34. void InitWin()
  35. {
  36. Rect r;
  37.  
  38.    SetRect(&r, 100, 100, 400, 150);
  39.    buttonWin = NewCWindow(NULL, &r, "\pCommand Buttons", FALSE, 
  40.                           noGrowDocProc, NULL, TRUE, -1);
  41.       SetPort((WindowPtr) buttonWin);
  42.       TextFont(geneva);
  43.       TextSize(9);    /*** THIS is the problem?!?! Change to 10 and it
  44. works***/
  45. }
  46.  
  47. void UpdateWin()
  48. {
  49.     SetPort(buttonWin);
  50.     MoveTo(10,20);
  51.     DrawString("\pSome text.");
  52. }
  53.  
  54.  
  55. --_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
  56. Chuck Shotton                      |    
  57. Ass't Director, Academic Computing |       "This space for rent."
  58. UT Health Science Center Houston   |  
  59. cshotton@oac.hsc.uth.tmc.edu       |         
  60. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
  61.