r5627 - trunk/eda/fped

werner at docs.openmoko.org werner at docs.openmoko.org
Fri Sep 11 20:34:51 CEST 2009


Author: werner
Date: 2009-09-11 20:34:51 +0200 (Fri, 11 Sep 2009)
New Revision: 5627

Modified:
   trunk/eda/fped/README
   trunk/eda/fped/dump.c
   trunk/eda/fped/fpd.y
   trunk/eda/fped/gui_inst.c
   trunk/eda/fped/gui_style.c
   trunk/eda/fped/gui_style.h
   trunk/eda/fped/kicad.c
   trunk/eda/fped/obj.h
   trunk/eda/fped/postscript.c
Log:
- added solder mask pad type (patch by Rene Harder)



Modified: trunk/eda/fped/README
===================================================================
--- trunk/eda/fped/README	2009-09-10 23:40:03 UTC (rev 5626)
+++ trunk/eda/fped/README	2009-09-11 18:34:51 UTC (rev 5627)
@@ -227,6 +227,7 @@
 (default)	copper, solder mask, and solder paste
 bare		copper and solder mask
 paste		solder paste
+mask		solder mask
 
 
 Rounded pads

Modified: trunk/eda/fped/dump.c
===================================================================
--- trunk/eda/fped/dump.c	2009-09-10 23:40:03 UTC (rev 5626)
+++ trunk/eda/fped/dump.c	2009-09-11 18:34:51 UTC (rev 5627)
@@ -328,6 +328,9 @@
 		case pt_paste:
 			s2 = " paste";
 			break;
+		case pt_mask:
+			s2 = " mask";
+			break;
 		default:
 			abort();
 		}

Modified: trunk/eda/fped/fpd.y
===================================================================
--- trunk/eda/fped/fpd.y	2009-09-10 23:40:03 UTC (rev 5626)
+++ trunk/eda/fped/fpd.y	2009-09-11 18:34:51 UTC (rev 5627)
@@ -521,6 +521,8 @@
 				$$ = pt_bare;
 			else if (!strcmp($1, "paste"))
 				$$ = pt_paste;
+			else if (!strcmp($1, "mask"))
+				$$ = pt_mask;
 			else {
 				yyerrorf("unknown pad type \"%s\"", $1);
 				YYABORT;

Modified: trunk/eda/fped/gui_inst.c
===================================================================
--- trunk/eda/fped/gui_inst.c	2009-09-10 23:40:03 UTC (rev 5626)
+++ trunk/eda/fped/gui_inst.c	2009-09-11 18:34:51 UTC (rev 5627)
@@ -263,8 +263,17 @@
 	struct coord max = translate(self->u.pad.other);
 	GdkGC *gc;
 
-	gc = self->obj->u.pad.type == pt_bare ?
-	    gc_pad_bare[get_mode(self)] : gc_pad[get_mode(self)];
+	switch (self->obj->u.pad.type) {
+	case pt_bare:
+		gc = gc_pad_bare[get_mode(self)];
+		break;
+	case pt_mask:
+		gc = gc_pad_mask[get_mode(self)];
+		break;
+	default:
+		gc = gc_pad[get_mode(self)];
+		break;		
+	}
 	sort_coord(&min, &max);
 	gdk_draw_rectangle(DA, gc, TRUE,
 	    min.x, min.y, max.x-min.x, max.y-min.y);
@@ -280,8 +289,17 @@
 	GdkGC *gc;
 	unit_type h, w, r;
 
-	gc = self->obj->u.pad.type == pt_bare ?
-	    gc_pad_bare[get_mode(self)] : gc_pad[get_mode(self)];
+	switch (self->obj->u.pad.type) {
+	case pt_bare:
+		gc = gc_pad_bare[get_mode(self)];
+		break;
+	case pt_mask:
+		gc = gc_pad_mask[get_mode(self)];
+		break;
+	default:
+		gc = gc_pad[get_mode(self)];
+		break;		
+	}
 	sort_coord(&min, &max);
 	h = max.y-min.y;
 	w = max.x-min.x;

Modified: trunk/eda/fped/gui_style.c
===================================================================
--- trunk/eda/fped/gui_style.c	2009-09-10 23:40:03 UTC (rev 5626)
+++ trunk/eda/fped/gui_style.c	2009-09-11 18:34:51 UTC (rev 5627)
@@ -26,6 +26,7 @@
 GdkGC *gc_obj[mode_n];
 GdkGC *gc_pad[mode_n];
 GdkGC *gc_pad_bare[mode_n];
+GdkGC *gc_pad_mask[mode_n];
 GdkGC *gc_ptext[mode_n];
 GdkGC *gc_meas[mode_n];
 GdkGC *gc_frame[mode_n];
@@ -65,6 +66,7 @@
 	style(gc_obj,		"#006060", "#00ffff", "#ffff80");
 	style(gc_pad,		"#400000", "#ff0000", "#ffff80");
 	style(gc_pad_bare,	"#402000", "#ff6000", "#ffff80");
+	style(gc_pad_mask,	"#000040", "#0000ff", "#ffff80");
 	style(gc_ptext,		"#404040", "#ffffff", "#ffffff");
 	style(gc_meas,		"#280040", "#ff00ff", "#ffff80");
 	style(gc_frame,		"#005000", "#009000", "#ffff80");

Modified: trunk/eda/fped/gui_style.h
===================================================================
--- trunk/eda/fped/gui_style.h	2009-09-10 23:40:03 UTC (rev 5626)
+++ trunk/eda/fped/gui_style.h	2009-09-11 18:34:51 UTC (rev 5627)
@@ -110,6 +110,7 @@
 extern GdkGC *gc_obj[mode_n];
 extern GdkGC *gc_pad[mode_n];
 extern GdkGC *gc_pad_bare[mode_n];
+extern GdkGC *gc_pad_mask[mode_n];
 extern GdkGC *gc_ptext[mode_n];
 extern GdkGC *gc_meas[mode_n];
 extern GdkGC *gc_frame[mode_n];

Modified: trunk/eda/fped/kicad.c
===================================================================
--- trunk/eda/fped/kicad.c	2009-09-10 23:40:03 UTC (rev 5626)
+++ trunk/eda/fped/kicad.c	2009-09-11 18:34:51 UTC (rev 5627)
@@ -98,6 +98,9 @@
 	case pt_paste:
 		layers = 1 << layer_paste_top;
 		break;
+	case pt_mask:
+		layers = 1 << layer_mask_top;
+		break;
 	default:
 		abort();
 	}

Modified: trunk/eda/fped/obj.h
===================================================================
--- trunk/eda/fped/obj.h	2009-09-10 23:40:03 UTC (rev 5626)
+++ trunk/eda/fped/obj.h	2009-09-11 18:34:51 UTC (rev 5627)
@@ -143,6 +143,7 @@
 	pt_normal,	/* copper and solder mask */
 	pt_bare,	/* only copper (and finish) */
 	pt_paste,	/* only solder paste */
+	pt_mask,	/* only solder mask */
 };
 
 struct frame_ref {

Modified: trunk/eda/fped/postscript.c
===================================================================
--- trunk/eda/fped/postscript.c	2009-09-10 23:40:03 UTC (rev 5626)
+++ trunk/eda/fped/postscript.c	2009-09-11 18:34:51 UTC (rev 5627)
@@ -198,6 +198,8 @@
 		return "hatchpath";
 	case pt_paste:
 		return "backhatchpath";
+	case pt_mask:
+		return "dotpath";
 	default:
 		abort();
 	}




More information about the commitlog mailing list