Correct the calculation of maskstride. (#320152, Peter Zelezny)

2005-11-07  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_normal):
	Correct the calculation of maskstride. (#320152, Peter Zelezny)
This commit is contained in:
Tor Lillqvist 2005-11-07 08:16:29 +00:00 committed by Tor Lillqvist
parent 097038c3e1
commit 449f16b238
3 changed files with 11 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2005-11-07 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_normal):
Correct the calculation of maskstride. (#320152, Peter Zelezny)
2005-11-06 Michael Natterer <mitch@imendio.com>
* gtk/Makefile.am (icons): fixed rule to actually create the

View File

@ -1,3 +1,8 @@
2005-11-07 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_normal):
Correct the calculation of maskstride. (#320152, Peter Zelezny)
2005-11-06 Michael Natterer <mitch@imendio.com>
* gtk/Makefile.am (icons): fixed rule to actually create the

View File

@ -756,11 +756,7 @@ pixbuf_to_hbitmaps_normal (GdkPixbuf *pixbuf,
bmstride += 4 - (bmstride % 4);
/* MSDN says mask rows are aligned to "LONG" boundaries */
maskstride = width / 8;
if (maskstride % 4 != 0)
maskstride += 4 - (maskstride % 4);
if (maskstride < 4) /* one word minimum */
maskstride = 4;
maskstride = (((width + 31) & ~31) >> 3);
indata = gdk_pixbuf_get_pixels (pixbuf);
rowstride = gdk_pixbuf_get_rowstride (pixbuf);