[comp.sys.mac.programmer] What changes do I need to align my bit/pixmap?

wirehead@oxy.edu (David J. Harr) (10/10/90)

Having steeped myself in the arcane lore of the unseen world (ie, offscreen
drawing) and wishing to make myself worthy to partake of the blessings as
outlined in the scriptures (ie, TN 277, "Of Time, Space and _CopyBits"), how
do I receive these great gifts of the gods? Or, to put it in more mundane
language, how do I change the code in Sample Code #15 to guarantee that my
bit/pixmaps will always be aligned to the longword boundaries of my window?
I have looked through the code fairly carefully, but nothing seems to leap
out at me as being the right place to put the magic incantation

   rowBytes = ((pixelDepth * ( bounds.right - bounds.left ) + 31) / 32) * 4;

so that all my bytes will pill be properly aligned. A simple pointer to the
correct procedure should be sufficient ( "Look *HERE*, stupid!" ). If anyone
else is interested leave me e-mail and I will let you know what I find out..

David

The preceding was another fine product of the warped mind of

		  wirehead@oxy.edu