Commit 449f16b2 authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist
Browse files

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)
parent 097038c3
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> 2005-11-06 Michael Natterer <mitch@imendio.com>
* gtk/Makefile.am (icons): fixed rule to actually create the * gtk/Makefile.am (icons): fixed rule to actually create the
......
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> 2005-11-06 Michael Natterer <mitch@imendio.com>
* gtk/Makefile.am (icons): fixed rule to actually create the * gtk/Makefile.am (icons): fixed rule to actually create the
......
...@@ -756,11 +756,7 @@ pixbuf_to_hbitmaps_normal (GdkPixbuf *pixbuf, ...@@ -756,11 +756,7 @@ pixbuf_to_hbitmaps_normal (GdkPixbuf *pixbuf,
bmstride += 4 - (bmstride % 4); bmstride += 4 - (bmstride % 4);
/* MSDN says mask rows are aligned to "LONG" boundaries */ /* MSDN says mask rows are aligned to "LONG" boundaries */
maskstride = width / 8; maskstride = (((width + 31) & ~31) >> 3);
if (maskstride % 4 != 0)
maskstride += 4 - (maskstride % 4);
if (maskstride < 4) /* one word minimum */
maskstride = 4;
indata = gdk_pixbuf_get_pixels (pixbuf); indata = gdk_pixbuf_get_pixels (pixbuf);
rowstride = gdk_pixbuf_get_rowstride (pixbuf); rowstride = gdk_pixbuf_get_rowstride (pixbuf);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment