summaryrefslogtreecommitdiff
path: root/source/xps/xps-path.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-10-05 16:51:32 +0200
committerTor Andersson <tor.andersson@artifex.com>2015-10-06 11:20:30 +0200
commitbff6387d72f873f26f73b78d5f75a40f708197c3 (patch)
treefb8c120f26e0e5758e1b1f507d9e9a48117eed06 /source/xps/xps-path.c
parent56c0babe3bd6941382072a5b8209236d801a4201 (diff)
downloadmupdf-bff6387d72f873f26f73b78d5f75a40f708197c3.tar.xz
xps: Simplify transform attribute/tag parsing.
Diffstat (limited to 'source/xps/xps-path.c')
-rw-r--r--source/xps/xps-path.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/source/xps/xps-path.c b/source/xps/xps-path.c
index 8c352272..1d76a123 100644
--- a/source/xps/xps-path.c
+++ b/source/xps/xps-path.c
@@ -716,11 +716,7 @@ xps_parse_path_geometry(fz_context *ctx, xps_document *doc, xps_resource *dict,
*fill_rule = 0;
}
- transform = fz_identity;
- if (transform_att)
- xps_parse_render_transform(ctx, doc, transform_att, &transform);
- if (transform_tag)
- xps_parse_matrix_transform(ctx, doc, transform_tag, &transform);
+ xps_parse_transform(ctx, doc, transform_att, transform_tag, &transform, &fz_identity);
if (figures_att)
path = xps_parse_abbreviated_geometry(ctx, doc, figures_att, fill_rule);
@@ -817,7 +813,6 @@ xps_parse_path(fz_context *ctx, xps_document *doc, const fz_matrix *ctm, char *b
char *navigate_uri_att;
fz_stroke_state *stroke = NULL;
- fz_matrix transform;
float samples[FZ_MAX_COLORS];
fz_colorspace *colorspace;
fz_path *path = NULL;
@@ -967,12 +962,7 @@ xps_parse_path(fz_context *ctx, xps_document *doc, const fz_matrix *ctm, char *b
}
}
- transform = fz_identity;
- if (transform_att)
- xps_parse_render_transform(ctx, doc, transform_att, &transform);
- if (transform_tag)
- xps_parse_matrix_transform(ctx, doc, transform_tag, &transform);
- fz_concat(&local_ctm, &transform, ctm);
+ xps_parse_transform(ctx, doc, transform_att, transform_tag, &local_ctm, ctm);
if (clip_att || clip_tag)
xps_clip(ctx, doc, &local_ctm, dict, clip_att, clip_tag);