[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freetype] More bugs on Macintosh.
From: |
Werner LEMBERG |
Subject: |
Re: [Freetype] More bugs on Macintosh. |
Date: |
Fri, 12 Jul 2002 23:20:10 +0200 (CEST) |
> I tracked the difference between the last 3 releases, and ended up
> with the line of code Henry reported. This is definitely the place
> where the pb is, no doubt about it.
I know that also :-)
> I think you probably should just do the math with several values and
> you will notice that both ways of "rounding" are not identical :)
Well,
pitch1 = ( width + 7 ) >> 3;
gives me
width pitch1
---------------
1-8 1
9-16 2
...
and
pitch2 = ( ( width + 15 ) >> 4 ) << 1;
gives me
width pitch2
---------------
1-16 2
17-32 4
...
This is the intended result. The values of pitch2 are even, and
pitch2 is always greater or equal pitch1; the allocated memory for
bitmap->buffer is thus always big enough.
What am I missing? I couldn't find the place in ftraster.c where
`pitch' is used improperly or incorrectly.
Werner