1 /* this file is part of evince, a gnome document viewer
3 * Copyright (C) 2005 Jonathan Blandford <jrb@gnome.org>
5 * Evince is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * Evince is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
21 #include "ev-render-context.h"
23 static void ev_render_context_init (EvRenderContext *rc);
24 static void ev_render_context_class_init (EvRenderContextClass *class);
27 G_DEFINE_TYPE (EvRenderContext, ev_render_context, G_TYPE_OBJECT);
29 static void ev_render_context_init (EvRenderContext *rc) { /* Do Nothing */ }
32 ev_render_context_dispose (GObject *object)
36 rc = (EvRenderContext *) object;
39 (*rc->destroy) (rc->data);
43 (* G_OBJECT_CLASS (ev_render_context_parent_class)->dispose) (object);
47 ev_render_context_class_init (EvRenderContextClass *class)
51 oclass = G_OBJECT_CLASS (class);
53 oclass->dispose = ev_render_context_dispose;
58 ev_render_context_new (int rotation,
64 rc = (EvRenderContext *) g_object_new (EV_TYPE_RENDER_CONTEXT, NULL);
66 rc->rotation = rotation;
74 ev_render_context_set_page (EvRenderContext *rc,
77 g_return_if_fail (rc != NULL);
83 ev_render_context_set_rotation (EvRenderContext *rc,
86 g_return_if_fail (rc != NULL);
88 rc->rotation = rotation;
92 ev_render_context_set_scale (EvRenderContext *rc,
95 g_return_if_fail (rc != NULL);