Commit f5341257 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor
Browse files

Revert accidental changes from Federico's last commit.

2000-06-21  Owen Taylor  <otaylor@redhat.com>

	* gdk-pixbuf/testpixbuf-scale.c: Revert accidental changes
	from Federico's last commit.
parent ee089516
...@@ -29,41 +29,19 @@ gboolean ...@@ -29,41 +29,19 @@ gboolean
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data) expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
{ {
GdkPixbuf *dest; GdkPixbuf *dest;
GdkGC *gc;
GdkColormap *colormap;
GdkColor color;
color.red = 0xffff;
color.green = 0xffff;
color.blue = 0xffff;
gc = gdk_gc_new (widget->window);
colormap = gdk_window_get_colormap (widget->window);
gdk_colormap_alloc_color (colormap, &color, TRUE, TRUE);
gdk_gc_set_foreground (gc, &color);
gdk_draw_rectangle (widget->window, gc,
TRUE,
event->area.x,
event->area.y,
event->area.width, event->area.height);
gdk_window_set_back_pixmap (widget->window, NULL, FALSE); gdk_window_set_back_pixmap (widget->window, NULL, FALSE);
dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, event->area.width, event->area.height);
gdk_pixbuf_composite_color (pixbuf, dest,
0, 0, event->area.width, event->area.height,
-event->area.x, -event->area.y,
(double) widget->allocation.width / gdk_pixbuf_get_width (pixbuf),
(double) widget->allocation.height / gdk_pixbuf_get_height (pixbuf),
interp_type, overall_alpha,
event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555);
dest = gdk_pixbuf_get_from_drawable(NULL,
widget->window,
gdk_window_get_colormap (widget->window),
event->area.x,
event->area.y,
0, 0, event->area.width, event->area.height);
gdk_pixbuf_composite (pixbuf, dest,
0, 0, event->area.width, event->area.height,
-event->area.x, -event->area.y,
(double) widget->allocation.width / gdk_pixbuf_get_width (pixbuf),
(double) widget->allocation.height / gdk_pixbuf_get_height (pixbuf),
interp_type, overall_alpha);
gdk_pixbuf_render_to_drawable (dest, widget->window, widget->style->fg_gc[GTK_STATE_NORMAL], gdk_pixbuf_render_to_drawable (dest, widget->window, widget->style->fg_gc[GTK_STATE_NORMAL],
0, 0, event->area.x, event->area.y, 0, 0, event->area.x, event->area.y,
event->area.width, event->area.height, event->area.width, event->area.height,
......
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