diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-11-04 15:08:02 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-11-04 15:08:02 +0000 |
commit | 0f57262e739af7584f072a100f58fa8b67eff9f4 (patch) | |
tree | fd0baa5330fbf9cc40b273068ef027c3330db273 /src/main.c | |
parent | 8fe2a9c3c458ef7205254f25e06ca5aa28bcb0f2 (diff) |
Fix offset of image display.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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); |