#if 0
log_printf("FIXME: send updated signal\n");
#endif
- DEBUG_1("%s pixbuf renderer updated - started drawing %p", get_exec_time(), pr);
+ DEBUG_1("%s pixbuf renderer updated - started drawing %p, img: %dx%d", get_exec_time(), pr, pr->image_width, pr->image_height);
pr->debug_updated = TRUE;
}
g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), FALSE);
g_return_val_if_fail(width != NULL && height != NULL, FALSE);
- if (!pr->pixbuf && !pr->source_tiles_enabled)
+ if (!pr->pixbuf && !pr->source_tiles_enabled && (!pr->image_width || !pr->image_height))
{
*width = 0;
*height = 0;
g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), FALSE);
g_return_val_if_fail(width != NULL && height != NULL, FALSE);
- if (!pr->pixbuf && !pr->source_tiles_enabled)
+ if (!pr->pixbuf && !pr->source_tiles_enabled && (!pr->image_width || !pr->image_height))
{
*width = 0;
*height = 0;
rect->height = pr->vis_height;
return TRUE;
}
+
+void pixbuf_renderer_set_size_early(PixbufRenderer *pr, guint width, guint height)
+{
+ gdouble zoom;
+ gint w, h;
+
+ zoom = pixbuf_renderer_zoom_get(pr);
+ pr->image_width = width;
+ pr->image_height = height;
+
+ pr_zoom_clamp(pr, zoom, PR_ZOOM_FORCE, NULL);
+
+ //w = width;
+ //h = height;
+
+ //pr->width = width;
+ //pr->height = height;
+}
+
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */