summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-04-24 13:39:26 +0200
committerTor Andersson <tor.andersson@artifex.com>2017-04-27 15:12:03 +0200
commit9a725130b9b16daa332f8502e24eac9cab4cf9b2 (patch)
tree2068a7fde1f170411f90674049b902dc06ecaa13 /source/fitz
parentaf7461adcd082d60276b747eda66fec2684f3701 (diff)
downloadmupdf-9a725130b9b16daa332f8502e24eac9cab4cf9b2.tar.xz
Remove debug printing code.
It's not used, so prone to bit rot. Better to purge it.
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/draw-edge.c18
-rw-r--r--source/fitz/font.c26
-rw-r--r--source/fitz/path.c75
-rw-r--r--source/fitz/shade.c42
-rw-r--r--source/fitz/tree.c20
5 files changed, 0 insertions, 181 deletions
diff --git a/source/fitz/draw-edge.c b/source/fitz/draw-edge.c
index cb641b21..68c98690 100644
--- a/source/fitz/draw-edge.c
+++ b/source/fitz/draw-edge.c
@@ -264,24 +264,6 @@ struct fz_gel_s
fz_edge **active;
};
-#ifdef DUMP_GELS
-static void
-fz_dump_gel(fz_gel *gel)
-{
- int i;
-
- printf("%d edges\n", gel->len);
- for (i = 0; i < gel->len; i++)
- {
- fz_edge *e = &gel->edges[i];
- if (e->ydir > 0)
- printf("%d %d -> %d %d\n", e->x, e->y, e->x + e->h * e->xmove + e->xdir * e->h * e->adj_up / e->adj_down, e->y + e->h);
- else
- printf("%d %d -> %d %d\n", e->x + e->h * e->xmove + e->xdir * e->h * e->adj_up / e->adj_down, e->y + e->h, e->x, e->y);
- }
-}
-#endif
-
fz_gel *
fz_new_gel(fz_context *ctx)
{
diff --git a/source/fitz/font.c b/source/fitz/font.c
index 1ce8c89f..37d273ba 100644
--- a/source/fitz/font.c
+++ b/source/fitz/font.c
@@ -1356,32 +1356,6 @@ fz_render_t3_glyph_direct(fz_context *ctx, fz_device *dev, fz_font *font, int gi
font->t3run(ctx, font->t3doc, font->t3resources, contents, dev, &ctm, gstate, nested_depth);
}
-void
-fz_print_font(fz_context *ctx, fz_output *out, fz_font *font)
-{
- fz_write_printf(ctx, out, "font '%s' {\n", font->name);
-
- if (font->ft_face)
- {
- fz_write_printf(ctx, out, "\tfreetype face %p\n", font->ft_face);
- if (font->flags.ft_substitute)
- fz_write_printf(ctx, out, "\tsubstitute font\n");
- }
-
- if (font->t3procs)
- {
- fz_write_printf(ctx, out, "\ttype3 matrix [%g %g %g %g]\n",
- font->t3matrix.a, font->t3matrix.b,
- font->t3matrix.c, font->t3matrix.d);
-
- fz_write_printf(ctx, out, "\ttype3 bbox [%g %g %g %g]\n",
- font->bbox.x0, font->bbox.y0,
- font->bbox.x1, font->bbox.y1);
- }
-
- fz_write_printf(ctx, out, "}\n");
-}
-
fz_rect *
fz_bound_glyph(fz_context *ctx, fz_font *font, int gid, const fz_matrix *trm, fz_rect *rect)
{
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,
diff --git a/source/fitz/shade.c b/source/fitz/shade.c
index 783a8630..b7e746d7 100644
--- a/source/fitz/shade.c
+++ b/source/fitz/shade.c
@@ -1087,45 +1087,3 @@ fz_bound_shade(fz_context *ctx, fz_shade *shade, const fz_matrix *ctm, fz_rect *
}
return fz_transform_rect(s, &local_ctm);
}
-
-void
-fz_print_shade(fz_context *ctx, fz_output *out, fz_shade *shade)
-{
- int i;
-
- fz_write_printf(ctx, out, "shading {\n");
-
- switch (shade->type)
- {
- case FZ_FUNCTION_BASED: fz_write_printf(ctx, out, "\ttype function_based\n"); break;
- case FZ_LINEAR: fz_write_printf(ctx, out, "\ttype linear\n"); break;
- case FZ_RADIAL: fz_write_printf(ctx, out, "\ttype radial\n"); break;
- default: /* MESH */ fz_write_printf(ctx, out, "\ttype mesh\n"); break;
- }
-
- fz_write_printf(ctx, out, "\tbbox [%g %g %g %g]\n",
- shade->bbox.x0, shade->bbox.y0,
- shade->bbox.x1, shade->bbox.y1);
-
- fz_write_printf(ctx, out, "\tcolorspace %s\n", fz_colorspace_name(ctx, shade->colorspace));
-
- fz_write_printf(ctx, out, "\tmatrix [%g %g %g %g %g %g]\n",
- shade->matrix.a, shade->matrix.b, shade->matrix.c,
- shade->matrix.d, shade->matrix.e, shade->matrix.f);
-
- if (shade->use_background)
- {
- int n = fz_colorspace_n(ctx, shade->colorspace);
- fz_write_printf(ctx, out, "\tbackground [");
- for (i = 0; i < n; i++)
- fz_write_printf(ctx, out, "%s%g", i == 0 ? "" : " ", shade->background[i]);
- fz_write_printf(ctx, out, "]\n");
- }
-
- if (shade->use_function)
- {
- fz_write_printf(ctx, out, "\tfunction\n");
- }
-
- fz_write_printf(ctx, out, "}\n");
-}
diff --git a/source/fitz/tree.c b/source/fitz/tree.c
index 070bbc71..bdd042dc 100644
--- a/source/fitz/tree.c
+++ b/source/fitz/tree.c
@@ -105,23 +105,3 @@ void fz_drop_tree(fz_context *ctx, fz_tree *node, void (*dropfunc)(fz_context *c
fz_free(ctx, node);
}
}
-
-static void print_tree_imp(fz_context *ctx, fz_tree *node, int level)
-{
- int i;
- if (node->left != &tree_sentinel)
- print_tree_imp(ctx, node->left, level + 1);
- for (i = 0; i < level; i++)
- putchar(' ');
- printf("%s = %p (%d)\n", node->key, node->value, node->level);
- if (node->right != &tree_sentinel)
- print_tree_imp(ctx, node->right, level + 1);
-}
-
-void fz_debug_tree(fz_context *ctx, fz_tree *root)
-{
- printf("--- tree dump ---\n");
- if (root && root != &tree_sentinel)
- print_tree_imp(ctx, root, 0);
- printf("---\n");
-}