summaryrefslogtreecommitdiff
path: root/source/fitz/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz/path.c')
-rw-r--r--source/fitz/path.c75
1 files changed, 0 insertions, 75 deletions
diff --git a/source/fitz/path.c b/source/fitz/path.c
index 31ede8ec..b56d7b59 100644
--- a/source/fitz/path.c
+++ b/source/fitz/path.c
@@ -1346,81 +1346,6 @@ void fz_trim_path(fz_context *ctx, fz_path *path)
}
}
-void
-fz_print_path(fz_context *ctx, fz_output *out, fz_path *path, int indent)
-{
- float x, y;
- int i = 0, k = 0;
- int n;
- while (i < path->cmd_len)
- {
- uint8_t cmd = path->cmds[i++];
-
- for (n = 0; n < indent; n++)
- fz_write_byte(ctx, out, ' ');
- switch (cmd)
- {
- case FZ_MOVETO:
- case FZ_MOVETOCLOSE:
- x = path->coords[k++];
- y = path->coords[k++];
- fz_write_printf(ctx, out, "%g %g m%s\n", x, y, cmd == FZ_MOVETOCLOSE ? " z" : "");
- break;
- case FZ_LINETO:
- case FZ_LINETOCLOSE:
- x = path->coords[k++];
- y = path->coords[k++];
- fz_write_printf(ctx, out, "%g %g l%s\n", x, y, cmd == FZ_LINETOCLOSE ? " z" : "");
- break;
- case FZ_DEGENLINETO:
- case FZ_DEGENLINETOCLOSE:
- fz_write_printf(ctx, out, "d%s\n", cmd == FZ_DEGENLINETOCLOSE ? " z" : "");
- break;
- case FZ_HORIZTO:
- case FZ_HORIZTOCLOSE:
- x = path->coords[k++];
- fz_write_printf(ctx, out, "%g h%s\n", x, cmd == FZ_HORIZTOCLOSE ? " z" : "");
- break;
- case FZ_VERTTOCLOSE:
- case FZ_VERTTO:
- y = path->coords[k++];
- fz_write_printf(ctx, out, "%g i%s\n", y, cmd == FZ_VERTTOCLOSE ? " z" : "");
- break;
- case FZ_CURVETOCLOSE:
- case FZ_CURVETO:
- x = path->coords[k++];
- y = path->coords[k++];
- fz_write_printf(ctx, out, "%g %g ", x, y);
- x = path->coords[k++];
- y = path->coords[k++];
- fz_write_printf(ctx, out, "%g %g ", x, y);
- x = path->coords[k++];
- y = path->coords[k++];
- fz_write_printf(ctx, out, "%g %g c%s\n", x, y, cmd == FZ_CURVETOCLOSE ? " z" : "");
- break;
- case FZ_CURVETOVCLOSE:
- case FZ_CURVETOV:
- case FZ_CURVETOYCLOSE:
- case FZ_CURVETOY:
- x = path->coords[k++];
- y = path->coords[k++];
- fz_write_printf(ctx, out, "%g %g ", x, y);
- x = path->coords[k++];
- y = path->coords[k++];
- fz_write_printf(ctx, out, "%g %g %c%s\n", x, y, (cmd == FZ_CURVETOVCLOSE || cmd == FZ_CURVETOV ? 'v' : 'y'), (cmd == FZ_CURVETOVCLOSE || cmd == FZ_CURVETOYCLOSE) ? " z" : "");
- break;
- case FZ_RECTTO:
- x = path->coords[k++];
- y = path->coords[k++];
- fz_write_printf(ctx, out, "%g %g ", x, y);
- x = path->coords[k++];
- y = path->coords[k++];
- fz_write_printf(ctx, out, "%g %g r\n", x, y);
- break;
- }
- }
-}
-
const fz_stroke_state fz_default_stroke_state = {
-2, /* -2 is the magic number we use when we have stroke states stored on the stack */
FZ_LINECAP_BUTT, FZ_LINECAP_BUTT, FZ_LINECAP_BUTT,