Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!ncar!midway!quads.uchicago.edu!jcav From: jcav@quads.uchicago.edu (john cavallino) Newsgroups: comp.sys.mac.programmer Subject: Re: Source code request Message-ID: <1991Apr19.184613.18406@midway.uchicago.edu> Date: 19 Apr 91 18:46:13 GMT References: <4c3JO2600WBLE0ZlJU@andrew.cmu.edu> <1608@babcock.cerc.wvu.wvnet.edu> <23407@unix.SRI.COM> Sender: news@midway.uchicago.edu (NewsMistress) Organization: University of Chicago Lines: 31 In article <23407@unix.SRI.COM> mxmora@unix.sri.com (Matt Mora) writes: >In article <1608@babcock.cerc.wvu.wvnet.edu> un020070@vaxa.wvnet.edu writes: >> VAR >> oldPort : GrafPtr; {saved port} >> offScreen : GrafPort; {our offscreen bitmap} >> ovalRect : Rect; {used for example drawing} >> >>the offscreen port and bitmap can be allocated with the following statements: >> >> GetPort(oldPort); >> OpenPort(@offScreen); > ^ > IS THAT RIGHT? > >I don't think you need the @ sign here. >Or at the other SetPort(@Offscreen); Actually, it is correct, but the style is somewhat yecchy. OpenPort takes a GrafPtr, the variable "offscreen" is a GrafPort, the "@" operator takes the address of something, so @offscreen give you a GrafPtr. It would be easier to read if there were an explicit variable of type GrafPtr. -- John Cavallino | EMail: jcav@midway.uchicago.edu University of Chicago Hospitals | USMail: 5841 S. Maryland Ave, Box 145 Office of Facilities Management | Chicago, IL 60637 B0 f++ w c+ g+ k s(+) e+ h- pv | Telephone: 312-702-6900