Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
windows:mingw:win32
mingw32-evince
0001-tiff-backend-use-cairo-for-printing.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-tiff-backend-use-cairo-for-printing.patch of Package mingw32-evince
From 8d4a8464898869fea29f08d6a192205bc2e407c6 Mon Sep 17 00:00:00 2001 From: Hib Eris <hib@hiberis.nl> Date: Tue, 7 Jun 2011 21:58:31 +0200 Subject: [PATCH] tiff backend: use cairo for printing --- backend/tiff/tiff-document.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/backend/tiff/tiff-document.c b/backend/tiff/tiff-document.c index 9c113b4..f00016c 100644 --- a/backend/tiff/tiff-document.c +++ b/backend/tiff/tiff-document.c @@ -33,6 +33,7 @@ #include "ev-document-misc.h" #include "ev-document-thumbnails.h" #include "ev-file-exporter.h" +#include "ev-document-print.h" #include "ev-file-helpers.h" struct _TiffDocumentClass @@ -55,6 +56,7 @@ typedef struct _TiffDocumentClass TiffDocumentClass; static void tiff_document_document_thumbnails_iface_init (EvDocumentThumbnailsInterface *iface); static void tiff_document_document_file_exporter_iface_init (EvFileExporterInterface *iface); +static void tiff_document_document_print_iface_init (EvDocumentPrintInterface *iface); EV_BACKEND_REGISTER_WITH_CODE (TiffDocument, tiff_document, { @@ -62,6 +64,9 @@ EV_BACKEND_REGISTER_WITH_CODE (TiffDocument, tiff_document, tiff_document_document_thumbnails_iface_init); EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER, tiff_document_document_file_exporter_iface_init); + EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_PRINT, + tiff_document_document_print_iface_init); + }); static TIFFErrorHandler orig_error_handler = NULL; @@ -526,6 +531,29 @@ tiff_document_document_file_exporter_iface_init (EvFileExporterInterface *iface) iface->get_capabilities = tiff_document_file_exporter_get_capabilities; } +/* EvDocumentPrint */ +static void +tiff_document_print_print_page (EvDocumentPrint *document, + EvPage *page, + cairo_t *cr) +{ + EvRenderContext *rc = ev_render_context_new (page, 0.0, 1.0); + cairo_surface_t *surface = tiff_document_render (EV_DOCUMENT (document), rc); + cairo_save (cr); + cairo_set_source_surface (cr, surface, 0, 0); + cairo_paint (cr); + cairo_restore (cr); + + cairo_surface_destroy (surface); + g_object_unref (rc); +} + +static void +tiff_document_document_print_iface_init (EvDocumentPrintInterface *iface) +{ + iface->print_page = tiff_document_print_print_page; +} + static void tiff_document_init (TiffDocument *tiff_document) { -- 1.7.4.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor