diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-07-07 13:40:30 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-07-08 12:04:51 +0200 |
commit | 048948c9705c47b0ccd4ebf835d4612496ce6eb0 (patch) | |
tree | f8ee62da63fcca7d3f698b43f563ebf516fa0d8e /source/pdf/pdf-annot.c | |
parent | 5f11fd5eb7096d15f92abbb9d7d84d0c35eb8f53 (diff) | |
download | mupdf-048948c9705c47b0ccd4ebf835d4612496ce6eb0.tar.xz |
Slim pdf_annot struct: remove cached rect field.
Diffstat (limited to 'source/pdf/pdf-annot.c')
-rw-r--r-- | source/pdf/pdf-annot.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/pdf/pdf-annot.c b/source/pdf/pdf-annot.c index d06d9fa4..c5354c71 100644 --- a/source/pdf/pdf-annot.c +++ b/source/pdf/pdf-annot.c @@ -406,9 +406,11 @@ void pdf_transform_annot(fz_context *ctx, pdf_annot *annot) { fz_rect bbox = annot->ap->bbox; - fz_rect rect = annot->rect; + fz_rect rect; float w, h, x, y; + pdf_to_rect(ctx, pdf_dict_get(ctx, annot->obj, PDF_NAME_Rect), &rect); + fz_transform_rect(&bbox, &annot->ap->matrix); if (bbox.x1 == bbox.x0) w = 0; @@ -501,7 +503,7 @@ void pdf_load_annots(fz_context *ctx, pdf_document *doc, pdf_page *page, pdf_obj *annots, const fz_matrix *page_ctm) { pdf_annot *annot, **itr; - pdf_obj *obj, *ap, *as, *n, *rect; + pdf_obj *obj, *ap, *as, *n; int i, len, keep_annot; fz_matrix inv_page_ctm; @@ -558,7 +560,6 @@ pdf_load_annots(fz_context *ctx, pdf_document *doc, pdf_page *page, pdf_obj *ann doc->update_appearance(ctx, doc, annot); obj = annot->obj; - rect = pdf_dict_get(ctx, obj, PDF_NAME_Rect); ap = pdf_dict_get(ctx, obj, PDF_NAME_AP); as = pdf_dict_get(ctx, obj, PDF_NAME_AS); @@ -581,7 +582,6 @@ pdf_load_annots(fz_context *ctx, pdf_document *doc, pdf_page *page, pdf_obj *ann if (!pdf_is_stream(ctx, n)) n = pdf_dict_get(ctx, n, as); - pdf_to_rect(ctx, rect, &annot->rect); annot->ap = NULL; annot->annot_type = pdf_annot_obj_type(ctx, obj); annot->widget_type = annot->annot_type == FZ_ANNOT_WIDGET ? pdf_field_type(ctx, doc, obj) : PDF_WIDGET_TYPE_NOT_WIDGET; |