From 0f57262e739af7584f072a100f58fa8b67eff9f4 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 4 Nov 2008 15:08:02 +0000 Subject: Fix offset of image display. --- src/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 000b1b9..4bfed54 100644 --- a/src/main.c +++ b/src/main.c @@ -532,9 +532,8 @@ surface_view_expose (GtkWidget *w, GdkEventExpose *ev) cr = gdk_cairo_create (w->window); gdk_cairo_region (cr, ev->region); cairo_clip (cr); - cairo_set_source_surface (cr, self->surface, - (w->allocation.width - cairo_image_surface_get_width (self->surface))/2, - (w->allocation.height - cairo_image_surface_get_height (self->surface))/2); + cairo_translate (cr, w->allocation.x, w->allocation.y); + cairo_set_source_surface (cr, self->surface, 0, 0); cairo_paint (cr); cairo_destroy (cr); -- cgit v1.2.3