Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!mephisto!prism!fsu!gw.scri.fsu.edu!pepke From: pepke@gw.scri.fsu.edu (Eric Pepke) Newsgroups: comp.sys.mac.programmer Subject: Re: Aligning Bitmaps Message-ID: <535@fsu.scri.fsu.edu> Date: 7 Mar 90 14:58:23 GMT References: Sender: news@fsu.scri.fsu.edu Organization: Florida State University, but I don't speak for them Lines: 24 In article jackiw@cs.swarthmore.edu (Nick Jackiw) writes: > A good example of when alignment won't help at all: storing the image > of a spaceship offscreen which can be copyBitted anywhere into the window. > ("Anywhere"=any of 32 bit positions=alignment will only help you in 1/32 > of your copies. Of course, you could store 32 differently-aligned spaceship > copies offscreen, and choose the appropriate one to blit based on the > dest rect.) I sometimes use an intermediate approach for offscreen bitmaps (not pixmaps). I keep an extra longword on the right of the bitmap on each row. When it comes time to plop this on the screen, I preshift the bits using a tight assembly loop. Of course, this only really helps when the bitmaps are pretty large. Eric Pepke INTERNET: pepke@gw.scri.fsu.edu Supercomputer Computations Research Institute MFENET: pepke@fsu Florida State University SPAN: scri::pepke Tallahassee, FL 32306-4052 BITNET: pepke@fsu Disclaimer: My employers seldom even LISTEN to my opinions. Meta-disclaimer: Any society that needs disclaimers has too many lawyers.