Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!ugle.unit.no!nuug!ulrik!ikaros.uio.no!arne From: arne@ikaros.uio.no (Arne B. Huseby) Newsgroups: comp.sys.mac.programmer Subject: Re: How does one get the quickdraw global gray in an MDEF? Message-ID: <1991Jan10.130816.17975@ulrik.uio.no> Date: 10 Jan 91 13:08:16 GMT References: <1991Jan8.123124.12815@cs.mcgill.ca> Sender: news@ulrik.uio.no (USENET News System) Organization: Department of Mathematics, Univ. of Oslo Lines: 38 In article <1991Jan8.123124.12815@cs.mcgill.ca> monching@cs.mcgill.ca (Patrick WONG) writes: > I am using Think Pascal. Plus I'm writing a MDEF. If I wanted to set > the PenPat to gray. How would I get access to the quickdraw global gray? > > Thanks, > > pat The easiest trick to get around this problem entirely is simply to create a local version of the QD-global. This can be done as follows: var MyGray : array[1..2] of longint; .... MyGray[1]:=$55AA55AA; MyGray[2]:=$55AA55AA; ... To use this data in the program you must typecast it to type "pattern" e.g. like this: PenPat(pattern(MyGray)); By changing the data other patterns may be used as well, of cource. If you don't want to figure it out yourself, the HEX code for a specific pattern can be found in 'PAT '-resources. Use ResEdit and "Open general". Enjoy, Arne! ----------------------------------------- Arne B. Huseby Department of Mathematics University of Oslo P.o. Box 1053 Blindern N-0316 OSLO 3 NORWAY arne@ikaros.uio.no -----------------------------------------