diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-07-07 15:25:46 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-07-08 17:21:23 +0200 |
commit | a7c01fa4e8b6db64e4f061197320d3dc9ad63067 (patch) | |
tree | ba84cf4a3205955ef7c3aa754658ed7a24dbb3c1 /source/pdf/pdf-appearance.c | |
parent | 84ae15f2c4c8fec4f4c67b5ef6a609ef0451c5bd (diff) | |
download | mupdf-a7c01fa4e8b6db64e4f061197320d3dc9ad63067.tar.xz |
Slim pdf_xobject struct: remove cached resources field.
The "contents" field is the same as the "obj" field, so can also be
removed.
Diffstat (limited to 'source/pdf/pdf-appearance.c')
-rw-r--r-- | source/pdf/pdf-appearance.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/pdf/pdf-appearance.c b/source/pdf/pdf-appearance.c index e2690c0c..6e03cb2b 100644 --- a/source/pdf/pdf-appearance.c +++ b/source/pdf/pdf-appearance.c @@ -778,7 +778,7 @@ static int get_matrix(fz_context *ctx, pdf_document *doc, pdf_xobject *form, int pdf_lexbuf lbuf; fz_stream *str; - str = pdf_open_stream(ctx, doc, pdf_to_num(ctx, form->contents)); + str = pdf_open_stream(ctx, doc, pdf_to_num(ctx, form->obj)); pdf_lexbuf_init(ctx, &lbuf, PDF_LEXBUF_SMALL); @@ -824,7 +824,7 @@ static int get_matrix(fz_context *ctx, pdf_document *doc, pdf_xobject *form, int if (found) { fz_rect bbox; - pdf_to_rect(ctx, pdf_dict_get(ctx, form->contents, PDF_NAME_BBox), &bbox); + pdf_to_rect(ctx, pdf_dict_get(ctx, form->obj, PDF_NAME_BBox), &bbox); switch (q) { @@ -1005,7 +1005,7 @@ static pdf_xobject *load_or_create_form(fz_context *ctx, pdf_document *doc, pdf_ pdf_update_xobject_contents(ctx, doc, form, fzbuf); } - copy_resources(ctx, form->resources, pdf_get_inheritable(ctx, doc, obj, PDF_NAME_DR)); + copy_resources(ctx, pdf_xobject_resources(ctx, form), pdf_get_inheritable(ctx, doc, obj, PDF_NAME_DR)); } fz_always(ctx) { @@ -1041,7 +1041,7 @@ static void update_marked_content(fz_context *ctx, pdf_document *doc, pdf_xobjec int first = 1; newbuf = fz_new_buffer(ctx, 0); - str_outer = pdf_open_stream(ctx, doc, pdf_to_num(ctx, form->contents)); + str_outer = pdf_open_stream(ctx, doc, pdf_to_num(ctx, form->obj)); len = fz_buffer_storage(ctx, fzbuf, &buf); str_inner = fz_open_memory(ctx, buf, len); @@ -1504,7 +1504,7 @@ void pdf_update_pushbutton_appearance(fz_context *ctx, pdf_document *doc, pdf_ob clip.x1 -= btotal; clip.y1 -= btotal; - get_font_info(ctx, doc, form->resources, da, &font_rec); + get_font_info(ctx, doc, pdf_xobject_resources(ctx, form), da, &font_rec); measure_text(ctx, doc, &font_rec, &fz_identity, text, &bounds); fz_translate(&mat, (rect.x1 - bounds.x1)/2, (rect.y1 - bounds.y1)/2); fzbuf_print_text(ctx, fzbuf, &clip, NULL, &font_rec, &mat, text); |