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.
20 #include "ev-render-context.h"
22 static void ev_render_context_init (EvRenderContext *rc);
23 static void ev_render_context_class_init (EvRenderContextClass *class);
26 G_DEFINE_TYPE (EvRenderContext, ev_render_context, G_TYPE_OBJECT);
28 static void ev_render_context_init (EvRenderContext *rc) { /* Do Nothing */ }
31 ev_render_context_dispose (GObject *object)
35 rc = (EvRenderContext *) object;
38 (*rc->destroy) (rc->data);
42 (* G_OBJECT_CLASS (ev_render_context_parent_class)->dispose) (object);
46 ev_render_context_class_init (EvRenderContextClass *class)
50 oclass = G_OBJECT_CLASS (class);
52 oclass->dispose = ev_render_context_dispose;
57 ev_render_context_new (int rotation,
63 rc = (EvRenderContext *) g_object_new (EV_TYPE_RENDER_CONTEXT, NULL);
65 rc->rotation = rotation;
73 ev_render_context_set_page (EvRenderContext *rc,
76 g_return_if_fail (rc != NULL);
82 ev_render_context_set_rotation (EvRenderContext *rc,
85 g_return_if_fail (rc != NULL);
87 rc->rotation = rotation;
91 ev_render_context_set_scale (EvRenderContext *rc,
94 g_return_if_fail (rc != NULL);