From 76316cd7ec5e53b1acb797185b852f9874112c4d Mon Sep 17 00:00:00 2001 From: Michael Vrhel Date: Fri, 31 Aug 2018 16:43:45 -0700 Subject: Fix bit rot in gproof support. --- source/gprf/gprf-doc.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/source/gprf/gprf-doc.c b/source/gprf/gprf-doc.c index ff242001..aeec0ee4 100644 --- a/source/gprf/gprf-doc.c +++ b/source/gprf/gprf-doc.c @@ -1,4 +1,10 @@ #include "mupdf/fitz.h" +#include "../fitz/fitz-imp.h" +#include +#include +#include +#include +#include #if FZ_ENABLE_GPRF /* Choose whether to call gs via an exe or via an API */ @@ -10,8 +16,6 @@ #define GS_API_NULL_STDIO #endif -#include "mupdf/fitz.h" - #if defined(USE_GS_API) /* We are assumed to be using the DLL here */ @@ -153,17 +157,18 @@ gprf_drop_page_imp(fz_context *ctx, fz_page *page_) fz_drop_gprf_file(ctx, page->file); } -static fz_rect * -gprf_bound_page(fz_context *ctx, fz_page *page_, fz_rect *bbox) +static fz_rect +gprf_bound_page(fz_context *ctx, fz_page *page_) { gprf_page *page = (gprf_page*)page_; gprf_document *doc = page->doc; + fz_rect bbox; /* BBox is in points, not pixels */ - bbox->x0 = 0; - bbox->y0 = 0; - bbox->x1 = 72.0f * page->width / doc->res; - bbox->y1 = 72.0f * page->height / doc->res; + bbox.x0 = 0; + bbox.y0 = 0; + bbox.x1 = 72.0f * page->width / doc->res; + bbox.y1 = 72.0f * page->height / doc->res; return bbox; } -- cgit v1.2.3