diff options
author | Paul Gardiner <paulg.artifex@glidos.net> | 2013-08-02 12:29:45 +0100 |
---|---|---|
committer | Paul Gardiner <paulg.artifex@glidos.net> | 2013-08-02 12:29:45 +0100 |
commit | 98894e6fcecc92769c0ad614e285cffd541f528d (patch) | |
tree | 014dfb8a5a288ba030c0890b2313536e5f58c21d /source/pdf | |
parent | e27cb7840b7f7a1880806f0c3bdaae719ec01781 (diff) | |
download | mupdf-98894e6fcecc92769c0ad614e285cffd541f528d.tar.xz |
Correctly account for alterations to xobject matrix and bbox
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/pdf-appearance.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/pdf/pdf-appearance.c b/source/pdf/pdf-appearance.c index 53fe3627..04de4b0e 100644 --- a/source/pdf/pdf-appearance.c +++ b/source/pdf/pdf-appearance.c @@ -1372,7 +1372,8 @@ void pdf_set_annot_appearance(pdf_document *doc, pdf_annot *annot, fz_rect *rect else { pdf_xref_ensure_incremental_object(doc, pdf_to_num(ap_obj)); - pdf_dict_puts_drop(ap_obj, "Rect", pdf_new_rect(doc, &trect)); + /* Update bounding box and matrix in reused xobject obj */ + pdf_dict_puts_drop(ap_obj, "BBox", pdf_new_rect(doc, &trect)); pdf_dict_puts_drop(ap_obj, "Matrix", pdf_new_matrix(doc, &mat)); } @@ -1384,6 +1385,9 @@ void pdf_set_annot_appearance(pdf_document *doc, pdf_annot *annot, fz_rect *rect xobj = pdf_load_xobject(doc, ap_obj); if (xobj) { + /* Update bounding box and matrix also in the xobject structure */ + xobj->bbox = trect; + xobj->matrix = mat; xobj->iteration++; pdf_drop_xobject(ctx, xobj); } |