Path: utzoo!attcan!uunet!cbmvax!vu-vlsi!swatsun!jackiw From: jackiw@cs.swarthmore.edu (Nick Jackiw) Newsgroups: comp.sys.mac.programmer Subject: Re: help! large offscreen map Message-ID: <2328@ilium.cs.swarthmore.edu> Date: 18 Jan 89 17:15:25 GMT References: <1105@dogie.edu> Reply-To: jackiw@ilium.UUCP (Nick Jackiw) Organization: Visual Geometry Project, Swarthmore College, PA Lines: 33 In article <1105@dogie.edu> yahnke@vms.macc.wisc.edu (Ross Yahnke, MACC) writes: > In article <227700002@uxa.cso.uiuc.edu>, wwl90321@uxa.cso.uiuc.edu writes... > > >...Am I missing a mysterious third rect that produces > >the visible region? The book says never touch visrgn so I guess > >I won't. > > The book sez don't touch visrgn but go ahead and do it anyway. > So the solution is to go into the grafport and reassign it to an > infinitely large region. > Now don't forget to save it before hand and restore it either immediately after drawing to your offscreen map or immediately before copyblitzing from your map to the screen window/port. If you're leery about violating the rules (--and I agree with Ross that this is probably a trivial rule, if you understand the repercussions--), you can always create a separate grafPort to reference your offscreen bits (with OpenPort). This one, never touched by the Window Manager, is your own baby. OpenPort() will set its visRgn to "a rectangular region coincident with screenBits.bounds," which you'll want to dispose-and- replace (or merely resize) with an infinite region before using as a port. Peace of mind is only SizeOf(GrafPort) bytes away... -Nick. -- +-------------------+-jackiw@cs.swarthmore.edu / !rutgers!bpa!swatsun!jackiw-+ | nicholas jackiw | jackiw%campus.swarthmore.edu@swarthmr.bitnet | +-------------------+-VGP/MathDept/Swarthmore College, Swarthmore, PA 19081--+ PER ASPERA AD ASTRA