diff src/pixbuf-renderer.c @ 77:44f2223541d1

Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net> * pan-view.c: Recalc the size of the layout when popping up new images in the calendar so that all new images can be scrolled into view. * pixbuf-renderer.[ch] (pixbuf_renderer_set_tiles_size): Add ability to resize a tile canvas without the need for a complete reset/render.
author gqview
date Sun, 15 Oct 2006 14:49:25 +0000
parents 0c912a2d94f1
children a2b0a7b0b490
line wrap: on
line diff
--- a/src/pixbuf-renderer.c	Sun Oct 15 08:06:14 2006 +0000
+++ b/src/pixbuf-renderer.c	Sun Oct 15 14:49:25 2006 +0000
@@ -1577,6 +1577,21 @@
 	pr_redraw(pr, TRUE);
 }
 
+void pixbuf_renderer_set_tiles_size(PixbufRenderer *pr, gint width, gint height)
+{
+	g_return_if_fail(IS_PIXBUF_RENDERER(pr));
+	g_return_if_fail(width >= 32 && height > 32);
+
+	if (!pr->source_tiles_enabled) return;
+	if (pr->image_width == width && pr->image_height == height) return;
+
+	pr->image_width = width;
+	pr->image_height = height;
+
+	pr_zoom_sync(pr, pr->zoom, TRUE, FALSE, TRUE, FALSE, 0, 0);
+	pr_redraw(pr, TRUE);
+}
+
 gint pixbuf_renderer_get_tiles(PixbufRenderer *pr)
 {
 	g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), FALSE);