From b951f35ea59e27a21a63b84ec1506974ceab27a0 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Thu, 31 Jan 2013 18:57:34 +0000 Subject: Solve potential problems with partial update. When we run a display list we pass in an area for fast eliding of objects. Ensure that the area we pass in is always at least as big as the bbox with which we create display devices. --- apps/mudraw.c | 1 + apps/pdfapp.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/mudraw.c b/apps/mudraw.c index dd9386be..668dad41 100644 --- a/apps/mudraw.c +++ b/apps/mudraw.c @@ -469,6 +469,7 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum) fz_transform_rect(&tbounds, &ctm); } fz_round_rect(&ibounds, &tbounds); + fz_rect_from_bbox(&tbounds, &ibounds); /* TODO: banded rendering and multi-page ppm */ diff --git a/apps/pdfapp.c b/apps/pdfapp.c index f9ee5406..dab2a7b9 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -568,7 +568,7 @@ static void pdfapp_updatepage(pdfapp_t *app) fz_rect bounds; fz_bbox ibounds; fz_transform_rect(fz_bound_annot(app->doc, annot, &bounds), &ctm); - fz_round_rect(&ibounds, &bounds); + fz_rect_from_bbox(&bounds, fz_round_rect(&ibounds, &bounds)); fz_clear_pixmap_rect_with_value(app->ctx, app->image, 255, &ibounds); idev = fz_new_draw_device_with_bbox(app->ctx, app->image, &ibounds); @@ -651,6 +651,7 @@ static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int repai pdfapp_viewctm(&ctm, app); bounds = app->page_bbox; fz_round_rect(&ibounds, fz_transform_rect(&bounds, &ctm)); + fz_rect_from_bbox(&bounds, &ibounds); /* Draw */ if (app->image) -- cgit v1.2.3