Cast to 32-bit integers when premultiplying, suggested by Keith Packard.

2004-07-28  Anders Carlsson  <andersca@gnome.org>

	* gdk/x11/gdkdrawable-x11.c (gdk_draw_rectangle_alpha_libgtk_only):
	Cast to 32-bit integers when premultiplying, suggested by Keith Packard.
This commit is contained in:
Anders Carlsson 2004-07-27 23:19:19 +00:00 committed by Anders Carlsson
parent a457b26f73
commit c7e31e3471
5 changed files with 23 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2004-07-28 Anders Carlsson <andersca@gnome.org>
* gdk/x11/gdkdrawable-x11.c (gdk_draw_rectangle_alpha_libgtk_only):
Cast to 32-bit integers when premultiplying, suggested by Keith Packard.
2004-07-27 Anders Carlsson <andersca@gnome.org>
* demos/gtk-demo/iconview.c: (do_iconview):

View File

@ -1,3 +1,8 @@
2004-07-28 Anders Carlsson <andersca@gnome.org>
* gdk/x11/gdkdrawable-x11.c (gdk_draw_rectangle_alpha_libgtk_only):
Cast to 32-bit integers when premultiplying, suggested by Keith Packard.
2004-07-27 Anders Carlsson <andersca@gnome.org>
* demos/gtk-demo/iconview.c: (do_iconview):

View File

@ -1,3 +1,8 @@
2004-07-28 Anders Carlsson <andersca@gnome.org>
* gdk/x11/gdkdrawable-x11.c (gdk_draw_rectangle_alpha_libgtk_only):
Cast to 32-bit integers when premultiplying, suggested by Keith Packard.
2004-07-27 Anders Carlsson <andersca@gnome.org>
* demos/gtk-demo/iconview.c: (do_iconview):

View File

@ -1,3 +1,8 @@
2004-07-28 Anders Carlsson <andersca@gnome.org>
* gdk/x11/gdkdrawable-x11.c (gdk_draw_rectangle_alpha_libgtk_only):
Cast to 32-bit integers when premultiplying, suggested by Keith Packard.
2004-07-27 Anders Carlsson <andersca@gnome.org>
* demos/gtk-demo/iconview.c: (do_iconview):

View File

@ -1511,9 +1511,9 @@ gdk_draw_rectangle_alpha_libgtk_only (GdkDrawable *drawable,
xdisplay = GDK_DISPLAY_XDISPLAY (gdk_drawable_get_display (drawable));
render_color.alpha = alpha;
render_color.red = color->red * render_color.alpha / 0xffff;
render_color.green = color->green * render_color.alpha / 0xffff;
render_color.blue = color->blue * render_color.alpha / 0xffff;
render_color.red = (guint32)color->red * render_color.alpha / 0xffff;
render_color.green = (guint32)color->green * render_color.alpha / 0xffff;
render_color.blue = (guint32)color->blue * render_color.alpha / 0xffff;
XRenderFillRectangle (xdisplay,
PictOpOver, pict, &render_color,