diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-07-05 14:44:48 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-07-06 13:54:49 +0200 |
commit | 7cb9579804102ea39ef76d237144b57331766df1 (patch) | |
tree | bc485caac64ce1b4e36018075ea51064c3a0dd81 /source/pdf/pdf-pattern.c | |
parent | cd2ae94337aa32e54f6a89945c2069024aad6d12 (diff) | |
download | mupdf-7cb9579804102ea39ef76d237144b57331766df1.tar.xz |
Add pdf_dict_get_rect and pdf_dict_get_matrix helpers.
Diffstat (limited to 'source/pdf/pdf-pattern.c')
-rw-r--r-- | source/pdf/pdf-pattern.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/pdf/pdf-pattern.c b/source/pdf/pdf-pattern.c index 5574a565..5a01bbcd 100644 --- a/source/pdf/pdf-pattern.c +++ b/source/pdf/pdf-pattern.c @@ -34,7 +34,6 @@ pdf_pattern * pdf_load_pattern(fz_context *ctx, pdf_document *doc, pdf_obj *dict) { pdf_pattern *pat; - pdf_obj *obj; if ((pat = pdf_find_item(ctx, pdf_drop_pattern_imp, dict)) != NULL) { @@ -56,12 +55,8 @@ pdf_load_pattern(fz_context *ctx, pdf_document *doc, pdf_obj *dict) pat->ismask = pdf_dict_get_int(ctx, dict, PDF_NAME(PaintType)) == 2; pat->xstep = pdf_dict_get_real(ctx, dict, PDF_NAME(XStep)); pat->ystep = pdf_dict_get_real(ctx, dict, PDF_NAME(YStep)); - - obj = pdf_dict_get(ctx, dict, PDF_NAME(BBox)); - pat->bbox = pdf_to_rect(ctx, obj); - - obj = pdf_dict_get(ctx, dict, PDF_NAME(Matrix)); - pat->matrix = pdf_to_matrix(ctx, obj); + pat->bbox = pdf_dict_get_rect(ctx, dict, PDF_NAME(BBox)); + pat->matrix = pdf_dict_get_matrix(ctx, dict, PDF_NAME(Matrix)); pat->resources = pdf_dict_get(ctx, dict, PDF_NAME(Resources)); if (pat->resources) |