Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ames!apple!applelink.apple.com!MAC.ROMOS From: MAC.ROMOS@applelink.apple.com (Ian Hendry) Newsgroups: comp.sys.mac.programmer Subject: Re: rowBytes for a pixmap Message-ID: <2939@internal.Apple.COM> Date: 20 Jul 89 18:32:41 GMT References: <21104@andante.UUCP> Sender: usenet@Apple.COM Organization: Yeah, I'm organized. Lines: 18 In article <21104@andante.UUCP> bwb@andante.UUCP (Bruce Ballard) writes: > (depth * (Right - Left + 15) div 16) * 2 If you are using Color QuickDraw, then I *believe* you should be using a long word aligned width (rather than a word aligned width). I am 99% sure that ColorQD can go *much* faster if rowBytes is long aligned. The formula should read something like this: rowBytes := (depth * (Right - Left + 31) div 32) * 4; or for the C buffs: rowBytes = (depth * (Right - Left + 31) >> 5) << 2; Ian Hendry MAC.ROMOS@applelink.apple.com Make sure my name is in the subject of any Email, or post replies to network. TE: 408-974-4737 Disclaimer: It was all HIS idea anyway! Nothing I say reflects anything my employer means... or anything I mean for that matter.