]> www.fi.muni.cz Git - evince.git/blob - backend/ev-ps-exporter.c
Really make use of the orientation bit of the render context. Use the
[evince.git] / backend / ev-ps-exporter.c
1 /* this file is part of evince, a gnome document viewer
2  *
3  *  Copyright (C) 2004 Martin Kretzschmar
4  *
5  *  Author:
6  *    Martin Kretzschmar <martink@gnome.org>
7  *
8  * Evince is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * Evince is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
21  */
22
23 #include "config.h"
24
25 #include "ev-ps-exporter.h"
26
27 GType
28 ev_ps_exporter_get_type (void)
29 {
30         static GType type = 0;
31
32         if (G_UNLIKELY (type == 0))
33         {
34                 static const GTypeInfo our_info =
35                 {
36                         sizeof (EvPSExporterIface),
37                         NULL,
38                         NULL,
39                 };
40
41                 type = g_type_register_static (G_TYPE_INTERFACE,
42                                                "EvPSExporter",
43                                                &our_info, (GTypeFlags)0);
44         }
45
46         return type;
47 }
48
49 void
50 ev_ps_exporter_begin (EvPSExporter *exporter, const char *filename,
51                       int first_page, int last_page,
52                       double paper_width, double paper_height, gboolean duplex)
53 {
54         EvPSExporterIface *iface = EV_PS_EXPORTER_GET_IFACE (exporter);
55
56         iface->begin (exporter, filename, first_page, last_page,
57                       paper_width, paper_height, duplex);
58 }
59
60 void
61 ev_ps_exporter_do_page  (EvPSExporter *exporter, EvRenderContext *rc)
62 {
63         EvPSExporterIface *iface = EV_PS_EXPORTER_GET_IFACE (exporter);
64
65         iface->do_page (exporter, rc);
66 }
67
68 void
69 ev_ps_exporter_end      (EvPSExporter *exporter)
70 {
71         EvPSExporterIface *iface = EV_PS_EXPORTER_GET_IFACE (exporter);
72
73         iface->end (exporter);
74 }