summaryrefslogtreecommitdiff
path: root/xps/xps_path.c
diff options
context:
space:
mode:
Diffstat (limited to 'xps/xps_path.c')
-rw-r--r--xps/xps_path.c34
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.