Re: PangoXft and PangoFT2 patch from hell



Hans Breuer writes:
 > Yeah, exactly before writing the last mail. But probably my
 > local tree diverges somewhat with cvs due to Alex last commit
 > and some time restriction.

There are some strange stuff in that program. Like:

  if (cClrBits != 24)
    pbmi = (PBITMAPINFO) GlobalAlloc(LPTR,
				    sizeof(BITMAPINFOHEADER) +
				    sizeof(RGBQUAD) * (2^cClrBits));

What if cClrBits == 32?

What is that ^ (xor) operator doing there (and in another place)?
cut-and-paste from code written by somebody who thought ^ was an
exponentiation operator?

Also, if cClrBits >= 24, the biClrUsed field is never initialised.

There is also a bug in the creation the bitmap. The DC passed to
CreateCompatibleBitmap should be the DC of the window, not the memory
DC created by CreateCompatibleDC (as that memory DC initially has a
1x1 *monochrome* bitmap selected into it).

With these problems fixed, it works for me.

--tml




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]