diff options
author | Jonathan Blandford <jrb@redhat.com> | 2005-06-30 05:44:28 (GMT) |
---|---|---|
committer | Jonathan Blandford <jrb@src.gnome.org> | 2005-06-30 05:44:28 (GMT) |
commit | e93b3a265bbc02546d230204402e3f41e83d6ab5 (patch) | |
tree | 9a56861f73e0b9a523a2d8cba2d817318a639605 /tiff | |
parent | a50ca0528a09e8e001c4600371048774e4029057 (diff) |
Massive changes. We now support text selection of pdfs, and not just
Thu Jun 30 01:43:00 2005 Jonathan Blandford <jrb@redhat.com>
* shell/*:
* backend/ev-render-context.[ch]:
* backend/ev-selection.[ch]:
Massive changes. We now support text selection of pdfs, and not
just rectangular selection. This is pretty broken still, but I
want to get something into CVS.
Diffstat (limited to 'tiff')
-rw-r--r-- | tiff/tiff-document.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tiff/tiff-document.c b/tiff/tiff-document.c index a4c8638..f2ed498 100644 --- a/tiff/tiff-document.c +++ b/tiff/tiff-document.c @@ -205,7 +205,8 @@ rotate_pixbuf (EvDocument *document, GdkPixbuf *pixbuf) } 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; @@ -219,7 +220,7 @@ tiff_document_render_pixbuf (EvDocument *document, int page, double scale) 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; @@ -266,8 +267,8 @@ tiff_document_render_pixbuf (EvDocument *document, int page, double scale) 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); @@ -332,6 +333,7 @@ tiff_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document, gint size, gboolean border) { + EvRenderContext *rc; GdkPixbuf *pixbuf; gdouble w, h; @@ -339,9 +341,9 @@ tiff_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document, 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) { |