Author: rjek
Date: Fri Feb 2 22:24:42 2007
New Revision: 3164
URL:
http://svn.semichrome.net?rev=3164&view=rev
Log:
Fix more off-by-ones in nsgtk's image plotting and clipping. AFAICT, this is now
perfect.
Modified:
trunk/netsurf/gtk/gtk_plotters.c
Modified: trunk/netsurf/gtk/gtk_plotters.c
URL:
http://svn.semichrome.net/trunk/netsurf/gtk/gtk_plotters.c?rev=3164&r...
==============================================================================
--- trunk/netsurf/gtk/gtk_plotters.c (original)
+++ trunk/netsurf/gtk/gtk_plotters.c Fri Feb 2 22:24:42 2007
@@ -195,15 +195,15 @@
#ifdef CAIRO_VERSION
if (option_render_cairo) {
cairo_reset_clip(current_cr);
- cairo_rectangle(current_cr, clip_x0 - 1, clip_y0 - 1,
- clip_x1 - clip_x0 + 1, clip_y1 - clip_y0 + 1);
+ cairo_rectangle(current_cr, clip_x0, clip_y0,
+ clip_x1 - clip_x0, clip_y1 - clip_y0);
cairo_clip(current_cr);
}
#endif
cliprect.x = clip_x0;
cliprect.y = clip_y0;
- cliprect.width = clip_x1 - clip_x0 + 1;
- cliprect.height = clip_y1 - clip_y0 + 1;
+ cliprect.width = clip_x1 - clip_x0;
+ cliprect.height = clip_y1 - clip_y0;
gdk_gc_set_clip_rectangle(current_gc, &cliprect);
return true;
}
@@ -275,9 +275,7 @@
if (width == 0 || height == 0)
return true;
- width++; /* TODO: investigate why this is required */
-
- if (gdk_pixbuf_get_width(pixbuf) == (width - 1) &&
+ if (gdk_pixbuf_get_width(pixbuf) == width &&
gdk_pixbuf_get_height(pixbuf) == height) {
gdk_draw_pixbuf(current_drawable, current_gc,
pixbuf,