}
static GdkPixbuf *
-tiff_document_render_pixbuf (EvDocument *document, int page, double scale)
+tiff_document_render_pixbuf (EvDocument *document,
+ EvRenderContext *rc)
{
TiffDocument *tiff_document = TIFF_DOCUMENT (document);
int width, height;
g_return_val_if_fail (tiff_document->tiff != NULL, 0);
push_handlers ();
- if (TIFFSetDirectory (tiff_document->tiff, page) != 1)
+ if (TIFFSetDirectory (tiff_document->tiff, rc->page) != 1)
{
pop_handlers ();
return NULL;
pop_handlers ();
scaled_pixbuf = gdk_pixbuf_scale_simple (pixbuf,
- width * scale,
- height * scale,
+ width * rc->scale,
+ height * rc->scale,
GDK_INTERP_BILINEAR);
g_object_unref (pixbuf);
gint size,
gboolean border)
{
+ EvRenderContext *rc;
GdkPixbuf *pixbuf;
gdouble w, h;
page,
&w, &h);
- pixbuf = tiff_document_render_pixbuf (EV_DOCUMENT (document),
- page,
- size/w);
+ rc = ev_render_context_new (EV_ORIENTATION_PORTRAIT, page, size/w);
+ pixbuf = tiff_document_render_pixbuf (EV_DOCUMENT (document), rc);
+ g_object_unref (G_OBJECT (rc));
if (border)
{