fixed pan-view drawing
authorVladimir Nadvornik <nadvornik@suse.cz>
Sat, 11 Aug 2012 23:30:28 +0000 (01:30 +0200)
committerVladimir Nadvornik <nadvornik@suse.cz>
Mon, 13 Aug 2012 19:40:07 +0000 (21:40 +0200)
src/renderer-tiles.c

index e5f5496..bcdcc54 100644 (file)
@@ -1203,7 +1203,7 @@ static gboolean rt_source_tile_render(RendererTiles *rt, ImageTile *it,
                                {
                                cairo_t *cr;
                                cr = cairo_create(it->surface);
-                               cairo_rectangle (cr, rx - st->x, ry - st->y, rw, rh);
+                               cairo_rectangle (cr, rx - it->x, ry - it->y, rw, rh);
 
                                if (st->blank)
                                        {
@@ -1215,7 +1215,7 @@ static gboolean rt_source_tile_render(RendererTiles *rt, ImageTile *it,
                                        }
                                else /* (pr->zoom == 1.0 || pr->scale == 1.0) */
                                        {
-                                       gdk_cairo_set_source_pixbuf(cr, st->pixbuf, it->x + st->x, it->y + st->y);
+                                       gdk_cairo_set_source_pixbuf(cr, st->pixbuf, -it->x + st->x, -it->y + st->y);
 #if 0
                                        gdk_draw_pixbuf(it->pixmap,
 #if GTK_CHECK_VERSION(2,20,0)