Re: canvas dither support - round 3



mike engber <engber eazel com> writes:

> Ok, your changes are incorporated. Below are new patches for the two
> files they affected, gnome-canvas.[ch].

Looks good!  One final change from me; please put it in and feel free
to commit it.

> Index: gnome-canvas.c
> ===================================================================
> RCS file: /cvs/gnome/gnome-libs/libgnomeui/gnome-canvas.c,v
> retrieving revision 1.93.4.13
> diff -p -u -r1.93.4.13 gnome-canvas.c
> --- gnome-canvas.c	2000/06/29 04:20:38	1.93.4.13
> +++ gnome-canvas.c	2000/11/28 18:43:01
> @@ -2300,6 +2300,8 @@ gnome_canvas_init (GnomeCanvas *canvas)
>  	canvas->pick_event.crossing.x = 0;
>  	canvas->pick_event.crossing.y = 0;
>  
> +	canvas->dither = GDK_RGB_DITHER_NORMAL;
> +
>  	gtk_layout_set_hadjustment (GTK_LAYOUT (canvas), NULL);
>  	gtk_layout_set_vadjustment (GTK_LAYOUT (canvas), NULL);
>  
> @@ -3272,7 +3274,7 @@ paint (GnomeCanvas *canvas)
>  							    (draw_y1 - DISPLAY_Y1 (canvas)
>  							     + canvas->zoom_yofs),
>  							    width, height,
> -							    GDK_RGB_DITHER_NONE,
> +							    canvas->dither,
>  							    buf.buf,
>  							    IMAGE_WIDTH_AA * 3);

Make that call be the following:

					gdk_draw_rgb_image_dithalign (
						canvas->layout.bin_window,
						canvas->pixmap_gc,
						(draw_x1 - DISPLAY_X1 (canvas)
						 + canvas->zoom_xofs),
						(draw_y1 - DISPLAY_Y1 (canvas)
						 + canvas->zoom_yofs),
						width, height,
						canvas->dither,
						buf.buf,
						IMAGE_WIDTH_AA * 3,
						canvas->draw_xofs,
						canvas->draw_yofs);

This is so that the dither mask will be aligned properly.

All the rest looks good.  Please substitute that call for the
_dithalign() version and feel free to commit it.

Thanks!

  Federico

_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]