summaryrefslogtreecommitdiff
path: root/gfx.h
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-17 21:28:42 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-17 21:28:42 -0300
commit65ba1f11f0ca4bc191df128a28af5c12a330c110 (patch)
treef563a8bee6810fdc0eb25d7e82b08c1928f10ebd /gfx.h
parente803d8a5819097eb2fcb6f29264c47fa65ae2b85 (diff)
downloadeeshow-65ba1f11f0ca4bc191df128a28af5c12a330c110.tar.gz
eeshow-65ba1f11f0ca4bc191df128a28af5c12a330c110.tar.bz2
eeshow-65ba1f11f0ca4bc191df128a28af5c12a330c110.zip
eeshow/: move graphics low-level functions to gfx/
Diffstat (limited to 'gfx.h')
-rw-r--r--gfx.h72
1 files changed, 0 insertions, 72 deletions
diff --git a/gfx.h b/gfx.h
deleted file mode 100644
index 94425c0..0000000
--- a/gfx.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * gfx.h - Generate graphical output for Eeschema items
- *
- * Written 2016 by Werner Almesberger
- * Copyright 2016 by Werner Almesberger
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-
-#ifndef GFX_H
-#define GFX_H
-
-#include <stdbool.h>
-
-#include "text.h"
-
-
-struct gfx_ops {
- const char *name;
- void (*line)(void *ctx, int sx, int sy, int ex, int ey,
- int color, unsigned layer);
- void (*rect)(void *ctx, int sx, int sy, int ex, int ey,
- int color, int fill_color, unsigned layer);
- void (*poly)(void *ctx,
- int points, const int x[points], const int y[points],
- int color, int fill_color, unsigned layer);
- void (*circ)(void *ctx, int x, int y, int r,
- int color, int fill_color, unsigned layer);
- void (*arc)(void *ctx, int x, int y, int r, int sa, int ea,
- int color, int fill_color, unsigned layer);
- void (*text)(void *ctx, int x, int y, const char *s, unsigned size,
- enum text_align align, int rot, unsigned color, unsigned layer);
- void (*tag)(void *ctx, const char *s,
- int points, const int x[points], const int y[points]);
- unsigned (*text_width)(void *ctx, const char *s, unsigned size);
- void *(*init)(int argc, char *const *argv);
- void (*new_sheet)(void *ctx);
- void (*end)(void *ctx);
-};
-
-
-extern void *gfx_ctx;
-
-
-/* wrappers */
-
-void gfx_line(int sx, int sy, int ex, int ey, int color, unsigned layer);
-void gfx_rect(int sx, int sy, int ex, int ey,
- int color, int fill_color, unsigned layer);
-void gfx_poly(int points, const int x[points], const int y[points],
- int color, int fill_color, unsigned layer);
-void gfx_circ(int x, int y, int r, int color, int fill_color, unsigned layer);
-void gfx_arc(int x, int y, int r, int sa, int ea,
- int color, int fill_color, unsigned layer);
-void gfx_text(int x, int y, const char *s, unsigned size,
- enum text_align align, int rot, unsigned color, unsigned layer);
-void gfx_tag(const char *s,
- unsigned points, const int x[points], int const y[points]);
-unsigned gfx_text_width(const char *s, unsigned size);
-
-/* inititalization and termination */
-
-void gfx_init(const struct gfx_ops *ops, int argc, char *const *argv);
-void gfx_new_sheet(void);
-bool gfx_multi_sheet(void);
-void gfx_end(void);
-
-#endif /* !GFX_H */