Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Wide offscreen bitmap won't receive draw commands Message-ID: <30803@ucbvax.BERKELEY.EDU> Date: 22 Aug 89 06:13:46 GMT References: <22321@andante.UUCP> <30755@ucbvax.BERKELEY.EDU> <34168@apple.Apple.COM> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Organization: School of Education, UC-Berkeley Lines: 29 When I tested it in 1987, Inside mac was wrong: you had to set the visRgn to the portRect, if the the bitmap was bigger than ScreenBits.bounds. And, it stands to reason that this should be so, since how would quickdraw know that thePort is just a port and not a window? Further, you do a ClipRect(&thePort->portRect) not to clip the image to the bitmap, QuickDraw will do that anyway, you do it, so if you record a picture in that port, then do a DrawPicture to some other port, if you adjust the location, a default clipRgn will overflow into an empty rectangle. Also, if you want fast drawing, create a pixMap the same depth as the destination. Sure Quickdraw will convert it up or down, but it is much faster to do it right yourself. Check out my Griffeath color cyclic automata program (freeware, archived on sumex-aim.stanford.edu) It uses optimized assemply language to diddle am offscreen 8-bit deep pixmap, then calls CopyBits to display it. Notice how much slower it runs if you set the screen to 4-bits per pixel instead of 8. --- David Phillip Oster 7 line signature follows Keith Sproul, head of microcomputer support at Union Carbide, NJ, complained about the poorly digitized fellatio on an IBM porno program. "Mac is better on everything, and this is no execption." -- "Computer Porn at the Office" by Reese Erlich, _This_World_, S.F. Chronicle, p.8, Aug 13, 1989 Arpa: oster@dewey.soe.berkeley.edu Uucp: {uwvax,decvax}!ucbvax!oster%dewey.soe.berkeley.edu