diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-04-03 15:58:56 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-04-03 16:01:29 +0200 |
commit | 8e0110dcba95b991fc397a8c1b70c97953b1b8d5 (patch) | |
tree | 139ff9ee932090765579fd1c8a0275c507d8f455 /xps/xps_path.c | |
parent | f2eeb7778b262dffe2fc3bc81b9c942b07c12a25 (diff) | |
download | mupdf-8e0110dcba95b991fc397a8c1b70c97953b1b8d5.tar.xz |
xps: Rearrange files, part three.
Diffstat (limited to 'xps/xps_path.c')
-rw-r--r-- | xps/xps_path.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/xps/xps_path.c b/xps/xps_path.c index 00e57bee..5674eac2 100644 --- a/xps/xps_path.c +++ b/xps/xps_path.c @@ -35,22 +35,6 @@ fz_currentpoint(fz_path *path) return c; } -void -xps_clip(xps_context *ctx, fz_matrix ctm, xps_resource *dict, char *clip_att, xml_element *clip_tag) -{ - fz_path *path; - int fill_rule = 0; - - if (clip_att) - path = xps_parse_abbreviated_geometry(ctx, clip_att, &fill_rule); - else if (clip_tag) - path = xps_parse_path_geometry(ctx, dict, clip_tag, 0, &fill_rule); - else - path = fz_newpath(); - ctx->dev->clippath(ctx->dev->user, path, fill_rule, ctm); - fz_freepath(path); -} - /* Draw an arc segment transformed by the matrix, we approximate with straight * line segments. We cannot use the fz_arc function because they only draw * circular arcs, we need to transform the line to make them elliptical but @@ -234,7 +218,7 @@ xps_draw_arc(fz_path *path, * build up a path. */ -fz_path * +static fz_path * xps_parse_abbreviated_geometry(xps_context *ctx, char *geom, int *fill_rule) { fz_path *path; @@ -762,6 +746,22 @@ xps_parse_line_cap(char *attr) return 0; } +void +xps_clip(xps_context *ctx, fz_matrix ctm, xps_resource *dict, char *clip_att, xml_element *clip_tag) +{ + fz_path *path; + int fill_rule = 0; + + if (clip_att) + path = xps_parse_abbreviated_geometry(ctx, clip_att, &fill_rule); + else if (clip_tag) + path = xps_parse_path_geometry(ctx, dict, clip_tag, 0, &fill_rule); + else + path = fz_newpath(); + ctx->dev->clippath(ctx->dev->user, path, fill_rule, ctm); + fz_freepath(path); +} + /* * Parse an XPS <Path> element, and call relevant ghostscript * functions for drawing and/or clipping the child elements. |