diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-01-31 18:57:34 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-02-06 19:24:14 +0000 |
commit | b951f35ea59e27a21a63b84ec1506974ceab27a0 (patch) | |
tree | e093bcd4ee9a3d2f72347a5b2340e3b5b264b47a /apps | |
parent | e0b9e65a09ebaa0d94b80b1504a2d285186125e3 (diff) | |
download | mupdf-b951f35ea59e27a21a63b84ec1506974ceab27a0.tar.xz |
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.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/mudraw.c | 1 | ||||
-rw-r--r-- | apps/pdfapp.c | 3 |
2 files changed, 3 insertions, 1 deletions
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) |