mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 13:30:19 +00:00
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:
parent
097038c3e1
commit
449f16b238
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user