summaryrefslogtreecommitdiff
path: root/gfx
diff options
context:
space:
mode:
Diffstat (limited to 'gfx')
-rw-r--r--gfx/diff.c6
-rw-r--r--gfx/diff.h6
2 files changed, 7 insertions, 5 deletions
diff --git a/gfx/diff.c b/gfx/diff.c
index 824b37f..bbb8142 100644
--- a/gfx/diff.c
+++ b/gfx/diff.c
@@ -150,7 +150,7 @@ static void *diff_init(void)
}
-static void *diff_process_file(struct diff *diff, struct file_names *file_names,
+void *diff_process_file(struct diff *diff, struct file_names *file_names,
int argc, char *const *argv, const char *opts)
{
struct file_names *fn = file_names;
@@ -242,10 +242,6 @@ static bool diff_args(void *ctx, int argc, char *const *argv, const char *opts)
diff->new_gfx = diff_process_file(diff, &file_names, argc, argv, opts);
free_file_names(&file_names);
- diff->gfx = gfx_init(&cro_img_ops);
- if (!diff->gfx)
- return 0;
-
return gfx_args(diff->gfx, argc, argv, opts);
}
diff --git a/gfx/diff.h b/gfx/diff.h
index 5bee90c..90eb66d 100644
--- a/gfx/diff.h
+++ b/gfx/diff.h
@@ -20,6 +20,7 @@
#include "gfx/gfx.h"
#include "gfx/cro.h"
+#include "kicad/ext.h"
extern const struct gfx_ops diff_ops;
@@ -31,6 +32,8 @@ struct area {
struct area *next;
};
+struct diff;
+
void add_area(struct area **areas, int xa, int ya, int xb, int yb,
uint32_t color);
@@ -41,4 +44,7 @@ void diff_to_canvas(cairo_t *cr, int cx, int cy, float scale,
struct cro_ctx *new, struct cro_ctx *new_extra,
const struct area *areas);
+void *diff_process_file(struct diff *diff, struct file_names *file_names,
+ int argc, char *const *argv, const char *opts);
+
#endif /* !GFX_DIFF_H */