Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!sdd.hp.com!ucsd!sdcc6!amos!jonah From: jonah@amos.ucsd.edu (Jonah Stich) Newsgroups: comp.sys.apple2 Subject: Re: offscreen grafports in Orca/Pascal Message-ID: <12237@sdcc6.ucsd.edu> Date: 10 Aug 90 05:29:05 GMT References: <3980@rex.cs.tulane.edu> <43826@apple.Apple.COM> Sender: news@sdcc6.ucsd.edu Organization: University of California, San Diego Lines: 32 Nntp-Posting-Host: amos.ucsd.edu In article <43826@apple.Apple.COM> dlyons@Apple.COM (David A. Lyons) writes: >In article <3980@rex.cs.tulane.edu> lang@rex.cs.tulane.edu (Raymond Lang) writes: >>How do you set up an offscreen grafport in Orca/Pascal for an image >>that is larger than the screen (i.e., greater than 640 pixels across >>by 200 pixels in height)? > >In summary, you need to allocate memory for the off-screen pixel map, >open a new grafport by calling OpenPort on a 170-byte chunk of memory, >and use SetLocInfo to set up the locInfo record of your grafport to >refer to your pixel map. Okay, I've been bitten by this before, so I just thought I'd chip in and warn you before you havev this problem, too. When you open a grafPort this way it sets up a visRgn that is the size of the screen. If you want to do things in this grafPort (I've had problems drawing text) you have to make the following call sequence: NewRgn OpenRgn (FrameRect, whatever...) CloseRgn SetVisHandle This is because, as it says in vol II of the TB Ref., drawing is clipped to the visRgn. Also burried in there is that the visRgn is handled by the window manager when the grafPort is associated with a window, but when it's not, it's up to you to take care of it. If you don't, you'll have problems with strange clipping. :( Also make sure that you get the port rect set properly. Hope this has helped! >David A. Lyons, Apple Computer, Inc. | DAL Systems Jonah