Re: PangoXft and PangoFT2 patch from hell
- From: Tor Lillqvist <tml iki fi>
- To: Hans Breuer <hans breuer org>
- Cc: gtk-devel-list gnome org
- Subject: Re: PangoXft and PangoFT2 patch from hell
- Date: Wed, 21 Nov 2001 01:41:53 +0200 (FLE Standard Time)
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]