Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!labrea!Portia!jessica.stanford.edu!rick From: rick@jessica.stanford.edu (Rick Wong) Newsgroups: comp.sys.mac.programmer Subject: Color QD fill problems Keywords: Color QuickDraw Message-ID: <1302@Portia.Stanford.EDU> Date: 5 Apr 89 04:05:58 GMT Sender: USENET News System Reply-To: rick@jessica.stanford.edu (Rick Wong) Organization: Stanford University Lines: 39 Could someone enlightened to the mysteries of Color QuickDraw tell me what's the problem with using its color fill routines (FillCRect, FillCOval, etc.)? The following program crashes on a Mac II: /* MacHeaders included */ #include main() { CGrafPort port; Rect r; PixPatHandle pp; InitGraf(&thePort); OpenCPort(&port); SetRect(&r, 0, 0, 100, 100); pp = NewPixPat(); CopyPixPat(port.pnPixPat, pp); FillCRect(&r, pp); /* This call seems to work */ FillCRect(&r, pp); /* This call crashes with a system error 25 */ CloseCPort(&port); } If I instead use MakeRGBPat to initialize the pixpat, the FillCRect calls seem okay. Using PaintRect (after calling PenPixPat) also seems to work. ADVthanksthanksthanksthanksthanksthanksthanksthanksthanksthanksANCE Rick Wong Stanford University rick@jessica.stanford.edu