Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!ncrlnk!ncrwic!encad!entec!jsurine From: jsurine@entec.Wichita.NCR.COM (James Surine) Newsgroups: comp.sys.apple2 Subject: Re: offscreen grafports in Orca/Pascal Message-ID: <648@entec.Wichita.NCR.COM> Date: 14 Aug 90 19:14:51 GMT References: <3980@rex.cs.tulane.edu> <639@entec.Wichita.NCR.COM> <43876@apple.Apple.COM> Reply-To: j.surine@wichita.ncr.com (James Surine) Organization: NCR Corporation, Wichita, KS Lines: 40 In article <43876@apple.Apple.COM> dlyons@Apple.COM (David A. Lyons) writes: >In article <639@entec.Wichita.NCR.COM> jsurine@entec.UUCP (James Surine) writes: >>The only resriction I have found in creating offscreen bitmaps is that some >>of the Quickdraw commands like copybits don't work if the total bitmap is >>larger than 32K (they're using stupid 16 bit integers again). >>For actual code, I've got some at home and will mail you a copy later. > >QuickDraw is supposed to support everything in the conceptual drawing space >(32768 by 32768 pixels, centered around (0,0)). If you've found something >that doesn't work in a large offscreen bitmap, please report it in detail >so we can fix it. >-- >David A. Lyons, Apple Computer, Inc. | DAL Systems Note it should read >64K not >32K. A while back I created a program that used a large bitmaps to store images. It was 32 x 8192 pixels or 128K in size. I used copyPixels, or which ever one does scaling, to copy 32 x 32 pixel bitmaps from this bitmap to another offscreen bitmap that was 512 x 512 pixels. I scaled the images by several values (2,4,8,...). This second bitmap was then used to copy the scaled 32 x 32 pixel bitmap to the screen to increase the speed of the screen refresh at all scale settings. I found that after copying the scaled imaged to the 512 x 512 pixel bitmap some of the 32 x 32 pixel images were duplicated. The algorith for copying the images was straightforward ( for i = 0 to 15 for j = 0 to 15) but two columns of images were duplicates (columns 11 and 13 I think). I could find no explanation except that the pixel copy didn't work very well above 64K for particular varaibles in the copying procedure. Also get and set pixel wraps around after 64K. I fixed the problem by changing the 32 x 8192 pixel bitmap to 256 sucessice 32 x 32 pixel bitmaps. And instead of referencing these by changing the copy rect I changed the bitmap pointer. Anyways thats the story. -- +=+ +=+ +=+ +=+ +=+ +=+ +=+ +=+ +=+ +=+ +=+ +=+ +=+ +=+ +=+ +=+ +=+ +=+ +=+ +=+ j.surine@Wichita.NCR.COM (Jim Surine) /\/\/\/\/\ NCR Peripheral Products Division, Wichita Kansas / / /\/\/\ \ \ work (316) 636-8586 home (316) 721-6280 / / / / /\ \ \ \ \