diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-03-13 20:25:38 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-03-13 20:59:19 +0000 |
commit | 3212863288c4ad6396482b8fdb14db2af27c123f (patch) | |
tree | 9d7c7efe3a585c538f6e8d0edd5e3a77b5b8b6b5 /xps/xps_path.c | |
parent | b6e9b2f8fe172d7175cea3d14d89f986688639af (diff) | |
parent | 33dc06b61c0816854193f006c35a9e797f098a22 (diff) | |
download | mupdf-3212863288c4ad6396482b8fdb14db2af27c123f.tar.xz |
Merge master and pg_android branches
Bring up to date with current APIs, including text device changes.
Diffstat (limited to 'xps/xps_path.c')
-rw-r--r-- | xps/xps_path.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/xps/xps_path.c b/xps/xps_path.c index 76b9bb21..337f144d 100644 --- a/xps/xps_path.c +++ b/xps/xps_path.c @@ -1,8 +1,7 @@ -#include "fitz.h" -#include "muxps.h" +#include "muxps-internal.h" -char * -xps_get_real_params(char *s, int num, float *x) +static char * +xps_parse_float_array(char *s, int num, float *x) { int k = 0; @@ -25,12 +24,12 @@ xps_get_real_params(char *s, int num, float *x) } char * -xps_get_point(char *s_in, float *x, float *y) +xps_parse_point(char *s_in, float *x, float *y) { char *s_out = s_in; float xy[2]; - s_out = xps_get_real_params(s_out, 2, &xy[0]); + s_out = xps_parse_float_array(s_out, 2, &xy[0]); *x = xy[0]; *y = xy[1]; return s_out; @@ -516,8 +515,8 @@ xps_parse_arc_segment(fz_context *doc, fz_path *path, xml_element *root, int str if (!is_stroked) *skipped_stroke = 1; - xps_get_point(point_att, &point_x, &point_y); - xps_get_point(size_att, &size_x, &size_y); + xps_parse_point(point_att, &point_x, &point_y); + xps_parse_point(size_att, &size_x, &size_y); rotation_angle = fz_atof(rotation_angle_att); is_large_arc = !strcmp(is_large_arc_att, "true"); is_clockwise = !strcmp(sweep_direction_att, "Clockwise"); @@ -559,7 +558,7 @@ xps_parse_poly_quadratic_bezier_segment(fz_context *doc, fz_path *path, xml_elem while (*s != 0) { while (*s == ' ') s++; - s = xps_get_point(s, &x[n], &y[n]); + s = xps_parse_point(s, &x[n], &y[n]); n ++; if (n == 2) { @@ -607,7 +606,7 @@ xps_parse_poly_bezier_segment(fz_context *doc, fz_path *path, xml_element *root, while (*s != 0) { while (*s == ' ') s++; - s = xps_get_point(s, &x[n], &y[n]); + s = xps_parse_point(s, &x[n], &y[n]); n ++; if (n == 3) { @@ -645,7 +644,7 @@ xps_parse_poly_line_segment(fz_context *doc, fz_path *path, xml_element *root, i while (*s != 0) { while (*s == ' ') s++; - s = xps_get_point(s, &x, &y); + s = xps_parse_point(s, &x, &y); if (stroking && !is_stroked) fz_moveto(doc, path, x, y); else @@ -678,7 +677,7 @@ xps_parse_path_figure(fz_context *doc, fz_path *path, xml_element *root, int str if (is_filled_att) is_filled = !strcmp(is_filled_att, "true"); if (start_point_att) - xps_get_point(start_point_att, &start_x, &start_y); + xps_parse_point(start_point_att, &start_x, &start_y); if (!stroking && !is_filled) /* not filled, when filling */ return; |