summaryrefslogtreecommitdiff
path: root/kicad
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-25 11:43:10 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-25 11:43:10 -0300
commit673aade18a3e47118754bd2abc2b3479a5f4f39b (patch)
treed4d21c293be8255e1bdf7f468bce01a0e071c2d9 /kicad
parent06fd6964e9a3773fba73d760326bb9f561c611ba (diff)
downloadeeshow-673aade18a3e47118754bd2abc2b3479a5f4f39b.tar.gz
eeshow-673aade18a3e47118754bd2abc2b3479a5f4f39b.tar.bz2
eeshow-673aade18a3e47118754bd2abc2b3479a5f4f39b.zip
option -L to suppress page layout; non-interactive diff always implies -L
This means that we can now do things like eeshow 6a9f71:neo900.pro neo900_SS_5.sch -- \ diff -s 2 -o diff.png neo900.pro neo900_SS_5.sch
Diffstat (limited to 'kicad')
-rw-r--r--kicad/pl-render.c10
-rw-r--r--kicad/pl.h5
2 files changed, 15 insertions, 0 deletions
diff --git a/kicad/pl-render.c b/kicad/pl-render.c
index 961a51d..62652e3 100644
--- a/kicad/pl-render.c
+++ b/kicad/pl-render.c
@@ -28,6 +28,14 @@
/*
+ * For uses where we take libraries from a .pro but don't want the page layout,
+ * too. This is especially important in non-interactive diff mode.
+ */
+
+bool suppress_page_layout = 0;
+
+
+/*
* Eeschema works in mil
* Page layouts are in mm
*/
@@ -233,6 +241,8 @@ void pl_render(struct pl_ctx *pl, struct gfx *gfx, const struct sheet *sheets,
const struct pl_obj *obj;
int i;
+ if (suppress_page_layout)
+ return;
for (obj = pl->objs; obj; obj = obj->next)
for (i = 0; i != obj->repeat; i++)
render_obj(pl, obj, gfx, i, sheets, sheet);
diff --git a/kicad/pl.h b/kicad/pl.h
index 3f19347..c727115 100644
--- a/kicad/pl.h
+++ b/kicad/pl.h
@@ -14,6 +14,8 @@
#ifndef KICAD_PL_H
#define KICAD_PL_H
+#include <stdbool.h>
+
#include "gfx/gfx.h"
#include "file/file.h"
#include "kicad/sch.h"
@@ -22,6 +24,9 @@
struct pl_ctx;
+extern bool suppress_page_layout;
+
+
void pl_render(struct pl_ctx *pl, struct gfx *gfx,
const struct sheet *sheets, const struct sheet *sheet);