🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.mac
Article #7813

Changing a grafPort's portBits?

#7813
From: Anthony D. CXO1-2/N23 522-2072
Date: Thu, 30 Oct 1986 21:38
36 lines
1789 bytes
Does anyone know how to change the size of a grafPort's portBits
bitmap?  I am manipulating a 512x512 pixel image and need to increase
the size of portBits^.baseAddr from 314(?)x512 to 512x512 (also
changing portBits^.bounds to (0, 0, 512, 512), but that should be
easy: use SetRect).

There are a few of problems I'm having:

	(1) Whenever I use portBits^.baseAddr, I get an odd address
	    exception.  I'm using Lightspeed Pascal.

	(2) I don't know whether portBits^.baseAddr points to a
	    relocatable or non-relocatable block.  Do I use
	    RestoreHandle to get a handle from it, and then use
	    SetHandleSize, or do I use SetPtrSize?

	(3) When I create a brand new bitmap and assign it to portBits,
	    the  window toolbox routines get very confused
	    (i.e. the window changes to a different size,
	    no mouse-down events in the window work, etc.)
	   
Any help would be greatly appreciated.

Anthony

-----
Anthony Discolo
+---+---+---+---+---+---+---+
| d | i | g | i | t | a | l |
+---+---+---+---+---+---+---+
Database Systems Group
301 Rockrimmon Blvd. South
Mailstop CX01-2/N23
Colorado Springs, CO  80919
UUCP: ucbvax!decwrl!cookie.DEC!discolo
ARPA: cookie.DEC!discolo@decwrl.DEC.COM
Technical Details
Message-ID: <6166@decwrl.DEC.COM>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!sri-spam!nike!ucbcad!ucbvax!decwrl!cookie.dec.com!discolo

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!sri-spam!nike!ucbcad!ucbvax!decwrl!cookie.dec.com!discolo
From: discolo@cookie.dec.com (Anthony D. CXO1-2/N23 522-2072)
Newsgroups: net.micro.mac
Subject: Changing a grafPort's portBits?
Message-ID: <6166@decwrl.DEC.COM>
Date: Thu, 30-Oct-86 16:38:22 EST
Article-I.D.: decwrl.6166
Posted: Thu Oct 30 16:38:22 1986
Date-Received: Sat, 1-Nov-86 04:37:39 EST
Sender: daemon@decwrl.DEC.COM
Organization: Digital Equipment Corporation
Lines: 36