Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/ps/ps-document.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2005-07-29 14:17:57 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-07-29 14:17:57 (GMT)
commit96ab01a78dafd62f121b11010a9857cbd9a7922c (patch)
tree7434b3a318aa57d7face694144efed048ba17e68 /ps/ps-document.c
parent596c9107204be24ac45fa02cc0cb59c238e09111 (diff)
Really make use of the orientation bit of the render context. Use the
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-ps-exporter.c: (ev_ps_exporter_do_page): * backend/ev-ps-exporter.h: * pdf/ev-poppler.cc: * ps/ps-document.c: (ps_document_document_iface_init), (ps_document_ps_export_do_page): * shell/ev-jobs.c: (ev_job_thumbnail_new), (ev_job_thumbnail_run): * shell/ev-jobs.h: * shell/ev-page-cache.c: (ev_page_cache_get_size), (ev_page_cache_get): * 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): * 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_extents), (ev_view_size_request_dual_page), (ev_view_size_request_single_page), (draw_one_page), (clear_caches), (ev_view_set_orientation), (ev_view_rotate_right), (ev_view_rotate_left), (ev_view_zoom_for_size_presentation), (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_get_page_size), (tiff_document_get_orientation), (rotate_pixbuf), (tiff_document_render_pixbuf), (tiff_document_document_iface_init), (tiff_document_thumbnails_get_thumbnail), (tiff_document_ps_export_do_page), (tiff_document_init): Really make use of the orientation bit of the render context. Use the render context in a few more places in the backend API. This regress orientation, but now it's done right. Will try to fix it up asap...
Diffstat (limited to 'ps/ps-document.c')
-rw-r--r--ps/ps-document.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/ps/ps-document.c b/ps/ps-document.c
index 4f38e6b..28c4374 100644
--- a/ps/ps-document.c
+++ b/ps/ps-document.c
@@ -1270,29 +1270,6 @@ ps_document_get_orientation (EvDocument *document)
}
static void
-ps_document_set_orientation (EvDocument *document, EvOrientation orientation)
-{
- PSDocument *ps = PS_DOCUMENT (document);
-
- g_return_if_fail (ps != NULL);
-
- switch (orientation) {
- case EV_ORIENTATION_PORTRAIT:
- ps->orientation = GTK_GS_ORIENTATION_PORTRAIT;
- break;
- case EV_ORIENTATION_LANDSCAPE:
- ps->orientation = GTK_GS_ORIENTATION_LANDSCAPE;
- break;
- case EV_ORIENTATION_UPSIDEDOWN:
- ps->orientation = GTK_GS_ORIENTATION_UPSIDEDOWN;
- break;
- case EV_ORIENTATION_SEASCAPE:
- ps->orientation = GTK_GS_ORIENTATION_SEASCAPE;
- break;
- }
-}
-
-static void
ps_document_document_iface_init (EvDocumentIface *iface)
{
iface->load = ps_document_load;
@@ -1301,7 +1278,6 @@ ps_document_document_iface_init (EvDocumentIface *iface)
iface->get_n_pages = ps_document_get_n_pages;
iface->get_page_size = ps_document_get_page_size;
iface->get_info = ps_document_get_info;
- iface->set_orientation = ps_document_set_orientation;
iface->get_orientation = ps_document_get_orientation;
}
@@ -1325,11 +1301,11 @@ ps_document_ps_export_begin (EvPSExporter *exporter, const char *filename,
}
static void
-ps_document_ps_export_do_page (EvPSExporter *exporter, int page)
+ps_document_ps_export_do_page (EvPSExporter *exporter, EvRenderContext *rc)
{
PSDocument *document = PS_DOCUMENT (exporter);
- document->ps_export_pagelist[page] = 1;
+ document->ps_export_pagelist[rc->page] = 1;
}
static void