diff pads2gpcb/writeelem.c @ 68:b7f49f029bc3

pads2gpcb: use Cartesian Y axis direction internally
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sun, 31 Jan 2016 23:19:37 +0000
parents d0d330ae5b99
children a7f0e9bb3fb7
line wrap: on
line diff
--- a/pads2gpcb/writeelem.c	Sun Jan 31 22:59:36 2016 +0000
+++ b/pads2gpcb/writeelem.c	Sun Jan 31 23:19:37 2016 +0000
@@ -17,9 +17,9 @@
 	char *flagstr;
 
 	mx_str = output_gpcb_dimension(body->mark_x, mx_buf);
-	my_str = output_gpcb_dimension(body->mark_y, my_buf);
+	my_str = output_gpcb_dimension(-body->mark_y, my_buf);
 	tx_str = output_gpcb_dimension(body->refdes_x, tx_buf);
-	ty_str = output_gpcb_dimension(body->refdes_y, ty_buf);
+	ty_str = output_gpcb_dimension(-body->refdes_y, ty_buf);
 	flagstr = onbottom ? "onsolder" : "";
 
 	fprintf(outf,
@@ -45,9 +45,9 @@
 	char *flagstr;
 
 	x1_str = output_gpcb_dimension(pad->x1, x1_buf);
-	y1_str = output_gpcb_dimension(pad->y1, y1_buf);
+	y1_str = output_gpcb_dimension(-pad->y1, y1_buf);
 	x2_str = output_gpcb_dimension(pad->x2, x2_buf);
-	y2_str = output_gpcb_dimension(pad->y2, y2_buf);
+	y2_str = output_gpcb_dimension(-pad->y2, y2_buf);
 	thickness_str = output_gpcb_dimension(pad->thickness, thickness_buf);
 	clearance_str = output_gpcb_dimension(pad->clearance, clearance_buf);
 	mask_str = output_gpcb_dimension(pad->mask, mask_buf);
@@ -79,9 +79,9 @@
 	char thickness_buf[DIM_OUT_BUFSIZE], *thickness_str;
 
 	x1_str = output_gpcb_dimension(obj->x1, x1_buf);
-	y1_str = output_gpcb_dimension(obj->y1, y1_buf);
+	y1_str = output_gpcb_dimension(-obj->y1, y1_buf);
 	x2_str = output_gpcb_dimension(obj->x2, x2_buf);
-	y2_str = output_gpcb_dimension(obj->y2, y2_buf);
+	y2_str = output_gpcb_dimension(-obj->y2, y2_buf);
 	thickness_str = output_gpcb_dimension(obj->thickness, thickness_buf);
 
 	fprintf(outf, "\tElementLine[%s %s %s %s %s]\n",
@@ -100,7 +100,7 @@
 	char thickness_buf[DIM_OUT_BUFSIZE], *thickness_str;
 
 	centrex_str = output_gpcb_dimension(obj->centre_x, centrex_buf);
-	centrey_str = output_gpcb_dimension(obj->centre_y, centrey_buf);
+	centrey_str = output_gpcb_dimension(-obj->centre_y, centrey_buf);
 	width_str = output_gpcb_dimension(obj->width, width_buf);
 	height_str = output_gpcb_dimension(obj->height, height_buf);
 	thickness_str = output_gpcb_dimension(obj->thickness, thickness_buf);