static fz_rect * img_bound_page(fz_context *ctx, img_page *page, fz_rect *bbox) { fz_image *image = page->image; int xres, yres; fz_image_resolution(image, &xres, &yres); bbox->x0 = bbox->y0 = 0; bbox->x1 = image->w * DPI / xres; bbox->y1 = image->h * DPI / yres; return bbox; }
static void img_run_page(fz_context *ctx, img_page *page, fz_device *dev, const fz_matrix *ctm, fz_cookie *cookie) { fz_matrix local_ctm = *ctm; fz_image *image = page->image; int xres, yres; float w, h; fz_image_resolution(image, &xres, &yres); w = image->w * DPI / xres; h = image->h * DPI / yres; fz_pre_scale(&local_ctm, w, h); fz_fill_image(ctx, dev, image, &local_ctm, 1); }
static fz_rect cbz_bound_page(fz_context *ctx, fz_page *page_) { cbz_page *page = (cbz_page*)page_; fz_image *image = page->image; int xres, yres; fz_rect bbox; fz_image_resolution(image, &xres, &yres); bbox.x0 = bbox.y0 = 0; bbox.x1 = image->w * DPI / xres; bbox.y1 = image->h * DPI / yres; return bbox; }
static void cbz_run_page(fz_context *ctx, fz_page *page_, fz_device *dev, fz_matrix ctm, fz_cookie *cookie) { cbz_page *page = (cbz_page*)page_; fz_matrix local_ctm; fz_image *image = page->image; int xres, yres; float w, h; fz_image_resolution(image, &xres, &yres); w = image->w * DPI / xres; h = image->h * DPI / yres; local_ctm = fz_pre_scale(ctm, w, h); fz_fill_image(ctx, dev, image, local_ctm, 1, NULL); }