summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gfx/style.h1
-rw-r--r--kicad/lib-render.c19
2 files changed, 19 insertions, 1 deletions
diff --git a/gfx/style.h b/gfx/style.h
index 9d422f4..f06bee2 100644
--- a/gfx/style.h
+++ b/gfx/style.h
@@ -102,6 +102,7 @@
#define MISSING_HEIGHT 300
#define PIN_R 25 /* radius and feature step */
+#define PIN_X_R 13 /* feature step for "NC" */
#define PIN_EXTRA_R 25 /* feature step */
diff --git a/kicad/lib-render.c b/kicad/lib-render.c
index 3e62bba..a2d4748 100644
--- a/kicad/lib-render.c
+++ b/kicad/lib-render.c
@@ -410,6 +410,23 @@ static void draw_pin_line(const struct lib_pin *pin, struct gfx *gfx,
gfx_poly(gfx, 2, x, y,
COLOR_COMP_DWG, COLOR_NONE, LAYER_COMP_DWG);
}
+
+ /*
+ * Crazy exception: pin type (etype) normally doesn't have any visible
+ * effect in eeschema - except if it's "not connected".
+ */
+ if (pin->etype == 'N') {
+ x[0] = pin->x - PIN_X_R;
+ y[0] = pin->y - PIN_X_R;
+ x[1] = pin->x + PIN_X_R;
+ y[1] = pin->y + PIN_X_R;
+ transform_poly(2, x, y, m);
+ gfx_poly(gfx, 2, x, y,
+ COLOR_COMP_DWG, COLOR_NONE, LAYER_COMP_DWG);
+ swap(x[0], x[1]);
+ gfx_poly(gfx, 2, x, y,
+ COLOR_COMP_DWG, COLOR_NONE, LAYER_COMP_DWG);
+ }
}
@@ -424,7 +441,7 @@ static void draw_pin_etype(const struct lib_pin *pin, struct gfx *gfx,
int i;
mx = (pin->x + pin->x + dx * pin->length) / 2;
- my = (pin->y + pin->y + dy * pin->length)/ 2;
+ my = (pin->y + pin->y + dy * pin->length) / 2;
switch (pin->etype) {
case 'I':