Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tiff
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2005-07-29 16:02:28 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-07-29 16:02:28 (GMT)
commit41229e9ef5135c93176acb6320f96abc7d624b0a (patch)
treef071ff5a68f1509869a937e6e42a61f0e53fb821 /tiff
parent646b17b09453da438218e6b86a2b8b830e5b73c0 (diff)
Use rotation rather than orientation. It's easier and enough for our
2005-07-29 Marco Pesenti Gritti <mpg@redhat.com> * backend/ev-document-thumbnails.c: (ev_document_thumbnails_get_thumbnail): * backend/ev-document-thumbnails.h: * backend/ev-document.c: * backend/ev-document.h: * backend/ev-render-context.c: (ev_render_context_new), (ev_render_context_set_rotation): * backend/ev-render-context.h: * pdf/ev-poppler.cc: * ps/ps-document.c: (ps_document_document_iface_init): * shell/ev-jobs.c: (ev_job_thumbnail_new), (ev_job_thumbnail_run): * shell/ev-jobs.h: * shell/ev-page-cache.c: (build_height_to_page), (ev_page_cache_new), (ev_page_cache_get_size), (ev_page_cache_get_max_width), (ev_page_cache_get_max_height), (ev_page_cache_get_height_to_page): * shell/ev-page-cache.h: * shell/ev-pixbuf-cache.c: (check_job_size_and_unref), (add_job_if_needed), (ev_pixbuf_cache_add_jobs_if_needed), (ev_pixbuf_cache_set_page_range), (new_selection_pixbuf_needed), (ev_pixbuf_cache_get_selection_pixbuf): * shell/ev-pixbuf-cache.h: * shell/ev-print-job.c: (idle_print_handler): * shell/ev-sidebar-thumbnails.c: (add_range): * shell/ev-view.c: (view_update_range_and_current_page), (get_page_y_offset), (get_page_extents), (ev_view_size_request_continuous_dual_page), (ev_view_size_request_continuous), (ev_view_size_request_dual_page), (ev_view_size_request_single_page), (draw_one_page), (ev_view_set_rotation), (ev_view_rotate_right), (ev_view_rotate_left), (ev_view_zoom_for_size_presentation), (ev_view_zoom_for_size_continuous_and_dual_page), (ev_view_zoom_for_size_continuous), (ev_view_zoom_for_size_dual_page), (ev_view_zoom_for_size_single_page), (compute_new_selection_text), (ev_view_select_all): * thumbnailer/evince-thumbnailer.c: (evince_thumbnail_pngenc_get): * tiff/tiff-document.c: (tiff_document_render_pixbuf), (tiff_document_document_iface_init), (tiff_document_thumbnails_get_thumbnail): Use rotation rather than orientation. It's easier and enough for our needs.
Diffstat (limited to 'tiff')
-rw-r--r--tiff/tiff-document.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/tiff/tiff-document.c b/tiff/tiff-document.c
index aba8851..d30ab18 100644
--- a/tiff/tiff-document.c
+++ b/tiff/tiff-document.c
@@ -176,30 +176,6 @@ tiff_document_get_page_size (EvDocument *document,
pop_handlers ();
}
-static EvOrientation
-tiff_document_get_orientation (EvDocument *document)
-{
- return EV_ORIENTATION_PORTRAIT;
-}
-
-static GdkPixbuf *
-rotate_pixbuf (EvDocument *document, EvOrientation orientation, GdkPixbuf *pixbuf)
-{
- TiffDocument *tiff_document = TIFF_DOCUMENT (document);
-
- switch (orientation)
- {
- case EV_ORIENTATION_LANDSCAPE:
- return gdk_pixbuf_rotate_simple (pixbuf, 90);
- case EV_ORIENTATION_UPSIDEDOWN:
- return gdk_pixbuf_rotate_simple (pixbuf, 180);
- case EV_ORIENTATION_SEASCAPE:
- return gdk_pixbuf_rotate_simple (pixbuf, 270);
- default:
- return g_object_ref (pixbuf);
- }
-}
-
static GdkPixbuf *
tiff_document_render_pixbuf (EvDocument *document,
EvRenderContext *rc)
@@ -281,7 +257,7 @@ tiff_document_render_pixbuf (EvDocument *document,
GDK_INTERP_BILINEAR);
g_object_unref (pixbuf);
- rotated_pixbuf = rotate_pixbuf (document, rc->orientation, scaled_pixbuf);
+ rotated_pixbuf = gdk_pixbuf_rotate_simple (scaled_pixbuf, rc->rotation);
g_object_unref (scaled_pixbuf);
return rotated_pixbuf;
@@ -332,13 +308,12 @@ tiff_document_document_iface_init (EvDocumentIface *iface)
iface->get_page_size = tiff_document_get_page_size;
iface->render_pixbuf = tiff_document_render_pixbuf;
iface->get_info = tiff_document_get_info;
- iface->get_orientation = tiff_document_get_orientation;
}
static GdkPixbuf *
tiff_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document,
gint page,
- EvOrientation orientation,
+ gint rotation,
gint size,
gboolean border)
{
@@ -350,7 +325,7 @@ tiff_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document,
page,
&w, &h);
- rc = ev_render_context_new (EV_ORIENTATION_PORTRAIT, page, size/w);
+ rc = ev_render_context_new (rotation, page, size/w);
pixbuf = tiff_document_render_pixbuf (EV_DOCUMENT (document), rc);
g_object_unref (G_OBJECT (rc));