1 /* imposter (OO.org Impress viewer)
2 ** Copyright (C) 2003-2005 Gurer Ozen
3 ** This code is free software; you can redistribute it and/or
4 ** modify it under the terms of GNU General Public License.
12 imp_create_context(const ImpDrawer *drw)
16 ctx = calloc(1, sizeof(ImpRenderCtx));
17 if (!ctx) return NULL;
23 imp_context_set_page(ImpRenderCtx *ctx, ImpPage *page)
26 ctx->content = page->doc->content;
27 ctx->styles = page->doc->styles;
31 imp_context_set_step(ImpRenderCtx *ctx, int step)
37 imp_render(ImpRenderCtx *ctx, void *drw_data)
39 // find drawing area size
40 ctx->drw->get_size(drw_data, &ctx->pix_w, &ctx->pix_h);
42 ctx->page->doc->get_geometry(ctx);
44 ctx->fact_x = ctx->pix_w / ctx->cm_w;
45 ctx->fact_y = ctx->pix_h / ctx->cm_h;
47 ctx->page->doc->render_page(ctx, drw_data);
51 imp_delete_context(ImpRenderCtx *ctx)