diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2013-09-05 18:49:09 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2013-09-08 08:21:19 -0500 |
commit | dc45e762170a9b642af588d1c067757ae6a6c683 (patch) | |
tree | ea4a127ffadb100a1dc4e2783366041d4fdda5b1 /source/fitz/svg-device.c | |
parent | 3408b6a59145df4389f38ba75e095c39bc1c699e (diff) | |
download | mupdf-dc45e762170a9b642af588d1c067757ae6a6c683.tar.xz |
Separate command and coordinate arrays in fz_path structure.
Diffstat (limited to 'source/fitz/svg-device.c')
-rw-r--r-- | source/fitz/svg-device.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/fitz/svg-device.c b/source/fitz/svg-device.c index e328a61a..273271e6 100644 --- a/source/fitz/svg-device.c +++ b/source/fitz/svg-device.c @@ -32,31 +32,31 @@ svg_dev_path(svg_device *sdev, fz_path *path) { fz_output *out = sdev->out; float x, y; - int i = 0; + int i, k; fz_printf(out, " d=\""); - while (i < path->len) + for (i = 0, k = 0; i < path->cmd_len; i++) { - switch (path->items[i++].k) + switch (path->cmds[i]) { case FZ_MOVETO: - x = path->items[i++].v; - y = path->items[i++].v; + x = path->coords[k++]; + y = path->coords[k++]; fz_printf(out, "M %g %g ", x, y); break; case FZ_LINETO: - x = path->items[i++].v; - y = path->items[i++].v; + x = path->coords[k++]; + y = path->coords[k++]; fz_printf(out, "L %g %g ", x, y); break; case FZ_CURVETO: - x = path->items[i++].v; - y = path->items[i++].v; + x = path->coords[k++]; + y = path->coords[k++]; fz_printf(out, "C %g %g ", x, y); - x = path->items[i++].v; - y = path->items[i++].v; + x = path->coords[k++]; + y = path->coords[k++]; fz_printf(out, "%g %g ", x, y); - x = path->items[i++].v; - y = path->items[i++].v; + x = path->coords[k++]; + y = path->coords[k++]; fz_printf(out, "%g %g ", x, y); break; case FZ_CLOSE_PATH: |