🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.mac
Article #846

Re: HELP!! QD picture recording driving me crazy

#846
From: Larry Rosenstein
Date: Sun, 17 Mar 1985 00:58
33 lines
2010 bytes
In article <tekcbi.193> larryh@tekcbi.UUCP (Larry Hutchinson) writes:
>
>Could some kind person please peruse the following code fragment and
>tell me what I am doing wrong?  I have read QuickDraw(3-2-83) and the
>Scrap Manager(11-16-83) about four zillion times without finding a
>clue.
>
The problem involved creating a picture with a certain bounds, and drawing
it into a different rectangle.

The answer is not explicity documented in the Quickdraw manual, but makes
sense if you think about it a little bit.

When you call OpenPicture, Quickdraw records the state of the current
port as the first information in the picture.  Part of this state includes
the clipping region.  In a new grafPort, the clipping region is set to a
huge rectangle.

If you draw the picture into a different rectangle, Quickdraw must modify
the clipping to account for the difference.  The problem comes in when the
huge clipping rectangle overflows a 16-bit integer because of this
calculcation.  If overflow does occur, then the clipping region will become
empty.

The solution is to set the clipping down to something smaller before
calling OpenPicture.  (You can always set it to the same bounds you pass to
OpenPicture.)

-- 
Larry Rosenstein

UUCP:  {nsc, dual, voder, ios}!apple!lsr
CSNET: lsr@Apple.CSNET
Technical Details
Message-ID: <33285@apple.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!bonnie!akgua!whuxlm!whuxl!houxm!mhuxt!mhuxr!ulysses!allegra!bellcore!decvax!decwrl!sun!idi!apple!lsr
References: <tekcbi.193>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1.chuqui 4/7/84; site apple.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!bonnie!akgua!whuxlm!whuxl!houxm!mhuxt!mhuxr!ulysses!allegra!bellcore!decvax!decwrl!sun!idi!apple!lsr
From: lsr@apple.UUCP (Larry Rosenstein)
Newsgroups: net.micro.mac
Subject: Re: HELP!! QD picture recording driving me crazy
Message-ID: <33285@apple.UUCP>
Date: Sat, 16-Mar-85 19:58:28 EST
Article-I.D.: apple.33285
Posted: Sat Mar 16 19:58:28 1985
Date-Received: Mon, 18-Mar-85 07:31:46 EST
References: <tekcbi.193>
Reply-To: lsr@apple.UUCP (Larry Rosenstein)
Organization: Macintosh Division, Apple Computer
Lines: 33