diff options
Diffstat (limited to 'pdf/pdf_pattern.c')
-rw-r--r-- | pdf/pdf_pattern.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/pdf/pdf_pattern.c b/pdf/pdf_pattern.c index 9ffbee02..14175670 100644 --- a/pdf/pdf_pattern.c +++ b/pdf/pdf_pattern.c @@ -1,5 +1,5 @@ -#include "fitz.h" -#include "mupdf.h" +#include "fitz-internal.h" +#include "mupdf-internal.h" pdf_pattern * pdf_keep_pattern(fz_context *ctx, pdf_pattern *pat) @@ -19,7 +19,7 @@ pdf_free_pattern_imp(fz_context *ctx, fz_storable *pat_) pdf_pattern *pat = (pdf_pattern *)pat_; if (pat->resources) - fz_drop_obj(pat->resources); + pdf_drop_obj(pat->resources); if (pat->contents) fz_drop_buffer(ctx, pat->contents); fz_free(ctx, pat); @@ -34,13 +34,13 @@ pdf_pattern_size(pdf_pattern *pat) } pdf_pattern * -pdf_load_pattern(pdf_document *xref, fz_obj *dict) +pdf_load_pattern(pdf_document *xref, pdf_obj *dict) { pdf_pattern *pat; - fz_obj *obj; + pdf_obj *obj; fz_context *ctx = xref->ctx; - if ((pat = fz_find_item(ctx, pdf_free_pattern_imp, dict))) + if ((pat = pdf_find_item(ctx, pdf_free_pattern_imp, dict))) { return pat; } @@ -51,34 +51,34 @@ pdf_load_pattern(pdf_document *xref, fz_obj *dict) pat->contents = NULL; /* Store pattern now, to avoid possible recursion if objects refer back to this one */ - fz_store_item(ctx, dict, pat, pdf_pattern_size(pat)); + pdf_store_item(ctx, dict, pat, pdf_pattern_size(pat)); - pat->ismask = fz_to_int(fz_dict_gets(dict, "PaintType")) == 2; - pat->xstep = fz_to_real(fz_dict_gets(dict, "XStep")); - pat->ystep = fz_to_real(fz_dict_gets(dict, "YStep")); + pat->ismask = pdf_to_int(pdf_dict_gets(dict, "PaintType")) == 2; + pat->xstep = pdf_to_real(pdf_dict_gets(dict, "XStep")); + pat->ystep = pdf_to_real(pdf_dict_gets(dict, "YStep")); - obj = fz_dict_gets(dict, "BBox"); + obj = pdf_dict_gets(dict, "BBox"); pat->bbox = pdf_to_rect(ctx, obj); - obj = fz_dict_gets(dict, "Matrix"); + obj = pdf_dict_gets(dict, "Matrix"); if (obj) pat->matrix = pdf_to_matrix(ctx, obj); else pat->matrix = fz_identity; - pat->resources = fz_dict_gets(dict, "Resources"); + pat->resources = pdf_dict_gets(dict, "Resources"); if (pat->resources) - fz_keep_obj(pat->resources); + pdf_keep_obj(pat->resources); fz_try(ctx) { - pat->contents = pdf_load_stream(xref, fz_to_num(dict), fz_to_gen(dict)); + pat->contents = pdf_load_stream(xref, pdf_to_num(dict), pdf_to_gen(dict)); } fz_catch(ctx) { - fz_remove_item(ctx, pdf_free_pattern_imp, dict); + pdf_remove_item(ctx, pdf_free_pattern_imp, dict); pdf_drop_pattern(ctx, pat); - fz_throw(ctx, "cannot load pattern stream (%d %d R)", fz_to_num(dict), fz_to_gen(dict)); + fz_throw(ctx, "cannot load pattern stream (%d %d R)", pdf_to_num(dict), pdf_to_gen(dict)); } return pat; } |