summaryrefslogtreecommitdiff
path: root/kicad
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-25 04:11:38 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-25 04:11:38 -0300
commit6b1736fbc219bab2d5dbcca81b300a936f30f041 (patch)
treeaccfb6fb36192fda778739e98f67f9aaa14414f1 /kicad
parent758cb4f77f6d0cbef7fd9d54260b2d93690546cc (diff)
downloadeeshow-6b1736fbc219bab2d5dbcca81b300a936f30f041.tar.gz
eeshow-6b1736fbc219bab2d5dbcca81b300a936f30f041.tar.bz2
eeshow-6b1736fbc219bab2d5dbcca81b300a936f30f041.zip
kicad/lib-render.c (draw_pin_line): mark NC pins with a little X
Diffstat (limited to 'kicad')
-rw-r--r--kicad/lib-render.c19
1 files changed, 18 insertions, 1 deletions
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':