Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!sunic!tut!santra!kampi.hut.fi!jmunkki From: jmunkki@kampi.hut.fi (Juri Munkki) Newsgroups: comp.sys.mac.programmer Subject: Re: Finding the size of the screen under Multifinder/Color QD Message-ID: <1990Jan9.093544.9132@santra.uucp> Date: 9 Jan 90 09:35:44 GMT References: <10139@saturn.ucsc.edu> <9429@hoptoad.uucp> <1102@urbana.mcd.mot.com> <10164@saturn.ucsc.edu> <9490@hoptoad.uucp> <1990Jan5.234652.4485@santra.uucp> <9530@hoptoad.uucp> Sender: news@santra.uucp (Cnews - USENET news system) Reply-To: jmunkki@kampi.hut.fi (Juri Munkki) Organization: Helsinki University of Technology, FINLAND Lines: 22 In article <9530@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: >Nope. The OpenPort strategy doesn't work on color systems, at least >not in the simple way you seem to be suggesting. If you just look at >port.portBits.bounds, you'll be looking at something weird (a handle >followed by two integers) on color systems. Nope. You are confusing OpenCPort and OpenPort. OpenPort opens a regular grafport with a normal bitmap. I don't think that you bothered to look, but I did and even if I set my Mac II to 8 color, I get a rowBytes of 128 and a bounds of (0,0,480,640). Creating a pixmap for offscreen grafports would have created an enormous amount of incompatibility. OpenPort fakes a bitmap that looks just as if you had a 1-bit screen. That's why the old MacPaint and SuperPaint painted all over the top of the screen. They got a rowBytes of 128 when it actually is 8 times that much. (Although the screen is 640 pixels wide, Apple throws away a few bytes and uses 1024 pixels per row of which only 640 are displayed.) _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ | Juri Munkki jmunkki@hut.fi jmunkki@fingate.bitnet I Want Ne | | Helsinki University of Technology Computing Centre My Own XT | ^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^