home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gumby!wupost!bcm!lib!oac2
- From: cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton)
- Newsgroups: comp.sys.mac.programmer
- Subject: Weird Quickdraw Bug w/ Geneva
- Message-ID: <cshotton-180892101517@oac2.hsc.uth.tmc.edu>
- Date: 18 Aug 1992 15:31:25 GMT
- Sender: usenet@lib.tmc.edu
- Followup-To: comp.sys.mac.programmer
- Organization: Academic Computing
- Lines: 48
- Nntp-Posting-Host: oac2.hsc.uth.tmc.edu
-
- I've run into a VERY odd "feature" with a relatively simple piece of code.
- In the following code, InitWin is called to build a small window on the fly
- and set up the defaults for drawing later. At some point, the window is
- made visible and the event loop calls the UpdateWin routine to redraw the
- new window.
-
- Here's the problem. When 9 pt. Geneva is used, the text comes out as a
- VERY pale yellow (instead of the expected black). If any font besides
- Geneva is used, or any any size of Geneva BESIDES 9 pt, there is no
- problem.
-
- This problem occurs on a Quadra 700 and IIci, both running Sys 7.01. The
- color aliasing happens in both 4 and 8 bit video modes on both machines.
- There are other windows in the program with custom palettes, but this
- window is left alone. None of the other windows has this problem. Anyone
- have any clues?
-
- ------------------------------------------------------
-
- WindowPtr buttonWin;
-
- void InitWin()
- {
- Rect r;
-
- SetRect(&r, 100, 100, 400, 150);
- buttonWin = NewCWindow(NULL, &r, "\pCommand Buttons", FALSE,
- noGrowDocProc, NULL, TRUE, -1);
- SetPort((WindowPtr) buttonWin);
- TextFont(geneva);
- TextSize(9); /*** THIS is the problem?!?! Change to 10 and it
- works***/
- }
-
- void UpdateWin()
- {
- SetPort(buttonWin);
- MoveTo(10,20);
- DrawString("\pSome text.");
- }
-
-
- --_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
- Chuck Shotton |
- Ass't Director, Academic Computing | "This space for rent."
- UT Health Science Center Houston |
- cshotton@oac.hsc.uth.tmc.edu |
- _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
-